thermosphere: rewrite sysreg trapping code, add skeleton code for timer val trap handling; support A32 EL1 once again
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "traps.h"
|
||||
#include "sysreg.h"
|
||||
|
||||
static void enableDebugTraps(void)
|
||||
static inline void enableDebugTraps(void)
|
||||
{
|
||||
u64 mdcr = GET_SYSREG(mdcr_el2);
|
||||
|
||||
@@ -30,6 +30,13 @@ static void enableDebugTraps(void)
|
||||
SET_SYSREG(mdcr_el2, mdcr);
|
||||
}
|
||||
|
||||
static inline void enableTimerTraps(void)
|
||||
{
|
||||
// Disable event streams, trap everything
|
||||
u64 cnthctl = 0;
|
||||
SET_SYSREG(cnthctl_el2, cnthctl);
|
||||
}
|
||||
|
||||
void enableTraps(void)
|
||||
{
|
||||
u64 hcr = GET_SYSREG(hcr_el2);
|
||||
@@ -46,4 +53,5 @@ void enableTraps(void)
|
||||
SET_SYSREG(hcr_el2, hcr);
|
||||
|
||||
enableDebugTraps();
|
||||
enableTimerTraps();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user