thermosphere: refactor exception handlers & add stolen time/emulated ptimer logic
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <assert.h>
|
||||
#include "utils.h"
|
||||
#include "barrier.h"
|
||||
#include "execute_function.h"
|
||||
@@ -34,8 +35,14 @@ typedef struct CoreCtx {
|
||||
void *executedFunctionArgs; // @0x30
|
||||
Barrier executedFunctionBarrier; // @0x38
|
||||
bool executedFunctionSync; // @0x3C
|
||||
|
||||
// Timer stuff
|
||||
u64 emulPtimerOffsetThen; // @0x40. When setting cntp_cval_el0 and on interrupt
|
||||
} CoreCtx;
|
||||
|
||||
static_assert(offsetof(CoreCtx, executedFunctionSync) == 0x3C, "Wrong definition for CoreCtx");
|
||||
static_assert(offsetof(CoreCtx, emulPtimerOffsetThen) == 0x40, "Wrong definition for CoreCtx");
|
||||
|
||||
extern CoreCtx g_coreCtxs[4];
|
||||
register CoreCtx *currentCoreCtx asm("x18");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user