diff --git a/emulation/soc/renode.svd b/emulation/soc/renode.svd index 265d02474..4c86f0270 100644 --- a/emulation/soc/renode.svd +++ b/emulation/soc/renode.svd @@ -3,7 +3,7 @@ litex SOC - + 8 32 @@ -1185,10 +1185,10 @@ register to disable individual events.]]> GIT_GITREV 0x0014 - 0xed015a96 + 0x84421c8b 32 @@ -1205,7 +1205,7 @@ the exact git version used to build this firmware.]]> is ``1``, then the repository this was built from has one additional commit beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]> 0x0018 - 0x19 + 0x1b 32 @@ -3284,7 +3284,7 @@ inject too fast.]]> SEED1 0x0000 - 0x1980d59a + 0x4fe3a4bd 32 @@ -3299,7 +3299,7 @@ inject too fast.]]> SEED0 0x0004 - 0x3d397cb2 + 0x7df06eb2 32 diff --git a/kernel/src/arch/riscv.rs b/kernel/src/arch/riscv.rs index 9259e8f53..69ecc4085 100644 --- a/kernel/src/arch/riscv.rs +++ b/kernel/src/arch/riscv.rs @@ -60,9 +60,13 @@ pub fn idle() -> bool { // Issue `wfi`. This will return as soon as an external interrupt // is available. if false { + // "traditional" path for stopping a clock unsafe { riscv::asm::wfi() }; } else { + // this invokes Precusor-SoC specific path to gate clocks: + // 1. ignore_locked prevents the chip from going into reset if the PLL goes unlocked wfi_kernel_csr.wfo(utra::wfi::IGNORE_LOCKED_IGNORE_LOCKED, 1); + // 2. wfi gates all the clocks (stops them) until a SoC-defined interrupt comes in wfi_kernel_csr.wfo(utra::wfi::WFI_WFI, 1); } diff --git a/precursors/soc.svd b/precursors/soc.svd index 265d02474..4c86f0270 100644 --- a/precursors/soc.svd +++ b/precursors/soc.svd @@ -3,7 +3,7 @@ litex SOC - + 8 32 @@ -1185,10 +1185,10 @@ register to disable individual events.]]> GIT_GITREV 0x0014 - 0xed015a96 + 0x84421c8b 32 @@ -1205,7 +1205,7 @@ the exact git version used to build this firmware.]]> is ``1``, then the repository this was built from has one additional commit beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]> 0x0018 - 0x19 + 0x1b 32 @@ -3284,7 +3284,7 @@ inject too fast.]]> SEED1 0x0000 - 0x1980d59a + 0x4fe3a4bd 32 @@ -3299,7 +3299,7 @@ inject too fast.]]> SEED0 0x0004 - 0x3d397cb2 + 0x7df06eb2 32 diff --git a/precursors/soc_csr.bin b/precursors/soc_csr.bin index 039928928..76a9c3dad 100644 Binary files a/precursors/soc_csr.bin and b/precursors/soc_csr.bin differ diff --git a/svd2utra/examples/soc.svd b/svd2utra/examples/soc.svd index 265d02474..4c86f0270 100644 --- a/svd2utra/examples/soc.svd +++ b/svd2utra/examples/soc.svd @@ -3,7 +3,7 @@ litex SOC - + 8 32 @@ -1185,10 +1185,10 @@ register to disable individual events.]]> GIT_GITREV 0x0014 - 0xed015a96 + 0x84421c8b 32 @@ -1205,7 +1205,7 @@ the exact git version used to build this firmware.]]> is ``1``, then the repository this was built from has one additional commit beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]> 0x0018 - 0x19 + 0x1b 32 @@ -3284,7 +3284,7 @@ inject too fast.]]> SEED1 0x0000 - 0x1980d59a + 0x4fe3a4bd 32 @@ -3299,7 +3299,7 @@ inject too fast.]]> SEED0 0x0004 - 0x3d397cb2 + 0x7df06eb2 32