thermosphere: add cctx->userFrame
This commit is contained in:
@@ -20,29 +20,32 @@
|
||||
#include "barrier.h"
|
||||
#include "execute_function.h"
|
||||
|
||||
struct ExceptionStackFrame;
|
||||
typedef struct CoreCtx {
|
||||
u64 kernelArgument; // @0x00
|
||||
uintptr_t kernelEntrypoint; // @0x08
|
||||
u8 *crashStack; // @0x10
|
||||
u64 scratch; // @0x18
|
||||
u32 coreId; // @0x20
|
||||
u8 gicInterfaceMask; // @0x24. Equal to BIT(coreId) anyway
|
||||
bool isBootCore; // @0x25
|
||||
bool warmboot; // @0x26
|
||||
|
||||
// "Execute function"
|
||||
ExecutedFunction executedFunction; // @0x28
|
||||
void *executedFunctionArgs; // @0x30
|
||||
Barrier executedFunctionBarrier; // @0x38
|
||||
bool executedFunctionSync; // @0x3C
|
||||
struct ExceptionStackFrame *userFrame; // @0x00
|
||||
u64 scratch; // @0x08
|
||||
u8 *crashStack; // @0x10
|
||||
u64 kernelArgument; // @0x18
|
||||
uintptr_t kernelEntrypoint; // @0x20
|
||||
u32 coreId; // @0x28
|
||||
u8 gicInterfaceMask; // @0x2C. Equal to BIT(coreId) anyway
|
||||
bool isBootCore; // @0x2D
|
||||
bool warmboot; // @0x2E
|
||||
|
||||
// Timer stuff
|
||||
u64 totalTimeInHypervisor; // @0x40. cntvoff_el2 is updated to that value.
|
||||
u64 emulPtimerCval; // @0x48. When setting cntp_cval_el0 and on interrupt
|
||||
u64 totalTimeInHypervisor; // @0x30. cntvoff_el2 is updated to that value.
|
||||
u64 emulPtimerCval; // @0x38. When setting cntp_cval_el0 and on interrupt
|
||||
|
||||
// "Execute function"
|
||||
ExecutedFunction executedFunction; // @0x40
|
||||
void *executedFunctionArgs; // @0x48
|
||||
Barrier executedFunctionBarrier; // @0x50
|
||||
bool executedFunctionSync; // @0x54
|
||||
} CoreCtx;
|
||||
|
||||
static_assert(offsetof(CoreCtx, executedFunctionSync) == 0x3C, "Wrong definition for CoreCtx");
|
||||
static_assert(offsetof(CoreCtx, emulPtimerCval) == 0x48, "Wrong definition for CoreCtx");
|
||||
static_assert(offsetof(CoreCtx, warmboot) == 0x2E, "Wrong definition for CoreCtx");
|
||||
static_assert(offsetof(CoreCtx, emulPtimerCval) == 0x38, "Wrong definition for CoreCtx");
|
||||
static_assert(offsetof(CoreCtx, executedFunctionSync) == 0x54, "Wrong definition for CoreCtx");
|
||||
|
||||
extern CoreCtx g_coreCtxs[4];
|
||||
register CoreCtx *currentCoreCtx asm("x18");
|
||||
|
||||
Reference in New Issue
Block a user