diff --git a/ChangeLog b/ChangeLog index bd80d1a80..8fba56c05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-12-04 Vladimir Serbinenko + + * grub-core/boot/sparc64/ieee1275/boot.S [CDBOOT]: Move scratchpad + so it doesn't land in the middle of loaded image. + 2013-12-04 Vladimir Serbinenko * configure.ac: Move all warning options that may be absent in diff --git a/grub-core/boot/sparc64/ieee1275/boot.S b/grub-core/boot/sparc64/ieee1275/boot.S index 0ab9a4af3..efe090e0c 100644 --- a/grub-core/boot/sparc64/ieee1275/boot.S +++ b/grub-core/boot/sparc64/ieee1275/boot.S @@ -48,7 +48,7 @@ kernel_byte: .xword (2 << 9) boot_path_end: kernel_address: .word GRUB_BOOT_MACHINE_KERNEL_ADDR #else -#define boot_path (_start + 512) +#define boot_path (_start + 512 + SCRATCH_PAD_BOOT_SIZE) #define boot_path_end (_start + 1024) #include @@ -140,7 +140,11 @@ prom_call: boot_continue: mov %o7, PIC_REG /* PIC base */ +#ifndef CDBOOT sethi %hi(SCRATCH_PAD_BOOT), %l1 /* OF argument slots */ +#else + GET_ABS(_start + 512, %l1) /* OF argument slots */ +#endif /* Find the /chosen node so we can fetch the stdout handle, * and thus perform console output. diff --git a/include/grub/sparc64/ieee1275/boot.h b/include/grub/sparc64/ieee1275/boot.h index 60edc712e..a54e47566 100644 --- a/include/grub/sparc64/ieee1275/boot.h +++ b/include/grub/sparc64/ieee1275/boot.h @@ -27,6 +27,7 @@ #define SCRATCH_PAD_BOOT 0x5000 #define SCRATCH_PAD_DISKBOOT 0x4000 +#define SCRATCH_PAD_BOOT_SIZE 0x110 #define GET_ABS(symbol, reg) \ add PIC_REG, (symbol - pic_base), reg