summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-25 21:27:35 (GMT)
committerAlexander Graf <agraf@suse.de>2016-10-19 07:01:53 (GMT)
commit65e4c0b168651285adeab66f32f3a14668f3e4bd (patch)
tree8711b3cce722539e32d03ada4a2d994a11f7eb3c /arch/x86/lib
parente275458c2f011a7e66ac01e6558f15f4cf4972f9 (diff)
downloadu-boot-65e4c0b168651285adeab66f32f3a14668f3e4bd.tar.xz
x86: efi: Add EFI loader support for x86
Add the required pieces to support the EFI loader on x86. Since U-Boot only builds for 32-bit on x86, only a 32-bit EFI application is supported. If a 64-bit kernel must be booted, U-Boot supports this directly using FIT (see doc/uImage.FIT/kernel.its). U-Boot can act as a payload for both 32-bit and 64-bit EFI. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/Makefile1
-rw-r--r--arch/x86/lib/sections.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 40ea6bf..b9c2922 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -28,6 +28,7 @@ obj-y += pirq_routing.o
obj-y += relocate.o
obj-y += physmem.o
obj-$(CONFIG_X86_RAMTEST) += ramtest.o
+obj-y += sections.o
obj-y += sfi.o
obj-y += string.o
ifndef CONFIG_QEMU
diff --git a/arch/x86/lib/sections.c b/arch/x86/lib/sections.c
new file mode 100644
index 0000000..6455e0f
--- /dev/null
+++ b/arch/x86/lib/sections.c
@@ -0,0 +1,12 @@
+/*
+ * Copyright 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+char __efi_runtime_start[0] __attribute__((section(".__efi_runtime_start")));
+char __efi_runtime_stop[0] __attribute__((section(".__efi_runtime_stop")));
+char __efi_runtime_rel_start[0]
+ __attribute__((section(".__efi_runtime_rel_start")));
+char __efi_runtime_rel_stop[0]
+ __attribute__((section(".__efi_runtime_rel_stop")));