[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220110210809.3528-4-fllinden@amazon.com>
Date: Mon, 10 Jan 2022 21:08:09 +0000
From: Frank van der Linden <fllinden@...zon.com>
To: <linux-arm-kernel@...ts.infradead.org>, <rppt@...nel.org>,
<robh+dt@...nel.org>, <frowand.list@...il.com>, <ardb@...nel.org>,
<linux-mm@...ck.org>, <devicetree@...r.kernel.org>,
<linux-efi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<kexec@...ts.infradead.org>, <catalin.marinas@....com>,
<will@...nel.org>
CC: <geert+renesas@...der.be>,
Frank van der Linden <fllinden@...zon.com>
Subject: [PATCH 3/3] efi: enforce usable memory range after reserving regions
The usable memory range may be restricted through parameters that
did not come from EFI, like the FDT "linux,usable-memory-range"
property.
Enforce this range after the EFI memory map regions have been
processed.
Signed-off-by: Frank van der Linden <fllinden@...zon.com>
---
drivers/firmware/efi/efi-init.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/firmware/efi/efi-init.c b/drivers/firmware/efi/efi-init.c
index b19ce1a83f91..280e9178c7df 100644
--- a/drivers/firmware/efi/efi-init.c
+++ b/drivers/firmware/efi/efi-init.c
@@ -204,6 +204,13 @@ static __init void reserve_regions(void)
memblock_reserve(paddr, size);
}
}
+
+ /*
+ * Done, filter !nomap memory we just added so that the
+ * usable range is enforced. This is normally only set
+ * for crash kernels on some architectures.
+ */
+ memblock_enforce_usable_range();
}
void __init efi_init(void)
--
2.32.0
Powered by blists - more mailing lists