MIPS: zboot: head.S clean up
.cprestore is removed as we don't expect Position Independent zboot ELF. .noreorder is also removed and rest instructions are massaged to improve readability. t9 register is used for indirect jump as MIPS ABI requirement. start label is removed as it already defined in LEAF. Reported-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Huacai Chen <chenhuacai@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
cf8194e46c
commit
2ee1503e54
1 changed files with 7 additions and 11 deletions
|
@ -15,10 +15,7 @@
|
||||||
#include <asm/asm.h>
|
#include <asm/asm.h>
|
||||||
#include <asm/regdef.h>
|
#include <asm/regdef.h>
|
||||||
|
|
||||||
.set noreorder
|
|
||||||
.cprestore
|
|
||||||
LEAF(start)
|
LEAF(start)
|
||||||
start:
|
|
||||||
/* Save boot rom start args */
|
/* Save boot rom start args */
|
||||||
move s0, a0
|
move s0, a0
|
||||||
move s1, a1
|
move s1, a1
|
||||||
|
@ -35,21 +32,20 @@ start:
|
||||||
PTR_LA a0, (.heap) /* heap address */
|
PTR_LA a0, (.heap) /* heap address */
|
||||||
PTR_LA sp, (.stack + 8192) /* stack address */
|
PTR_LA sp, (.stack + 8192) /* stack address */
|
||||||
|
|
||||||
PTR_LA ra, 2f
|
PTR_LA t9, decompress_kernel
|
||||||
PTR_LA k0, decompress_kernel
|
jalr t9
|
||||||
jr k0
|
|
||||||
nop
|
|
||||||
2:
|
2:
|
||||||
move a0, s0
|
move a0, s0
|
||||||
move a1, s1
|
move a1, s1
|
||||||
move a2, s2
|
move a2, s2
|
||||||
move a3, s3
|
move a3, s3
|
||||||
PTR_LI k0, KERNEL_ENTRY
|
PTR_LI t9, KERNEL_ENTRY
|
||||||
jr k0
|
jalr t9
|
||||||
nop
|
|
||||||
3:
|
3:
|
||||||
b 3b
|
b 3b
|
||||||
nop
|
|
||||||
END(start)
|
END(start)
|
||||||
|
|
||||||
.comm .heap,BOOT_HEAP_SIZE,4
|
.comm .heap,BOOT_HEAP_SIZE,4
|
||||||
|
|
Loading…
Add table
Reference in a new issue