All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map
@ 2018-08-23 15:24 Bin Meng
  2018-08-23 15:24 ` [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload Bin Meng
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Bin Meng @ 2018-08-23 15:24 UTC (permalink / raw)
  To: u-boot

This implements payload-specific install_e820_map() to get E820 map
from the EFI memory map descriptors.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/cpu/efi/payload.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 4649bfe..0e7c7c1 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -8,6 +8,7 @@
 #include <efi.h>
 #include <errno.h>
 #include <usb.h>
+#include <asm/e820.h>
 #include <asm/post.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -168,3 +169,84 @@ int last_stage_init(void)
 
 	return 0;
 }
+
+unsigned int install_e820_map(unsigned int max_entries,
+			      struct e820_entry *entries)
+{
+	struct efi_mem_desc *desc, *end;
+	struct efi_entry_memmap *map;
+	int size, ret;
+	efi_physical_addr_t last_end_addr = 0;
+	struct e820_entry *last_entry = NULL;
+	__u32 e820_type;
+	unsigned int num_entries = 0;
+
+	ret = efi_info_get(EFIET_MEMORY_MAP, (void **)&map, &size);
+	if (ret) {
+		printf("Cannot find EFI memory map tables, ret=%d\n", ret);
+
+		return -ENODEV;
+	}
+
+	end = (struct efi_mem_desc *)((ulong)map + size);
+	for (desc = map->desc; desc < end;
+	     desc = efi_get_next_mem_desc(map, desc)) {
+		if (desc->num_pages == 0)
+			continue;
+
+		switch (desc->type) {
+		case EFI_LOADER_CODE:
+		case EFI_LOADER_DATA:
+		case EFI_BOOT_SERVICES_CODE:
+		case EFI_BOOT_SERVICES_DATA:
+		case EFI_CONVENTIONAL_MEMORY:
+			e820_type = E820_RAM;
+			break;
+
+		case EFI_RESERVED_MEMORY_TYPE:
+		case EFI_RUNTIME_SERVICES_CODE:
+		case EFI_RUNTIME_SERVICES_DATA:
+		case EFI_MMAP_IO:
+		case EFI_MMAP_IO_PORT:
+		case EFI_PAL_CODE:
+			e820_type = E820_RESERVED;
+			break;
+
+		case EFI_ACPI_RECLAIM_MEMORY:
+			e820_type = E820_ACPI;
+			break;
+
+		case EFI_ACPI_MEMORY_NVS:
+			e820_type = E820_NVS;
+			break;
+
+		case EFI_UNUSABLE_MEMORY:
+			e820_type = E820_UNUSABLE;
+			break;
+
+		default:
+			printf("Invalid EFI memory descriptor type (0x%x)!\n",
+			       desc->type);
+			continue;
+		}
+
+		if (last_entry != NULL && last_entry->type == e820_type &&
+		    desc->physical_start == last_end_addr) {
+			last_entry->size += (desc->num_pages << EFI_PAGE_SHIFT);
+			last_end_addr += (desc->num_pages << EFI_PAGE_SHIFT);
+		} else {
+			if (num_entries >= E820MAX)
+				break;
+
+			entries[num_entries].addr = desc->physical_start;
+			entries[num_entries].size = desc->num_pages;
+			entries[num_entries].size <<= EFI_PAGE_SHIFT;
+			entries[num_entries].type = e820_type;
+			last_entry = &entries[num_entries];
+			last_end_addr = last_entry->addr + last_entry->size;
+			num_entries++;
+		}
+	}
+
+	return num_entries;
+}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload
  2018-08-23 15:24 [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Bin Meng
@ 2018-08-23 15:24 ` Bin Meng
  2018-08-30  0:29   ` Simon Glass
  2018-08-23 15:24 ` [U-Boot] [PATCH 3/4] x86: zimage: Support booting Linux kernel from an EFI payload Bin Meng
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Bin Meng @ 2018-08-23 15:24 UTC (permalink / raw)
  To: u-boot

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 <bmeng.cn@gmail.com>
---

 include/efi.h      | 10 ++++++++++
 lib/efi/efi_stub.c |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/include/efi.h b/include/efi.h
index 41530a7..1dee606 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)
 {
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index 1b495ec..a48d1d7 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -277,6 +277,7 @@ efi_status_t EFIAPI efi_main(efi_handle_t image,
 	struct efi_entry_memmap map;
 	struct efi_gop *gop;
 	struct efi_entry_gopmode mode;
+	struct efi_entry_systable table;
 	efi_guid_t efi_gop_guid = EFI_GOP_GUID;
 	efi_uintn_t key, desc_size, size;
 	efi_status_t ret;
@@ -335,6 +336,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t image,
 		return ret;
 	}
 
+	table.sys_table = (efi_physical_addr_t)sys_table;
+	add_entry_addr(priv, EFIET_SYS_TABLE, &table, sizeof(table), NULL, 0);
+
 	ret = boot->exit_boot_services(image, key);
 	if (ret) {
 		/*
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/4] x86: zimage: Support booting Linux kernel from an EFI payload
  2018-08-23 15:24 [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Bin Meng
  2018-08-23 15:24 ` [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload Bin Meng
@ 2018-08-23 15:24 ` Bin Meng
  2018-08-30  0:29   ` Simon Glass
  2018-08-23 15:24 ` [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line Bin Meng
  2018-08-30  0:29 ` [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Simon Glass
  3 siblings, 1 reply; 13+ messages in thread
From: Bin Meng @ 2018-08-23 15:24 UTC (permalink / raw)
  To: u-boot

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 <bmeng.cn@gmail.com>
---

 arch/x86/cpu/efi/payload.c    | 37 +++++++++++++++++++++++++++++++++++++
 arch/x86/include/asm/zimage.h |  1 +
 arch/x86/lib/zimage.c         |  4 ++++
 include/efi.h                 |  3 +++
 4 files changed, 45 insertions(+)

diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 0e7c7c1..c323c7b 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -8,6 +8,7 @@
 #include <efi.h>
 #include <errno.h>
 #include <usb.h>
+#include <asm/bootparam.h>
 #include <asm/e820.h>
 #include <asm/post.h>
 
@@ -250,3 +251,39 @@ unsigned int install_e820_map(unsigned int max_entries,
 
 	return num_entries;
 }
+
+void setup_efi_info(struct efi_info *efi_info)
+{
+	struct efi_entry_systable *table;
+	struct efi_entry_memmap *map;
+	char *signature;
+	int size, ret;
+
+	memset(efi_info, 0, sizeof(struct efi_info));
+
+	ret = efi_info_get(EFIET_SYS_TABLE, (void **)&table, &size);
+	if (ret) {
+		printf("Cannot find EFI system table, ret=%d\n", ret);
+		return;
+	}
+	efi_info->efi_systab = (u32)(table->sys_table);
+
+	ret = efi_info_get(EFIET_MEMORY_MAP, (void **)&map, &size);
+	if (ret) {
+		printf("Cannot find EFI memory map tables, ret=%d\n", ret);
+		return;
+	}
+	efi_info->efi_memdesc_size = map->desc_size;
+	efi_info->efi_memdesc_version = map->version;
+	efi_info->efi_memmap = (u32)(map->desc);
+	efi_info->efi_memmap_size = size - sizeof(struct efi_entry_memmap);
+
+#ifdef CONFIG_EFI_STUB_64BIT
+	efi_info->efi_systab_hi = table->sys_table >> 32;
+	efi_info->efi_memmap_hi = (u64)(u32)(map->desc) >> 32;
+	signature = EFI64_LOADER_SIGNATURE;
+#else
+	signature = EFI32_LOADER_SIGNATURE;
+#endif
+	memcpy(&efi_info->efi_loader_signature, signature, 4);
+}
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h
index 03bed54..80e128c 100644
--- a/arch/x86/include/asm/zimage.h
+++ b/arch/x86/include/asm/zimage.h
@@ -35,5 +35,6 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size,
 int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
 		 unsigned long initrd_addr, unsigned long initrd_size);
 void setup_video(struct screen_info *screen_info);
+void setup_efi_info(struct efi_info *efi_info);
 
 #endif
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 04ed972..0442fda 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -295,6 +295,10 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
 	setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0));
 	setup_video(&setup_base->screen_info);
 
+#ifdef CONFIG_EFI_STUB
+	setup_efi_info(&setup_base->efi_info);
+#endif
+
 	return 0;
 }
 
diff --git a/include/efi.h b/include/efi.h
index 1dee606..0d74e70 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 {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line
  2018-08-23 15:24 [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Bin Meng
  2018-08-23 15:24 ` [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload Bin Meng
  2018-08-23 15:24 ` [U-Boot] [PATCH 3/4] x86: zimage: Support booting Linux kernel from an EFI payload Bin Meng
@ 2018-08-23 15:24 ` Bin Meng
  2018-08-30  0:29   ` Simon Glass
  2018-08-30  0:29 ` [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Simon Glass
  3 siblings, 1 reply; 13+ messages in thread
From: Bin Meng @ 2018-08-23 15:24 UTC (permalink / raw)
  To: u-boot

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 <bmeng.cn@gmail.com>
---

 include/configs/x86-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index cc621cb..f0b027e 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"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map
  2018-08-23 15:24 [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Bin Meng
                   ` (2 preceding siblings ...)
  2018-08-23 15:24 ` [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line Bin Meng
@ 2018-08-30  0:29 ` Simon Glass
  2018-08-30  3:28   ` Bin Meng
  3 siblings, 1 reply; 13+ messages in thread
From: Simon Glass @ 2018-08-30  0:29 UTC (permalink / raw)
  To: u-boot

On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> This implements payload-specific install_e820_map() to get E820 map
> from the EFI memory map descriptors.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/efi/payload.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 82 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload
  2018-08-23 15:24 ` [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload Bin Meng
@ 2018-08-30  0:29   ` Simon Glass
  2018-08-30  3:28     ` Bin Meng
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Glass @ 2018-08-30  0:29 UTC (permalink / raw)
  To: u-boot

On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> 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 <bmeng.cn@gmail.com>
> ---
>
>  include/efi.h      | 10 ++++++++++
>  lib/efi/efi_stub.c |  4 ++++
>  2 files changed, 14 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/4] x86: zimage: Support booting Linux kernel from an EFI payload
  2018-08-23 15:24 ` [U-Boot] [PATCH 3/4] x86: zimage: Support booting Linux kernel from an EFI payload Bin Meng
@ 2018-08-30  0:29   ` Simon Glass
  2018-08-30  3:28     ` Bin Meng
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Glass @ 2018-08-30  0:29 UTC (permalink / raw)
  To: u-boot

On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> 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 <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/efi/payload.c    | 37 +++++++++++++++++++++++++++++++++++++
>  arch/x86/include/asm/zimage.h |  1 +
>  arch/x86/lib/zimage.c         |  4 ++++
>  include/efi.h                 |  3 +++
>  4 files changed, 45 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

That's good. I'm not a big fan of grub. It was sort-of OK until I
looked at the code.

- Simon

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line
  2018-08-23 15:24 ` [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line Bin Meng
@ 2018-08-30  0:29   ` Simon Glass
  2018-08-30  2:01     ` Bin Meng
  2018-08-30  3:28     ` Bin Meng
  0 siblings, 2 replies; 13+ messages in thread
From: Simon Glass @ 2018-08-30  0:29 UTC (permalink / raw)
  To: u-boot

On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> Now that we have full Linux kernel boot support on EFI payload,
> avoid pass "acpi=off" to the kernel command line.

Why?

>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  include/configs/x86-common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
> index cc621cb..f0b027e 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"
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line
  2018-08-30  0:29   ` Simon Glass
@ 2018-08-30  2:01     ` Bin Meng
  2018-08-30  3:28     ` Bin Meng
  1 sibling, 0 replies; 13+ messages in thread
From: Bin Meng @ 2018-08-30  2:01 UTC (permalink / raw)
  To: u-boot

Hi Simon,
On Thu, Aug 30, 2018 at 8:29 AM Simon Glass <sjg@chromium.org> wrote:
>
> On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> > Now that we have full Linux kernel boot support on EFI payload,
> > avoid pass "acpi=off" to the kernel command line.
>
> Why?
>

This is due to EFI payload does not have CONFIG_GENERATE_ACPI_TABLE
on, and current logic defaults to "acpi=off" when generating kernel
command line. This is not useful since with EFI payload we are now
passing critical EFI info to kernel so that kernel is able to find
ACPI table on its own.

> >
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> >  include/configs/x86-common.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> >

Regards,
Bin

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map
  2018-08-30  0:29 ` [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Simon Glass
@ 2018-08-30  3:28   ` Bin Meng
  0 siblings, 0 replies; 13+ messages in thread
From: Bin Meng @ 2018-08-30  3:28 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 30, 2018 at 8:29 AM Simon Glass <sjg@chromium.org> wrote:
>
> On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> > This implements payload-specific install_e820_map() to get E820 map
> > from the EFI memory map descriptors.
> >
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> >  arch/x86/cpu/efi/payload.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 82 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload
  2018-08-30  0:29   ` Simon Glass
@ 2018-08-30  3:28     ` Bin Meng
  0 siblings, 0 replies; 13+ messages in thread
From: Bin Meng @ 2018-08-30  3:28 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 30, 2018 at 8:29 AM Simon Glass <sjg@chromium.org> wrote:
>
> On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> > 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 <bmeng.cn@gmail.com>
> > ---
> >
> >  include/efi.h      | 10 ++++++++++
> >  lib/efi/efi_stub.c |  4 ++++
> >  2 files changed, 14 insertions(+)
> >
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/4] x86: zimage: Support booting Linux kernel from an EFI payload
  2018-08-30  0:29   ` Simon Glass
@ 2018-08-30  3:28     ` Bin Meng
  0 siblings, 0 replies; 13+ messages in thread
From: Bin Meng @ 2018-08-30  3:28 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 30, 2018 at 8:29 AM Simon Glass <sjg@chromium.org> wrote:
>
> On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> > 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 <bmeng.cn@gmail.com>
> > ---
> >
> >  arch/x86/cpu/efi/payload.c    | 37 +++++++++++++++++++++++++++++++++++++
> >  arch/x86/include/asm/zimage.h |  1 +
> >  arch/x86/lib/zimage.c         |  4 ++++
> >  include/efi.h                 |  3 +++
> >  4 files changed, 45 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> That's good. I'm not a big fan of grub. It was sort-of OK until I
> looked at the code.

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line
  2018-08-30  0:29   ` Simon Glass
  2018-08-30  2:01     ` Bin Meng
@ 2018-08-30  3:28     ` Bin Meng
  1 sibling, 0 replies; 13+ messages in thread
From: Bin Meng @ 2018-08-30  3:28 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 30, 2018 at 8:29 AM Simon Glass <sjg@chromium.org> wrote:
>
> On 23 August 2018 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote:
> > Now that we have full Linux kernel boot support on EFI payload,
> > avoid pass "acpi=off" to the kernel command line.
>
> Why?
>
> >
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> >  include/configs/x86-common.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-08-30  3:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-23 15:24 [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Bin Meng
2018-08-23 15:24 ` [U-Boot] [PATCH 2/4] efi: stub: Pass EFI system table address to U-Boot payload Bin Meng
2018-08-30  0:29   ` Simon Glass
2018-08-30  3:28     ` Bin Meng
2018-08-23 15:24 ` [U-Boot] [PATCH 3/4] x86: zimage: Support booting Linux kernel from an EFI payload Bin Meng
2018-08-30  0:29   ` Simon Glass
2018-08-30  3:28     ` Bin Meng
2018-08-23 15:24 ` [U-Boot] [PATCH 4/4] x86: efi: payload: Turn on acpi in the kernel command line Bin Meng
2018-08-30  0:29   ` Simon Glass
2018-08-30  2:01     ` Bin Meng
2018-08-30  3:28     ` Bin Meng
2018-08-30  0:29 ` [U-Boot] [PATCH 1/4] x86: efi: payload: Install E820 map from EFI memory map Simon Glass
2018-08-30  3:28   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.