Increase stack size on sparc

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-14 14:32:21 +01:00
parent 10f6389453
commit 320dd174b5
5 changed files with 32 additions and 10 deletions

View file

@ -53,8 +53,17 @@ codestart:
or %o3, %lo(_end), %o3
sethi %hi(grub_total_module_size), %o4
lduw [%o4 + %lo(grub_total_module_size)], %o4
add %o2, %o4, %o2
add %o3, %o4, %o3
/* Save ieee1275 stack for future use by booter. */
mov %o6, %o1
/* Our future stack. */
sethi %hi(GRUB_KERNEL_MACHINE_STACK_SIZE - 2047), %o5
or %o5, %lo(GRUB_KERNEL_MACHINE_STACK_SIZE - 2047), %o5
add %o3, %o5, %o6
sub %o2, 4, %o2
sub %o3, 4, %o3
1: lduw [%o2], %o5
@ -62,7 +71,7 @@ codestart:
subcc %o4, 4, %o4
sub %o2, 4, %o2
bne,pt %icc, 1b
sub %o3, 4, %o3
sub %o3, 4, %o3
/* Now it's safe to clear out the BSS. */
sethi %hi(__bss_start), %o2
@ -74,8 +83,9 @@ codestart:
cmp %o2, %o3
blt,pt %xcc, 1b
nop
sethi %hi(grub_ieee1275_original_stack), %o2
stx %o1, [%o2 + %lo(grub_ieee1275_original_stack)]
sethi %hi(grub_ieee1275_entry_fn), %o2
stx %o0, [%o2 + %lo(grub_ieee1275_entry_fn)]
call grub_main
nop
stx %o0, [%o2 + %lo(grub_ieee1275_entry_fn)]
1: ba,a 1b