File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,20 @@ void cpu_reset(CPUState *env)
62
62
arm_rebuild_hflags (env );
63
63
}
64
64
65
+ void cpu_after_load (CPUState * env )
66
+ {
67
+ // Trigger tlib_on_execution_mode_changed callback to allow subscribed cores
68
+ // on the managed part update their Exception Level and Security State.
69
+ // Otherwise cores with two security states like ARMv8A
70
+ // will incorrectly update their state to the default after reset,
71
+ // while the correct state is visible only after loading the state.
72
+ // To circumvent it, we explicitly trigger callback after loading the state.
73
+ tlib_on_execution_mode_changed (
74
+ arm_current_el (env ),
75
+ arm_is_secure (env )
76
+ );
77
+ }
78
+
65
79
void do_interrupt (CPUState * env )
66
80
{
67
81
if (env -> interrupt_begin_callback_enabled ) {
You can’t perform that action at this time.
0 commit comments