x86: ia32: use virtual address for interrupt stack at boot

After page table is load, we should be executing in virtual
address space. Therefore we need to set ESP to the virtual
address of interrupt stack for the boot process.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-03-15 14:44:58 -07:00 committed by Anas Nashif
commit c650721a0f

View file

@ -229,6 +229,19 @@ __csSet:
ltr %ax
#endif
#ifdef Z_VM_KERNEL
/* Need to reset the stack to virtual address after
* page table is loaded.
*/
movl $z_interrupt_stacks, %esp
#ifdef CONFIG_X86_STACK_PROTECTION
addl $(CONFIG_ISR_STACK_SIZE + 4096), %esp
#else
addl $CONFIG_ISR_STACK_SIZE, %esp
#endif
#endif /* Z_VM_KERNEL */
/* Clear BSS */
call z_bss_zero