mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
MIPS: zboot: Avoid endless loop in clear BSS.
Commit 2ee1503e54
("MIPS: zboot: head.S clean up").
After .noreorder removed, clear BSS fall into endless loop. The bne
instruction will add nop to the delay slot at compile time. So a0
register will not increment by 4. Fix it and clear BSS from _edata
to (_end - 1).
Signed-off-by: Jinyang He <hejinyang@loongson.cn>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
a6e83acee2
commit
fdd85e04df
@ -26,8 +26,8 @@
|
||||
PTR_LA a0, _edata
|
||||
PTR_LA a2, _end
|
||||
1: sw zero, 0(a0)
|
||||
addiu a0, a0, 4
|
||||
bne a2, a0, 1b
|
||||
addiu a0, a0, 4
|
||||
|
||||
PTR_LA a0, (.heap) /* heap address */
|
||||
PTR_LA sp, (.stack + 8192) /* stack address */
|
||||
|
Loading…
Reference in New Issue
Block a user