2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
* boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global. (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim Open Firmware's memory for it; claim memory from _start to _end. * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern. (_end): New extern. (_start): Zero BSS from __bss_start to _end. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags): New extern. (GRUB_IEEE1275_NO_PARTITION_0): New #define.
This commit is contained in:
parent
4d61feb07b
commit
4512e4f355
4 changed files with 59 additions and 5 deletions
|
@ -32,7 +32,10 @@
|
|||
.long 0xffffffff /* virt-base */
|
||||
.long 0xffffffff /* virt-size */
|
||||
.long 0x00030000 /* load-base */
|
||||
|
||||
|
||||
.extern __bss_start
|
||||
.extern _end
|
||||
|
||||
.text
|
||||
.align 2
|
||||
.globl _start
|
||||
|
@ -43,9 +46,18 @@ _start:
|
|||
|
||||
li 2, 0
|
||||
li 13, 0
|
||||
|
||||
|
||||
mr 3, 5
|
||||
/* Stage1 won't zero BSS for us. In other cases, why not do it again? */
|
||||
lis 6, (__bss_start - 4)@h
|
||||
ori 6, 6, (__bss_start - 4)@l
|
||||
lis 7, (_end - 4)@h
|
||||
ori 7, 7, (_end - 4)@l
|
||||
subf 7, 6, 7
|
||||
srwi 7, 7, 2 /* We store 4 bytes at a time. */
|
||||
mtctr 7
|
||||
2: stwu 2, 4(6) /* We know r2 is already 0 from above. */
|
||||
bdnz 2b
|
||||
|
||||
bl cmain
|
||||
1: b 1b
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue