diff options
Diffstat (limited to 'sys/include/arch/aarch64/frame.h')
-rw-r--r-- | sys/include/arch/aarch64/frame.h | 82 |
1 files changed, 39 insertions, 43 deletions
diff --git a/sys/include/arch/aarch64/frame.h b/sys/include/arch/aarch64/frame.h index ec11533..143f4d0 100644 --- a/sys/include/arch/aarch64/frame.h +++ b/sys/include/arch/aarch64/frame.h @@ -31,43 +31,10 @@ #define _MACHINE_FRAME_H_ #include <sys/types.h> +#include <sys/cdefs.h> typedef uint64_t lreg_t; - -/* General purpose registers */ -struct gpregs { - lreg_t x0; - lreg_t x1; - lreg_t x2; - lreg_t x3; - lreg_t x4; - lreg_t x5; - lreg_t x6; - lreg_t x7; - lreg_t x8; - lreg_t x9; - lreg_t x10; - lreg_t x11; - lreg_t x12; - lreg_t x13; - lreg_t x14; - lreg_t x15; - lreg_t x16; - lreg_t x17; - lreg_t x18; - lreg_t x19; - lreg_t x20; - lreg_t x21; - lreg_t x22; - lreg_t x23; - lreg_t x24; - lreg_t x25; - lreg_t x26; - lreg_t x27; - lreg_t x28; - lreg_t x29; - lreg_t x30; -}; +typedef uint64_t frament_t; /* Stack regs */ struct sregs { @@ -83,14 +50,43 @@ struct pstat { lreg_t spsr_el3; }; -struct trapframe { - struct gpregs gp; - struct sregs stack; - struct pstat status; - lreg_t elr_el1; - lreg_t elr_el2; - lreg_t elr_el3; - lreg_t pc; +struct __aligned(16) trapframe { + lreg_t x30; + lreg_t x29; + lreg_t x28; + lreg_t x27; + lreg_t x26; + lreg_t x25; + lreg_t x24; + lreg_t x23; + lreg_t x22; + lreg_t x21; + lreg_t x20; + lreg_t x19; + lreg_t x18; + lreg_t x17; + lreg_t x16; + lreg_t x15; + lreg_t x14; + lreg_t x13; + lreg_t x12; + lreg_t x11; + lreg_t x10; + lreg_t x9; + lreg_t x8; + lreg_t x7; + lreg_t x6; + lreg_t x5; + lreg_t x4; + lreg_t x3; + lreg_t x2; + lreg_t x1; + lreg_t x0; + lreg_t elr; + lreg_t esr; + frament_t trapno; }; +#define TF_IP(TFP) ((TFP)->pc) + #endif /* !_MACHINE_FRAME_H_ */ |