[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140806083825.GA31711@dhcp-16-198.nay.redhat.com>
Date: Wed, 6 Aug 2014 16:38:25 +0800
From: Dave Young <dyoung@...hat.com>
To: catalin.marinas@....com, will.deacon@....com,
matt.fleming@...el.com, leif.lindholm@...aro.org,
ard.biesheuvel@...aro.org, msalter@...hat.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] UEFI arm64: add noefi boot param
Adding a noefi boot param like in X86 to disable efi runtime services support.
This will be useful for debugging uefi problems. Also it will be useful
for later kexec/kdump work. Kexec on uefi support in X86 depends on a fixed vm
area specific for uefi runtime 1:1 mapping, kernel will switch to a different
page table for any uefi runtime callback in virtual mode. In arm64 similar
work probably is necessary. But kexec boot will just works with 'noefi' with
the limitaion of lacking runtime services. The runtime services is not critical
for kdump kernel for now. So as for kexec/kdump just leave the 1:1 mapping a
future work.
Signed-off-by: Dave Young <dyoung@...hat.com>
---
arch/arm64/kernel/efi.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/arm64/kernel/efi.c
===================================================================
--- linux-2.6.orig/arch/arm64/kernel/efi.c
+++ linux-2.6/arch/arm64/kernel/efi.c
@@ -31,6 +31,14 @@ static efi_runtime_services_t *runtime;
static u64 efi_system_table;
+static bool disable_runtime __initdata = false;
+static int __init setup_noefi(char *arg)
+{
+ disable_runtime = true;
+ return 0;
+}
+early_param("noefi", setup_noefi);
+
static int uefi_debug __initdata;
static int __init uefi_debug_setup(char *str)
{
@@ -391,11 +399,14 @@ static int __init arm64_enter_virtual_mo
return -1;
}
- pr_info("Remapping and enabling EFI services.\n");
-
- /* replace early memmap mapping with permanent mapping */
mapsize = memmap.map_end - memmap.map;
early_memunmap(memmap.map, mapsize);
+
+ if (disable_runtime)
+ return -ENODEV;
+
+ pr_info("Remapping and enabling EFI services.\n");
+ /* replace early memmap mapping with permanent mapping */
memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
mapsize);
memmap.map_end = memmap.map + mapsize;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists