From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org,
matt.fleming@intel.com, linux@arm.linux.org.uk,
will.deacon@arm.com, grant.likely@linaro.org,
catalin.marinas@arm.com, mark.rutland@arm.com,
leif.lindholm@linaro.org, roy.franz@linaro.org
Cc: msalter@redhat.com, ryan.harkin@linaro.org,
akpm@linux-foundation.org, linux-mm@kvack.org,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH v2 03/12] arm64/efi: mark UEFI reserved regions as MEMBLOCK_NOMAP
Date: Mon, 16 Nov 2015 19:32:28 +0100 [thread overview]
Message-ID: <1447698757-8762-4-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1447698757-8762-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.
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 de46b50f4cdf..c7c7fb417110 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -183,7 +183,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("*");
}
@@ -205,8 +205,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);
memmap.map_end = memmap.map + params.mmap_size;
@@ -218,6 +216,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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-11-16 18:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 18:32 [PATCH v2 00/12] UEFI boot and runtime services support for 32-bit ARM Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 01/12] mm/memblock: add MEMBLOCK_NOMAP attribute to memblock memory table Ard Biesheuvel
2015-11-16 18:58 ` Russell King - ARM Linux
2015-11-16 19:09 ` Ard Biesheuvel
2015-11-16 19:49 ` Russell King - ARM Linux
2015-11-16 20:33 ` Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 02/12] arm64: only consider memblocks with NOMAP cleared for linear mapping Ard Biesheuvel
2015-11-16 18:32 ` Ard Biesheuvel [this message]
2015-11-16 18:32 ` [PATCH v2 04/12] arm64/efi: split off EFI init and runtime code for reuse by 32-bit ARM Ard Biesheuvel
2015-11-16 18:48 ` Russell King - ARM Linux
2015-11-17 9:21 ` Ard Biesheuvel
2015-11-19 22:34 ` Matt Fleming
2015-11-20 6:31 ` Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 05/12] arm64/efi: refactor " Ard Biesheuvel
2015-11-16 18:49 ` Russell King - ARM Linux
2015-11-17 9:18 ` Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 06/12] ARM: add support for generic early_ioremap/early_memremap Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 07/12] ARM: split off core mapping logic from create_mapping Ard Biesheuvel
2015-11-16 18:55 ` Russell King - ARM Linux
2015-11-16 19:01 ` Ard Biesheuvel
2015-11-16 19:45 ` Russell King - ARM Linux
2015-11-16 18:32 ` [PATCH v2 08/12] ARM: factor out allocation routine from __create_mapping() Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 09/12] ARM: implement create_mapping_late() for EFI use Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 10/12] ARM: only consider memblocks with NOMAP cleared for linear mapping Ard Biesheuvel
2015-11-16 19:00 ` Russell King - ARM Linux
2015-11-16 19:02 ` Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 11/12] ARM: wire up UEFI init and runtime support Ard Biesheuvel
2015-11-16 19:01 ` Russell King - ARM Linux
2015-11-16 19:04 ` Ard Biesheuvel
2015-11-16 19:48 ` Russell King - ARM Linux
2015-11-17 5:33 ` Ard Biesheuvel
2015-11-16 18:32 ` [PATCH v2 12/12] ARM: add UEFI stub support Ard Biesheuvel
2015-11-16 19:50 ` [PATCH v2 00/12] UEFI boot and runtime services support for 32-bit ARM Ryan Harkin
2015-11-17 9:26 ` Ard Biesheuvel
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=1447698757-8762-4-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=grant.likely@linaro.org \
--cc=leif.lindholm@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=matt.fleming@intel.com \
--cc=msalter@redhat.com \
--cc=roy.franz@linaro.org \
--cc=ryan.harkin@linaro.org \
--cc=will.deacon@arm.com \
/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