aboutsummaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-09-29 17:58:26 -0400
committerLioncash <mathew1800@gmail.com>2018-09-30 02:29:57 -0400
commit16145e2f21d7f7208c95d164a0fe2b1a5d8c20d6 (patch)
treec22765539200de9bbc95a3a60f4b3b158311c96e /src/core/arm/arm_interface.h
parent334090fe6f9fb7554e9b247bc3e4c6d4ece7dea8 (diff)
arm_interface: Add missing fpsr/tpidr members to the ThreadContext struct
Internally within the kernel, it also includes a member variable for the floating-point status register, and TPIDR, so we should do the same here to match it. While we're at it, also fix up the size of the struct and add a static assertion to ensure it always stays the correct size.
Diffstat (limited to 'src/core/arm/arm_interface.h')
-rw-r--r--src/core/arm/arm_interface.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 16d528994d..59da33f306 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -22,10 +22,16 @@ public:
std::array<u64, 31> cpu_registers;
u64 sp;
u64 pc;
- u64 pstate;
+ u32 pstate;
+ std::array<u8, 4> padding;
std::array<u128, 32> vector_registers;
- u64 fpcr;
+ u32 fpcr;
+ u32 fpsr;
+ u64 tpidr;
};
+ // Internally within the kernel, it expects the AArch64 version of the
+ // thread context to be 800 bytes in size.
+ static_assert(sizeof(ThreadContext) == 0x320);
/// Runs the CPU until an event happens
virtual void Run() = 0;