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.
This commit is contained in:
Lioncash 2018-09-29 17:58:26 -04:00
parent 334090fe6f
commit 16145e2f21
3 changed files with 15 additions and 5 deletions

View file

@ -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;