efi: Create a common efi_main() implementation for the stub

At present x86 and ARM have different implementations, but they are
similar enough that it is not too hard to unify them.

Create a new common function, with arch-specific pieces at the start
(setting up the address to which to copy U-Boot) and end (to jump to
U-Boot).

For now, nothing uses this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-06-12 07:52:09 -06:00
parent 4df2a3f4a1
commit c0c2b1237e
3 changed files with 116 additions and 0 deletions

View File

@@ -473,6 +473,7 @@ static inline struct efi_mem_desc *efi_get_next_mem_desc(
* to U-Boot
* @info_size: Size of the info list @info in bytes
* @next_hdr: Pointer to where to put the next header when adding to the list
* @jump_addr: Address to jump to to start U-Boot
*/
struct efi_priv {
efi_handle_t parent_image;
@@ -496,6 +497,7 @@ struct efi_priv {
struct efi_info_hdr *info;
unsigned int info_size;
void *next_hdr;
ulong jump_addr;
};
/*