Skip to content

Commit

Permalink
ieee1275: drop len -= 1 quirk in heap_init
Browse files Browse the repository at this point in the history
This was apparently 'required by some firmware': commit dc94685
("2007-02-12  Hollis Blanchard  <[email protected]>").

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 <[email protected]>
Reviewed-by: Daniel Kiper <[email protected]>
(cherry picked from commit fc639d430297321ee4f77c5d2d698f698cec0dc7)
  • Loading branch information
daxtens authored and frozencemetery committed Feb 8, 2023
1 parent 83a6b60 commit d730bb3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion grub-core/kern/ieee1275/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,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)
Expand Down

0 comments on commit d730bb3

Please sign in to comment.