thermosphere: major refactor of memory map
- use recursive stage 1 page table (thanks @fincs for this idea) - NULL now unmapped - no identity mapping - image + GICv2 now mapped at the same address for every platform - tempbss mapped just after "real" bss, can now steal unused mem from the latter - no hardcoded VAs for other MMIO devices - tegra: remove timers, use the generic timer instead
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "timer.h"
|
||||
#include "irq.h"
|
||||
#include "exceptions.h"
|
||||
|
||||
u64 g_timerFreq = 0;
|
||||
|
||||
@@ -29,10 +30,17 @@ void timerInit(void)
|
||||
|
||||
void timerInterruptHandler(void)
|
||||
{
|
||||
// Disable timer programming until reprogrammed
|
||||
// Mask the timer interrupt until reprogrammed
|
||||
timerConfigure(false, false);
|
||||
|
||||
// For fun
|
||||
DEBUG("EL2 [core %d]: Timer interrupt at %lums\n", (int)currentCoreCtx->coreId, timerGetSystemTimeMs());
|
||||
timerSetTimeoutMs(1000);
|
||||
}
|
||||
|
||||
void timerWaitUsecs(u64 us)
|
||||
{
|
||||
exceptionEnterInterruptibleHypervisorCode();
|
||||
u64 mask = unmaskIrq();
|
||||
timerSetTimeoutUs(us);
|
||||
do {
|
||||
__wfi();
|
||||
} while (!timerGetInterruptStatus());
|
||||
restoreInterruptFlags(mask);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user