* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New value
GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM. * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM on qemu. * kern/ieee1275/init.c (grub_claim_heap): Don0t allocate below 1.5MiB if GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM is set.
This commit is contained in:
parent
a7fc080b56
commit
7e720a9bc1
4 changed files with 33 additions and 0 deletions
|
@ -133,6 +133,17 @@ static void grub_claim_heap (void)
|
|||
if (type != 1)
|
||||
return 0;
|
||||
|
||||
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM))
|
||||
{
|
||||
if (addr + len <= 0x180000)
|
||||
return 0;
|
||||
|
||||
if (addr < 0x180000)
|
||||
{
|
||||
len = addr + len - 0x180000;
|
||||
addr = 0x180000;
|
||||
}
|
||||
}
|
||||
len -= 1; /* Required for some firmware. */
|
||||
|
||||
/* Never exceed HEAP_MAX_SIZE */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue