From: Daniel Axtens Date: Mon, 6 Feb 2023 15:03:21 +0000 (-0500) Subject: ieee1275: Drop len -= 1 quirk in heap_init X-Git-Tag: grub-2.12-rc1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81b0b1cea403de47fde06877acb911a66e681000;p=thirdparty%2Fgrub.git ieee1275: Drop len -= 1 quirk in heap_init This was apparently "required by some firmware": commit dc9468500919 (2007-02-12 Hollis Blanchard ). It's not clear what firmware that was, and what platform from 14 years ago which exhibited the bug then is still both in use and buggy now. It doesn't cause issues on qemu (mac99 or pseries) or under PFW for Power8. I don't have access to old Mac hardware, but if anyone feels especially strongly we can put it under some feature flag. I really want to disable it under pseries because it will mess with region merging. Signed-off-by: Daniel Axtens Reviewed-by: Daniel Kiper Tested-by: Nageswara R Sastry Reviewed-by: Robbie Harwood --- diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index 0bc571e3e..bb234b268 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -166,7 +166,6 @@ heap_init (grub_uint64_t addr, grub_uint64_t len, grub_memory_type_t type, addr = 0x180000; } } - len -= 1; /* Required for some firmware. */ /* Never exceed HEAP_MAX_SIZE */ if (*total + len > HEAP_MAX_SIZE)