diff --git a/ChangeLog b/ChangeLog index 943ed0fad..e5f9f068d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-01-29 Vladimir Serbinenko + + * grub-core/boot/i386/pc/lnxboot.S: Use + GRUB_DECOMPRESSOR_MAX_DECOMPRESSOR_SIZE. + * grub-core/boot/i386/pc/startup_raw.S: Ensure about boot_dev + location. + * include/grub/offsets.h (GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE): New + definition. + (GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE): Likewise. + 2012-01-29 Vladimir Serbinenko * util/getroot.c (grub_util_get_dm_node_linear_info): Fix memory leak. diff --git a/grub-core/boot/i386/pc/lnxboot.S b/grub-core/boot/i386/pc/lnxboot.S index 9a516c694..e4bc8b425 100644 --- a/grub-core/boot/i386/pc/lnxboot.S +++ b/grub-core/boot/i386/pc/lnxboot.S @@ -202,7 +202,7 @@ real_code_2: movl $(DATA_ADDR + 0x1000), %edi movl %ss:(DATA_ADDR + GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE), %ecx - addl $(0x9000 - 0x8200), %ecx + addl $GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE, %ecx 2: call LOCAL(move_memory) diff --git a/grub-core/boot/i386/pc/startup_raw.S b/grub-core/boot/i386/pc/startup_raw.S index 56f1ba957..fdd408702 100644 --- a/grub-core/boot/i386/pc/startup_raw.S +++ b/grub-core/boot/i386/pc/startup_raw.S @@ -66,7 +66,7 @@ reed_solomon_redundancy: /* * This is the area for all of the special variables. */ - + . = _start + GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE LOCAL(boot_dev): .byte 0xFF, 0xFF, 0xFF LOCAL(boot_drive): diff --git a/include/grub/offsets.h b/include/grub/offsets.h index 21aea5cd6..d55e308c7 100644 --- a/include/grub/offsets.h +++ b/include/grub/offsets.h @@ -31,6 +31,10 @@ /* Offset of field holding no reed solomon length. */ #define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH 0x14 +#define GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE 0x18 + +#define GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE (0x9000-0x8200) + /* The segment where the kernel is loaded. */ #define GRUB_BOOT_I386_PC_KERNEL_SEG 0x800