diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/arch/ppc.H | 11 | ||||
| -rw-r--r-- | src/include/kernel/task.H | 7 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/include/arch/ppc.H b/src/include/arch/ppc.H index 7e8b768c2..007f4f2b7 100644 --- a/src/include/arch/ppc.H +++ b/src/include/arch/ppc.H @@ -337,16 +337,7 @@ inline void icbi(void* _ptr) ALWAYS_INLINE inline void nap() { - // @todo-RTC:130186 Add new stop command support - //asm volatile("nap"); - - // Nap should be equivalent to 'stop 1' (no state loss) - // 855 reg for HYPV, 823 reg otherwise - // using EC(bit43) as 1 here (system reset or LPCR event) - // PHYP uses bit 42 as 1 also -// register uint64_t psscr = 0x0000000000310001; -// asm volatile("mtspr 823, %0; isync" :: "r" (psscr)); -// asm volatile(".long 0x4C0002E4"); // When GCC supports 'stop', use it + asm volatile(".long 0x4C0002E4"); // When GCC supports 'stop', use it } ALWAYS_INLINE diff --git a/src/include/kernel/task.H b/src/include/kernel/task.H index 0981dc3ab..c24084bf0 100644 --- a/src/include/kernel/task.H +++ b/src/include/kernel/task.H @@ -30,6 +30,13 @@ #include <kernel/types.h> + +// Stop/Nap instruction +#define STOP_INSTRUCTION 0x4C0002E4 +// Default PSSCR value for NAP'ing +#define PSSCR_NAP_VALUE 0x0000000000310001ull + + /** @struct context_t * @brief Defines the save-restore context for the task. * |

