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:
parent
9109fbb1a2
commit
c650721a0f
1 changed files with 13 additions and 0 deletions
|
@ -229,6 +229,19 @@ __csSet:
|
||||||
ltr %ax
|
ltr %ax
|
||||||
#endif
|
#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 */
|
/* Clear BSS */
|
||||||
call z_bss_zero
|
call z_bss_zero
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue