diff options
Diffstat (limited to 'pk/ppe42/ppe42.h')
-rw-r--r-- | pk/ppe42/ppe42.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/pk/ppe42/ppe42.h b/pk/ppe42/ppe42.h index ecc990e3..35d57bad 100644 --- a/pk/ppe42/ppe42.h +++ b/pk/ppe42/ppe42.h @@ -464,11 +464,6 @@ do {*(volatile uint32_t *)(addr) = (data);} while(0) #define PPE42_RESET_TRAP 0 #endif -// PPE42 doesn't support the system call instruction so we use this illegal -// instruction to force a program exception which then emulates the system call -// instruction. -#define PPE42_SC_INST 0x44000002 - #ifndef __ASSEMBLER__ /// The PPE42 PK machine context is simply the MSR, a 32-bit integer. @@ -547,9 +542,10 @@ pk_machine_context_get(PkMachineContext *context) return PK_OK; } -/// The PK kernel thread context switch - PPE42 uses the 'sc' illegal instruction -/// to force a program exception to occur. -#define __pk_switch() asm volatile (".long 0x44000002") +extern void __ctx_switch(); +/// The PK context switch for the PPE kernel +// There is no protected mode in PPE42 so just call kernel code +#define __pk_switch() __ctx_switch() /// In the PowerPC EABI all initial stack frames require 8 bytes - the 4 bytes |