Skip to content

Commit c213db6

Browse files
FlyGoattsbogend
authored andcommitted
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>
1 parent d82d500 commit c213db6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎arch/mips/kernel/head.S‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ dtb_found:
132132
#endif
133133

134134
MTC0 zero, CP0_CONTEXT # clear context register
135+
#ifdef CONFIG_64BIT
136+
MTC0 zero, CP0_XCONTEXT
137+
#endif
135138
PTR_LA $28, init_thread_union
136139
/* Set the SP after an empty pt_regs. */
137140
PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE

0 commit comments

Comments
 (0)