]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/i386/pc/init.c (grub_get_conv_memsize): Removed.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 10 Jan 2011 16:54:21 +0000 (17:54 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 10 Jan 2011 16:54:21 +0000 (17:54 +0100)
(grub_machine_init): Don't check amount of low memory as reportedly
INT 12h can be broken and if low memory is too low we wouldn't have
gotten into grub_machine_init anyway.

ChangeLog
grub-core/kern/i386/pc/init.c

index 34703b81d2800c11469f9fac69bed5432a1b48ba..a1d948151862881d6ebb9cdf10d0563a805a86ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/kern/i386/pc/init.c (grub_get_conv_memsize): Removed.
+       (grub_machine_init): Don't check amount of low memory as reportedly
+       INT 12h can be broken and if low memory is too low we wouldn't have
+       gotten into grub_machine_init anyway.
+
 2011-01-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/kern/i386/pc/mmap.c (grub_get_conv_memsize): New function.
index 122c2c556e862f3bec004b409a945db676ff3b20..d8c337bdee7aa85331eb46e736aa9236c6115d73 100644 (file)
@@ -140,36 +140,27 @@ compact_mem_regions (void)
       }
 }
 
-/*
- *
- * grub_get_conv_memsize(i) :  return the conventional memory size in KB.
- *     BIOS call "INT 12H" to get conventional memory size
- *      The return value in AX.
- */
-static inline grub_uint16_t
-grub_get_conv_memsize (void)
-{
-  struct grub_bios_int_registers regs;
-
-  regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
-  grub_bios_interrupt (0x12, &regs);
-  return regs.eax & 0xffff;
-}
-
 void
 grub_machine_init (void)
 {
   int i;
+#if 0
   int grub_lower_mem;
+#endif
 
   /* Initialize the console as early as possible.  */
   grub_console_init ();
 
+  /* This sanity check is useless since top of GRUB_MEMORY_MACHINE_RESERVED_END
+     is used for stack and if it's unavailable we wouldn't have gotten so far.
+   */
+#if 0
   grub_lower_mem = grub_get_conv_memsize () << 10;
 
   /* Sanity check.  */
   if (grub_lower_mem < GRUB_MEMORY_MACHINE_RESERVED_END)
     grub_fatal ("too small memory");
+#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