Lean Sheng Tan has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73905 )
Change subject: drivers/efi: Fix linker error when SMM phase uses option API ......................................................................
drivers/efi: Fix linker error when SMM phase uses option API
For security reasons, removing the efivars implementation of the option API was considered. However, this use-case is not the "None" option-backend (CONFIG_OPTION_BACKEND_NONE), so the SMM phase also does not use the no-op in option.h. This causes linker errors when the option API is called.
For example, src/soc/intel/common/block/pmc/pmclib.c and src/console/init.c use `get_uint_option`.
Minimising code in SMM can be implemented as a follow-up.
Change-Id: Ief3b52965d8fde141c12266a716f254dd45559d5 Signed-off-by: Benjamin Doron benjamin.doron@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/73905 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Lean Sheng Tan sheng.tan@9elements.com --- M src/drivers/efi/Makefile.inc 1 file changed, 26 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Lean Sheng Tan: Looks good to me, approved
diff --git a/src/drivers/efi/Makefile.inc b/src/drivers/efi/Makefile.inc index e2251b2..2597c09 100644 --- a/src/drivers/efi/Makefile.inc +++ b/src/drivers/efi/Makefile.inc @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only
all-$(CONFIG_DRIVERS_EFI_VARIABLE_STORE) += efivars.c +smm-$(CONFIG_DRIVERS_EFI_VARIABLE_STORE) += efivars.c
all-$(CONFIG_USE_UEFI_VARIABLE_STORE) += option.c +smm-$(CONFIG_USE_UEFI_VARIABLE_STORE) += option.c