summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-09-25 03:30:20 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-10-21 04:46:03 +0300
commite70be676ebc718b7d12caf56b24e8db383ccee62 (patch)
treee538f5edfd9e5f4395766fa2325421c812f840e4 /arch/x86
parent8d76744e50115ee4fa94ace1f15103b0d1cfe3fb (diff)
downloadu-boot-e70be676ebc718b7d12caf56b24e8db383ccee62.tar.xz
x86: Create a new header for EFI
The setup routines are called from zimage but don't really belong in the zimage header. Add a new EFI header to house these. Add comments so it is clear what the functions do. Note that these functions are x86-specific. The zimage business is not used on other architectures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/efi.h32
-rw-r--r--arch/x86/include/asm/zimage.h3
-rw-r--r--arch/x86/lib/zimage.c1
3 files changed, 33 insertions, 3 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
new file mode 100644
index 0000000000..c1735e4dc5
--- /dev/null
+++ b/arch/x86/include/asm/efi.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright Google LLC
+ */
+
+#ifndef _ASM_EFI_H_
+#define _ASM_EFI_H_
+
+struct efi_info;
+struct screen_info;
+
+/**
+ * setup_video() - Set up the screen info in the x86 setup
+ *
+ * This is needed so Linux can use the display (when U-Boot is an EFI payload)
+ *
+ * @efi_info: Pointer to place to put the screen info in the x86 setup base
+ */
+void setup_video(struct screen_info *screen_info);
+
+/**
+ * setup_efi_info() - Set up the EFI info needed by Linux to boot
+ *
+ * This writes a suitable signature, table pointers, memory-map pointer, etc.
+ * These are needed for Linux to boot from U-Boot (when U-Boot is an EFI
+ * payload).
+ *
+ * @efi_info: Pointer to place to put the EFI info in the x86 setup base
+ */
+void setup_efi_info(struct efi_info *efi_info);
+
+#endif
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h
index 6679767d16..fa6e7f76e0 100644
--- a/arch/x86/include/asm/zimage.h
+++ b/arch/x86/include/asm/zimage.h
@@ -72,7 +72,4 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
*/
void zimage_dump(struct boot_params *base_ptr);
-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 9938c80a42..7ce02226ef 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -29,6 +29,7 @@
#include <asm/byteorder.h>
#include <asm/bootm.h>
#include <asm/bootparam.h>
+#include <asm/efi.h>
#include <asm/global_data.h>
#ifdef CONFIG_SYS_COREBOOT
#include <asm/arch/timestamp.h>