summaryrefslogtreecommitdiff
path: root/sys/include/arch/aarch64/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include/arch/aarch64/frame.h')
-rw-r--r--sys/include/arch/aarch64/frame.h80
1 files changed, 36 insertions, 44 deletions
diff --git a/sys/include/arch/aarch64/frame.h b/sys/include/arch/aarch64/frame.h
index f14fa01..143f4d0 100644
--- a/sys/include/arch/aarch64/frame.h
+++ b/sys/include/arch/aarch64/frame.h
@@ -31,46 +31,11 @@
#define _MACHINE_FRAME_H_
#include <sys/types.h>
+#include <sys/cdefs.h>
typedef uint64_t lreg_t;
typedef uint64_t frament_t;
-/* General purpose registers */
-struct gpregs {
- frament_t trapno;
- 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;
-};
-
/* Stack regs */
struct sregs {
lreg_t sp_el0;
@@ -85,14 +50,41 @@ 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)