Blame SOURCES/0314-ieee1275-drop-len-1-quirk-in-heap_init.patch

fd0330
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
fd0330
From: Daniel Axtens <dja@axtens.net>
fd0330
Date: Mon, 6 Feb 2023 10:03:21 -0500
fd0330
Subject: [PATCH] ieee1275: drop len -= 1 quirk in heap_init
fd0330
fd0330
This was apparently 'required by some firmware': commit dc9468500919
fd0330
("2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>").
fd0330
fd0330
It's not clear what firmware that was, and what platform from 14 years ago
fd0330
which exhibited the bug then is still both in use and buggy now.
fd0330
fd0330
It doesn't cause issues on qemu (mac99 or pseries) or under PFW for Power8.
fd0330
fd0330
I don't have access to old Mac hardware, but if anyone feels especially
fd0330
strongly we can put it under some feature flag. I really want to disable
fd0330
it under pseries because it will mess with region merging.
fd0330
fd0330
Signed-off-by: Daniel Axtens <dja@axtens.net>
fd0330
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
fd0330
(cherry picked from commit fc639d430297321ee4f77c5d2d698f698cec0dc7)
fd0330
---
fd0330
 grub-core/kern/ieee1275/init.c | 1 -
fd0330
 1 file changed, 1 deletion(-)
fd0330
fd0330
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
fd0330
index 8ae405bc79..c8d551759d 100644
fd0330
--- a/grub-core/kern/ieee1275/init.c
fd0330
+++ b/grub-core/kern/ieee1275/init.c
fd0330
@@ -168,7 +168,6 @@ heap_init (grub_uint64_t addr, grub_uint64_t len, grub_memory_type_t type,
fd0330
 	  addr = 0x180000;
fd0330
 	}
fd0330
     }
fd0330
-  len -= 1; /* Required for some firmware.  */
fd0330
 
fd0330
   /* Never exceed HEAP_MAX_SIZE  */
fd0330
   if (*total + len > HEAP_MAX_SIZE)