summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/arm-stub.c
diff options
context:
space:
mode:
authorRoy Franz2015-09-24 05:17:54 +0200
committerard2015-12-14 10:38:21 +0100
commit81a0bc39ea1960bbf8ece6a895d7cfd2d9efa28a (patch)
tree58f4c5c73cc4292b242dce2e0018511f9e18e39e /drivers/firmware/efi/libstub/arm-stub.c
parentARM: wire up UEFI init and runtime support (diff)
downloadkernel-qcow2-linux-81a0bc39ea1960bbf8ece6a895d7cfd2d9efa28a.tar.gz
kernel-qcow2-linux-81a0bc39ea1960bbf8ece6a895d7cfd2d9efa28a.tar.xz
kernel-qcow2-linux-81a0bc39ea1960bbf8ece6a895d7cfd2d9efa28a.zip
ARM: add UEFI stub support
This patch adds EFI stub support for the ARM Linux kernel. The EFI stub operates similarly to the x86 and arm64 stubs: it is a shim between the EFI firmware and the normal zImage entry point, and sets up the environment that the zImage is expecting. This includes optionally loading the initrd and device tree from the system partition based on the kernel command line. Signed-off-by: Roy Franz <roy.franz@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/arm-stub.c')
-rw-r--r--drivers/firmware/efi/libstub/arm-stub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c
index 950c87f5d279..3397902e4040 100644
--- a/drivers/firmware/efi/libstub/arm-stub.c
+++ b/drivers/firmware/efi/libstub/arm-stub.c
@@ -303,8 +303,10 @@ fail:
* The value chosen is the largest non-zero power of 2 suitable for this purpose
* both on 32-bit and 64-bit ARM CPUs, to maximize the likelihood that it can
* be mapped efficiently.
+ * Since 32-bit ARM could potentially execute with a 1G/3G user/kernel split,
+ * map everything below 1 GB.
*/
-#define EFI_RT_VIRTUAL_BASE 0x40000000
+#define EFI_RT_VIRTUAL_BASE SZ_512M
static int cmp_mem_desc(const void *l, const void *r)
{