From f948a3ffab9076be1db1f9146e8319c4aea0db81 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 5 May 2010 21:42:39 +0200 Subject: [PATCH] respect GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM --- lib/ieee1275/relocator.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/ieee1275/relocator.c b/lib/ieee1275/relocator.c index bf7f4a821..947346d46 100644 --- a/lib/ieee1275/relocator.c +++ b/lib/ieee1275/relocator.c @@ -54,6 +54,18 @@ grub_relocator_firmware_fill_events (struct grub_relocator_mmap_event *events) if (type != GRUB_MACHINE_MEMORY_AVAILABLE) 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; + } + } + events[counter].type = REG_FIRMWARE_START; events[counter].pos = addr; counter++;