[2022] 2009-03-08 Robert Millan <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2022
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2022
Author:   robertmh
Date:     2009-03-08 12:46:27 +0000 (Sun, 08 Mar 2009)
Log Message:
-----------
2009-03-08  Robert Millan  <[email protected]>

        Make loader/i386/linux.c usable on i386-pc again.

        * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
        memory to heap.
        * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
        `#error' stanza.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/kern/i386/pc/init.c
    trunk/grub2/loader/i386/linux.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-03-07 10:50:43 UTC (rev 2021)
+++ trunk/grub2/ChangeLog	2009-03-08 12:46:27 UTC (rev 2022)
@@ -1,3 +1,12 @@
+2009-03-08  Robert Millan  <[email protected]>
+
+	Make loader/i386/linux.c usable on i386-pc again.
+
+	* kern/i386/pc/init.c (grub_machine_init): Disable addition of low
+	memory to heap.
+	* loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
+	`#error' stanza.
+
 2009-03-07  Bean  <[email protected]>
 
 	* loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd

Modified: trunk/grub2/kern/i386/pc/init.c
===================================================================
--- trunk/grub2/kern/i386/pc/init.c	2009-03-07 10:50:43 UTC (rev 2021)
+++ trunk/grub2/kern/i386/pc/init.c	2009-03-08 12:46:27 UTC (rev 2022)
@@ -148,10 +148,15 @@
   grub_gate_a20 (1);
 #endif
 
+/* FIXME: This prevents loader/i386/linux.c from using low memory.  When our
+   heap implements support for requesting a chunk in low memory, this should
+   no longer be a problem.  */
+#if 0
   /* Add the lower memory into free memory.  */
   if (grub_lower_mem >= GRUB_MEMORY_MACHINE_RESERVED_END)
     add_mem_region (GRUB_MEMORY_MACHINE_RESERVED_END,
 		    grub_lower_mem - GRUB_MEMORY_MACHINE_RESERVED_END);
+#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)

Modified: trunk/grub2/loader/i386/linux.c
===================================================================
--- trunk/grub2/loader/i386/linux.c	2009-03-07 10:50:43 UTC (rev 2021)
+++ trunk/grub2/loader/i386/linux.c	2009-03-08 12:46:27 UTC (rev 2022)
@@ -143,9 +143,8 @@
   real_mode_mem = 0;
   prot_mode_mem = 0;
   
-#ifdef GRUB_MACHINE_PCBIOS
-#error i386-pc port adds lower memory to heap, which collides with `real_mode_mem' allocation below
-#endif
+  /* FIXME: Should request low memory from the heap when this feature is
+     implemented.  */
 
   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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.