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>
This commit is contained in:
Simon Glass 2021-09-24 18:30:20 -06:00 committed by Heinrich Schuchardt
parent 8d76744e50
commit e70be676eb
3 changed files with 33 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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>