]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Add #error instance with comment to explain why this
authorrobertmh <robertmh@localhost>
Fri, 14 Nov 2008 20:18:07 +0000 (20:18 +0000)
committerrobertmh <robertmh@localhost>
Fri, 14 Nov 2008 20:18:07 +0000 (20:18 +0000)
        loader isn't currently usable on PC/BIOS.

ChangeLog
loader/i386/linux.c

index 834efaca0dbbc53371c870b4e58b460b8478b7d4..c3bbea91d3f54abb5055cd8e40d76e12122ff816 100644 (file)
--- 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  <rmh@aybabtu.com>
 
index 333b9d6e721e3c976169ed68efb538d9dc9d2895..085f1f1fa238ceb75daed986bc4f135312b08b69 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include <grub/loader.h>
+#include <grub/machine/machine.h>
 #include <grub/machine/memory.h>
 #include <grub/machine/loader.h>
 #include <grub/file.h>
@@ -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)
     {