Commit c213db61 authored by Jiaxun Yang's avatar Jiaxun Yang Committed by Thomas Bogendoerfer

MIPS: Clear XContext at boot time

XContext might be dirty at boot time. We need to clear it
to ensure early stackframe is safe.
Signed-off-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent d82d500f
...@@ -132,6 +132,9 @@ dtb_found: ...@@ -132,6 +132,9 @@ dtb_found:
#endif #endif
MTC0 zero, CP0_CONTEXT # clear context register MTC0 zero, CP0_CONTEXT # clear context register
#ifdef CONFIG_64BIT
MTC0 zero, CP0_XCONTEXT
#endif
PTR_LA $28, init_thread_union PTR_LA $28, init_thread_union
/* Set the SP after an empty pt_regs. */ /* Set the SP after an empty pt_regs. */
PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment