From 2f2a3442573c97dd3cf60378c7acaf25894cec98 Mon Sep 17 00:00:00 2001 From: robertmh Date: Fri, 14 Nov 2008 20:18:07 +0000 Subject: [PATCH] Add #error instance with comment to explain why this loader isn't currently usable on PC/BIOS. --- ChangeLog | 3 ++- loader/i386/linux.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 834efaca0..c3bbea91d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,7 +14,8 @@ an appropiate place in lower memory, between 0x10000 and 0x90000, like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem is in our heap (probably as a result of it being corrupted during - decompression). + decompression). Add #error instance with comment to explain why this + loader isn't currently usable on PC/BIOS. 2008-11-14 Robert Millan diff --git a/loader/i386/linux.c b/loader/i386/linux.c index 333b9d6e7..085f1f1fa 100644 --- a/loader/i386/linux.c +++ b/loader/i386/linux.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include @@ -142,6 +143,12 @@ allocate_pages (grub_size_t prot_size) real_mode_mem = 0; prot_mode_mem = 0; + /* i386-pc port adds lower memory to heap, which collides with + `real_mode_mem' allocation below. */ +#ifdef GRUB_MACHINE_PCBIOS +#error +#endif + auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t); int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type) {