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>
This commit is contained in:
Benjamin Doron 2023-04-09 19:58:05 +00:00 committed by Lean Sheng Tan
parent 199ccf81dd
commit f43132e20c
1 changed files with 2 additions and 0 deletions

View File

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