From cbe503fbc11f36086482bfd7066c2e36b82f1544 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 23 Aug 2018 08:24:09 -0700 Subject: efi: stub: Pass EFI system table address to U-Boot payload This updates the EFI stub codes to pass UEFI BIOS's system table address to U-Boot payload so that U-Boot can utilize it. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- include/efi.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/efi.h b/include/efi.h index 7e7c1cafc28..63017c86f25 100644 --- a/include/efi.h +++ b/include/efi.h @@ -248,6 +248,7 @@ enum efi_entry_t { EFIET_END, /* Signals this is the last (empty) entry */ EFIET_MEMORY_MAP, EFIET_GOP_MODE, + EFIET_SYS_TABLE, /* Number of entries */ EFIET_MEMORY_COUNT, @@ -338,6 +339,15 @@ struct efi_entry_gopmode { } info[]; }; +/** + * struct efi_entry_systable - system table passed to U-Boot + * + * @sys_table: EFI system table address + */ +struct efi_entry_systable { + efi_physical_addr_t sys_table; +}; + static inline struct efi_mem_desc *efi_get_next_mem_desc( struct efi_entry_memmap *map, struct efi_mem_desc *desc) { -- cgit v1.2.3 From 1fdeacd32c6335acb7bd5f00c3f177013d971d3d Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 23 Aug 2018 08:24:10 -0700 Subject: x86: zimage: Support booting Linux kernel from an EFI payload At present Linux kernel loaded from U-Boot as an EFI payload does not boot. This fills in kernel's boot params structure with the required critical EFI information like system table address and memory map stuff so that kernel can obtain essential data like runtime services and ACPI table to boot. With this patch, now U-Boot as an EFI payload becomes much more practical: it is another option of kernel bootloader, ie, can be a replacement for grub. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- include/efi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/efi.h b/include/efi.h index 63017c86f25..e1854ecd23b 100644 --- a/include/efi.h +++ b/include/efi.h @@ -41,6 +41,9 @@ #define efi_va_end va_end #endif /* __x86_64__ */ +#define EFI32_LOADER_SIGNATURE "EL32" +#define EFI64_LOADER_SIGNATURE "EL64" + struct efi_device_path; typedef struct { -- cgit v1.2.3 From a0913cdf7b7ef1a9f622294cf7a9e97ea9eb72f2 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 23 Aug 2018 08:24:11 -0700 Subject: x86: efi: payload: Turn on acpi in the kernel command line Now that we have full Linux kernel boot support on EFI payload, avoid pass "acpi=off" to the kernel command line. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- include/configs/x86-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index cc621cb942b..f0b027e69c4 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -107,7 +107,7 @@ #define CONFIG_BOOTFILE "bzImage" #define CONFIG_LOADADDR 0x1000000 #define CONFIG_RAMDISK_ADDR 0x4000000 -#ifdef CONFIG_GENERATE_ACPI_TABLE +#if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_EFI_STUB) #define CONFIG_OTHBOOTARGS "othbootargs=\0" #else #define CONFIG_OTHBOOTARGS "othbootargs=acpi=off\0" -- cgit v1.2.3