efi: Create a common file for the stub

There is some duplicated code across x86 and ARM even though they have
slightly different implementations.

They both call efi_stub_exit_boot_services() and this function does not
relate to the app, so belongs better outside the general-purpose efi.c
file.

Create a new efi_stub C file containing this function. Leave out the
efi_ prefix since this is obvious from the directory name.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-06-12 07:46:25 -06:00
parent 0b00c34e7c
commit d43aab19fb
7 changed files with 47 additions and 29 deletions

View File

@@ -1697,6 +1697,7 @@ quiet_cmd_u-boot_payload ?= LD $@
cmd_u-boot_payload ?= $(LD) $(LDFLAGS_EFI_PAYLOAD) -o $@ \
-T u-boot-payload.lds $(if $(CONFIG_X86),arch/x86/cpu/call32.o,) \
lib/efi_client/efi.o lib/efi_client/stub_$(EFI_STUB_ARCH).o \
lib/efi_client/stub.o \
u-boot.bin.o $(addprefix arch/$(ARCH)/lib/,$(EFISTUB))
quiet_cmd_u-boot_payload_arm64.efi ?= OBJCOPY $@