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