efi: Switch x86 and ARM to use the unified stub

Now that the stub code is unified, switch over to it, dropping the
individual efi_main() functions.

Series-to: concept
Cover-letter:
efi: Unify the scripts and start-up code
We have two scripts which run QEMU, one for EFI and one for bare metal.
They have similar options so it seems reasonable to try to unify them a
bit. This series creates a common file and adjusts arguments so they are
consistent across both scripts.

The EFI app for ARM and x86 have different start-up code but in fact
the code is quiet similar. This series creates a new common main
program, called efi_main_common() which is used for both architectures.
The small number of differences are handled in arch-specific code.
END
This commit is contained in:
Simon Glass
2025-06-12 07:39:27 -06:00
parent c3c7d368a0
commit 5209eaf9e5
4 changed files with 3 additions and 18 deletions

View File

@@ -120,9 +120,6 @@ efi_status_t arch_efi_main_init(struct efi_priv *priv,
*/
void arch_efi_jump_to_payload(struct efi_priv *priv);
efi_status_t EFIAPI efi_main_common(efi_handle_t image,
struct efi_system_table *sys_table);
/* true if we must use the hardware UART directory (EFI not available) */
extern bool use_hw_uart;

View File

@@ -128,13 +128,13 @@ static void efi_copy_code(struct efi_priv *priv)
}
/**
* efi_main_common() - Start an EFI image
* efi_main() - Start an EFI image
*
* This function is called by our EFI start-up code. It handles running
* U-Boot. If it returns, EFI will continue.
*/
efi_status_t EFIAPI efi_main_common(efi_handle_t image,
struct efi_system_table *sys_table)
efi_status_t EFIAPI efi_main(efi_handle_t image,
struct efi_system_table *sys_table)
{
struct efi_priv local_priv, *priv = &local_priv;
struct efi_boot_services *boot = sys_table->boottime;

View File

@@ -74,9 +74,3 @@ void arch_efi_jump_to_payload(struct efi_priv *priv)
((func_t)priv->jump_addr)((phys_addr_t)priv->info, 0, 0, 0);
}
efi_status_t EFIAPI efi_main(efi_handle_t image,
struct efi_system_table *sys_table)
{
return efi_main_common(image, sys_table);
}

View File

@@ -220,9 +220,3 @@ void arch_efi_jump_to_payload(struct efi_priv *priv)
{
jump_to_uboot(priv->x86_cs32, priv->jump_addr, (ulong)priv->info);
}
efi_status_t EFIAPI efi_main(efi_handle_t image,
struct efi_system_table *sys_table)
{
return efi_main_common(image, sys_table);
}