summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_runtime.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-25 15:27:35 -0600
committerAlexander Graf <agraf@suse.de>2016-10-19 09:01:53 +0200
commit65e4c0b168651285adeab66f32f3a14668f3e4bd (patch)
tree8711b3cce722539e32d03ada4a2d994a11f7eb3c /lib/efi_loader/efi_runtime.c
parente275458c2f011a7e66ac01e6558f15f4cf4972f9 (diff)
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 'lib/efi_loader/efi_runtime.c')
-rw-r--r--lib/efi_loader/efi_runtime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index f73e6d97cb..f007ca640a 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -44,6 +44,10 @@ static efi_status_t EFI_RUNTIME_TEXT EFIAPI efi_invalid_parameter(void);
#elif defined(CONFIG_ARM)
#define R_RELATIVE 23
#define R_MASK 0xffULL
+#elif defined(CONFIG_X86)
+#include <asm/elf.h>
+#define R_RELATIVE R_386_RELATIVE
+#define R_MASK 0xffULL
#else
#error Need to add relocation awareness
#endif