From 18a38098ad53654bc304271464e01fe0e090249e Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 5 Jan 2011 01:14:32 +0100 Subject: [PATCH] The E820 type 5 is BADRAM, not EXEC_CODE. * grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed. (GRUB_E820_BADRAM): New define. * grub-core/loader/i386/linux.c (grub_linux_boot): Translate code into reserved. Propagate BADRAM. * grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed. (GRUB_E820_BADRAM): New define. --- ChangeLog | 11 +++++++++++ grub-core/loader/i386/bsd.c | 2 +- grub-core/loader/i386/linux.c | 4 ++-- include/grub/i386/linux.h | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cda79b44a..41241e7a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-01-05 Vladimir Serbinenko + + The E820 type 5 is BADRAM, not EXEC_CODE. + + * grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed. + (GRUB_E820_BADRAM): New define. + * grub-core/loader/i386/linux.c (grub_linux_boot): Translate code + into reserved. Propagate BADRAM. + * grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed. + (GRUB_E820_BADRAM): New define. + 2011-01-04 Vladimir Serbinenko * grub-core/lib/efi/relocator.c (grub_relocator_firmware_fill_events): diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c index 84cf1a17f..08cdcda37 100644 --- a/grub-core/loader/i386/bsd.c +++ b/grub-core/loader/i386/bsd.c @@ -252,7 +252,7 @@ struct grub_e820_mmap #define GRUB_E820_RESERVED 2 #define GRUB_E820_ACPI 3 #define GRUB_E820_NVS 4 -#define GRUB_E820_EXEC_CODE 5 +#define GRUB_E820_BADRAM 5 static void generate_e820_mmap (grub_size_t *len, grub_size_t *cnt, void *buf) diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c index 95aa6b456..ca88c7403 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -418,9 +418,9 @@ grub_linux_boot (void) addr, size, GRUB_E820_NVS); break; - case GRUB_MEMORY_CODE: + case GRUB_MEMORY_BADRAM: grub_e820_add_region (params->e820_map, &e820_num, - addr, size, GRUB_E820_EXEC_CODE); + addr, size, GRUB_E820_BADRAM); break; default: diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h index 63f99db62..9ba83eee2 100644 --- a/include/grub/i386/linux.h +++ b/include/grub/i386/linux.h @@ -68,7 +68,7 @@ #define GRUB_E820_RESERVED 2 #define GRUB_E820_ACPI 3 #define GRUB_E820_NVS 4 -#define GRUB_E820_EXEC_CODE 5 +#define GRUB_E820_BADRAM 5 #define GRUB_E820_MAX_ENTRY 128