mirror of https://gitee.com/openkylin/linux.git
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: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
d82d500f51
commit
c213db6146
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue