From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 03/13] arm64/efi: mark UEFI reserved regions as MEMBLOCK_NOMAP
Date: Mon, 30 Nov 2015 13:28:17 +0100 [thread overview]
Message-ID: <1448886507-3216-4-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1448886507-3216-1-git-send-email-ard.biesheuvel@linaro.org>
Change the EFI memory reservation logic to use memblock_mark_nomap()
rather than memblock_reserve() to mark UEFI reserved regions as
occupied. In addition to reserving them against allocations done by
memblock, this will also prevent them from being covered by the linear
mapping.
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/arm64/kernel/efi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index 4eeb17198cfa..04531d35f1df 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -187,7 +187,7 @@ static __init void reserve_regions(void)
early_init_dt_add_memory_arch(paddr, size);
if (is_reserve_region(md)) {
- memblock_reserve(paddr, size);
+ memblock_mark_nomap(paddr, size);
if (efi_enabled(EFI_DBG))
pr_cont("*");
}
@@ -209,8 +209,6 @@ void __init efi_init(void)
efi_system_table = params.system_table;
- memblock_reserve(params.mmap & PAGE_MASK,
- PAGE_ALIGN(params.mmap_size + (params.mmap & ~PAGE_MASK)));
memmap.phys_map = params.mmap;
memmap.map = early_memremap(params.mmap, params.mmap_size);
if (memmap.map == NULL) {
@@ -230,6 +228,9 @@ void __init efi_init(void)
reserve_regions();
early_memunmap(memmap.map, params.mmap_size);
+ memblock_mark_nomap(params.mmap & PAGE_MASK,
+ PAGE_ALIGN(params.mmap_size +
+ (params.mmap & ~PAGE_MASK)));
}
static bool __init efi_virtmap_init(void)
--
1.9.1
next prev parent reply other threads:[~2015-11-30 12:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 12:28 [PATCH v4 00/13] UEFI boot and runtime services support for 32-bit ARM Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 01/13] mm/memblock: add MEMBLOCK_NOMAP attribute to memblock memory table Ard Biesheuvel
2015-12-03 10:55 ` Ard Biesheuvel
2015-12-03 11:27 ` Alexander Kuleshov
2015-12-08 12:07 ` Will Deacon
2015-12-08 22:23 ` Andrew Morton
2015-12-09 11:29 ` Will Deacon
2015-11-30 12:28 ` [PATCH v4 02/13] arm64: only consider memblocks with NOMAP cleared for linear mapping Ard Biesheuvel
2015-11-30 12:28 ` Ard Biesheuvel [this message]
2015-11-30 12:28 ` [PATCH v4 04/13] arm64/efi: split off EFI init and runtime code for reuse by 32-bit ARM Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 05/13] arm64/efi: refactor " Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 06/13] ARM: add support for generic early_ioremap/early_memremap Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 07/13] ARM: split off core mapping logic from create_mapping Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 08/13] ARM: factor out allocation routine from __create_mapping() Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 09/13] ARM: add support for non-global kernel mappings Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 10/13] ARM: implement create_mapping_late() for EFI use Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 11/13] ARM: only consider memblocks with NOMAP cleared for linear mapping Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 12/13] ARM: wire up UEFI init and runtime support Ard Biesheuvel
2015-11-30 12:28 ` [PATCH v4 13/13] ARM: add UEFI stub support Ard Biesheuvel
2015-12-02 14:53 ` [PATCH v4 00/13] UEFI boot and runtime services support for 32-bit ARM Ard Biesheuvel
2015-12-03 10:18 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448886507-3216-4-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).