]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Don't abort() on unavailable coreboot tables if not running on coreboot.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 28 Dec 2013 16:25:14 +0000 (17:25 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 28 Dec 2013 16:25:14 +0000 (17:25 +0100)
ChangeLog
grub-core/kern/i386/coreboot/cbtable.c
grub-core/kern/i386/coreboot/init.c

index 0401f6154f88193afcfd8044de8ecba5d77e79aa..ed6d77cc8ea90fd5bdafede6f750c4da8807f2ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-28  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Don't abort() on unavailable coreboot tables if not running on coreboot.
+
 2013-12-28  Andrey Borzenkov <arvidjaar@gmail.com>
 
        * grub-core/kern/emu/misc.c: Remove unused error.h; fixes compilation
index e3bb7b2e09d6fb21aeabac2ffd93f1d87f5e6965..1669bc0ca23a2fe5dcfb8e2b6c973ddb5e27e880 100644 (file)
@@ -55,7 +55,7 @@ grub_linuxbios_table_iterate (int (*hook) (grub_linuxbios_table_item_t,
     if (check_signature (table_header))
       goto signature_found;
 
-  grub_fatal ("Could not find coreboot table\n");
+  return 0;
 
 signature_found:
 
index 6b150b47d886732a3429a66fce84d955bb65a2f8..3314f027fec896e42864066a9f8411e885a185b8 100644 (file)
@@ -51,6 +51,7 @@ grub_exit (void)
 
 grub_addr_t grub_modbase = GRUB_KERNEL_I386_COREBOOT_MODULES_ADDR;
 static grub_uint64_t modend;
+static int have_memory = 0;
 
 /* Helper for grub_machine_init.  */
 static int
@@ -82,6 +83,8 @@ heap_init (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type,
 
   grub_mm_init_region ((void *) (grub_addr_t) begin, (grub_size_t) (end - begin));
 
+  have_memory = 1;
+
   return 0;
 }
 
@@ -97,6 +100,8 @@ grub_machine_init (void)
   grub_vga_text_init ();
 
   grub_machine_mmap_iterate (heap_init, NULL);
+  if (!have_memory)
+    grub_fatal ("No memory found");
 
   grub_video_coreboot_fb_late_init ();