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

View file

@ -23,12 +23,15 @@
#include <grub/err.h>
#include <grub/misc.h>
#include <grub/time.h>
#include <grub/machine/boot.h>
#include <grub/machine/console.h>
#include <grub/machine/kernel.h>
#include <grub/machine/time.h>
#include <grub/ieee1275/ofdisk.h>
#include <grub/ieee1275/ieee1275.h>
grub_addr_t grub_ieee1275_original_stack;
void
grub_exit (void)
{
@ -104,7 +107,8 @@ grub_machine_set_prefix (void)
static void
grub_heap_init (void)
{
grub_mm_init_region ((void *) grub_modules_get_end (), 0x200000);
grub_mm_init_region ((void *) (grub_modules_get_end ()
+ GRUB_KERNEL_MACHINE_STACK_SIZE), 0x200000);
}
static void