Blame SOURCES/0063-grub-core-mmap-i386-uppermem.c-lower_hook-COREBOOT-I.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
39700a
From: Vladimir Serbinenko <phcoder@gmail.com>
39700a
Date: Fri, 28 Feb 2014 09:50:47 +0100
28f7f8
Subject: [PATCH] * grub-core/mmap/i386/uppermem.c (lower_hook) [COREBOOT]:
28f7f8
 Ignore low tables for low memory calculations.
39700a
39700a
---
39700a
 grub-core/mmap/i386/uppermem.c | 6 +++++-
28f7f8
 ChangeLog                      | 5 +++++
39700a
 2 files changed, 10 insertions(+), 1 deletion(-)
39700a
39700a
diff --git a/grub-core/mmap/i386/uppermem.c b/grub-core/mmap/i386/uppermem.c
28f7f8
index bd8b429c4be..a6be9896d82 100644
39700a
--- a/grub-core/mmap/i386/uppermem.c
39700a
+++ b/grub-core/mmap/i386/uppermem.c
39700a
@@ -31,8 +31,12 @@ lower_hook (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type,
39700a
 
39700a
   if (type != GRUB_MEMORY_AVAILABLE)
39700a
     return 0;
39700a
+#ifdef GRUB_MACHINE_COREBOOT
39700a
+  if (addr <= 0x1000)
39700a
+#else
39700a
   if (addr == 0)
39700a
-    *lower = size;
39700a
+#endif
39700a
+    *lower = size + addr;
39700a
   return 0;
39700a
 }
39700a
 
28f7f8
diff --git a/ChangeLog b/ChangeLog
28f7f8
index bbaed2691c7..6ed6cf4ec2b 100644
28f7f8
--- a/ChangeLog
28f7f8
+++ b/ChangeLog
28f7f8
@@ -1,3 +1,8 @@
28f7f8
+2014-02-28  Vladimir Serbinenko  <phcoder@gmail.com>
28f7f8
+
28f7f8
+	* grub-core/mmap/i386/uppermem.c (lower_hook) [COREBOOT]: Ignore low
28f7f8
+	tables for low memory calculations.
28f7f8
+
28f7f8
 2014-02-28  Vladimir Serbinenko  <phcoder@gmail.com>
28f7f8
 
28f7f8
 	* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi): Limit