File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ inline void set_ttbr0_el1(FlatPtr ttbr0_el1)
23
23
asm (" msr ttbr0_el1, %[value]" ::[value] " r" (ttbr0_el1));
24
24
}
25
25
26
+ inline void set_sp_el1 (FlatPtr sp_el1)
27
+ {
28
+ asm (" msr sp_el1, %[value]" ::[value] " r" (sp_el1));
29
+ }
30
+
26
31
inline void flush ()
27
32
{
28
33
asm (" dsb ish" );
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ static void drop_to_el1()
46
46
hypervisor_configuration_register_el2.RW = 1 ; // EL1 to use 64-bit mode
47
47
Aarch64::HCR_EL2::write (hypervisor_configuration_register_el2);
48
48
49
+ // Set up initial exception stack
50
+ // FIXME: Define in linker script
51
+ Aarch64::Asm::set_sp_el1 (0x40000 );
52
+
49
53
Aarch64::SPSR_EL2 saved_program_status_register_el2 = {};
50
54
51
55
// Mask (disable) all interrupts
You can’t perform that action at this time.
0 commit comments