Sergii Dmytruk has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83738?usp=email )
Change subject: vendorcode/intel: allow selecting EDK headers manually ......................................................................
vendorcode/intel: allow selecting EDK headers manually
EFI-specific options depend on CONFIG_UDK_BASE which gets set by CONFIG_*_BINDING selected by SOCs. This prevents enabling those options for boards which don't require EDK bindings.
Make version of the bindings freely selectable when SOC doesn't request a specific version and EDK2 payload is used.
This looks somewhat ugly and duplicated because otherwise kconfig will detect a loop in configuration options and refuse to do anything.
Change-Id: I964142ef64967b4c9b329025ebcad701e34a5035 Signed-off-by: Sergii Dmytruk sergii.dmytruk@3mdeb.com --- M src/vendorcode/intel/Kconfig M src/vendorcode/intel/Makefile.mk 2 files changed, 44 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/83738/1
diff --git a/src/vendorcode/intel/Kconfig b/src/vendorcode/intel/Kconfig index 69fbc00..7d34308 100644 --- a/src/vendorcode/intel/Kconfig +++ b/src/vendorcode/intel/Kconfig @@ -23,6 +23,41 @@ def_bool n select UDK_BASE
+# The version is user-configurable only if SOC didn't requests a specific one. +# In that case, it can be useful to have these headers to enable EFI-specific +# options when EDK2 payload is in use. +if !UEFI_2_4_BINDING && \ + !UDK_2017_BINDING && \ + !UDK_202005_BINDING && \ + !UDK_202111_BINDING && \ + !UDK_202302_BINDING && \ + PAYLOAD_EDK2 + +choice + prompt "Set of UEFI headers to use" + +config USE_NO_UEFI_BINDING + bool "None" +config USE_UEFI_2_4_BINDING + bool "UEFI 2.4" + select UDK_BASE +config USE_UDK_2017_BINDING + bool "UDK 2017" + select UDK_BASE +config USE_UDK_202005_BINDING + bool "UDK 202005" + select UDK_BASE +config USE_UDK_202111_BINDING + bool "UDK 202111" + select UDK_BASE +config USE_UDK_202302_BINDING + bool "UDK 202302" + select UDK_BASE + +endchoice + +endif + if UDK_BASE config UDK_2013_VERSION int @@ -46,10 +81,10 @@
config UDK_VERSION int - default 202302 if UDK_202302_BINDING - default 202111 if UDK_202111_BINDING - default 202005 if UDK_202005_BINDING - default 2017 if UDK_2017_BINDING + default 202302 if UDK_202302_BINDING || USE_UDK_202302_BINDING + default 202111 if UDK_202111_BINDING || USE_UDK_202111_BINDING + default 202005 if UDK_202005_BINDING || USE_UDK_202005_BINDING + default 2017 if UDK_2017_BINDING || USE_UDK_2017_BINDING default 2013 help UEFI Development Kit version for Platform diff --git a/src/vendorcode/intel/Makefile.mk b/src/vendorcode/intel/Makefile.mk index 67c7210..6aea9ad 100644 --- a/src/vendorcode/intel/Makefile.mk +++ b/src/vendorcode/intel/Makefile.mk @@ -1,6 +1,6 @@ ## SPDX-License-Identifier: GPL-2.0-only
-ifeq ($(CONFIG_UEFI_2_4_BINDING),y) +ifeq ($(CONFIG_UEFI_2_4_BINDING)$(CONFIG_USE_UEFI_2_4_BINDING),y) # ProccessorBind.h provided in Ia32 directory. Types are derived from ia32. # It's possible to provide our own ProcessorBind.h using posix types. However, # ProcessorBind.h isn't just about types. There's compiler definitions as well @@ -9,24 +9,24 @@ CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/Ia32 CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include -else ifeq ($(CONFIG_UDK_2017_BINDING),y) +else ifeq ($(CONFIG_UDK_2017_BINDING)$(CONFIG_USE_UDK_2017_BINDING),y) CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Ia32 CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/IntelFsp2Pkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/UDK2017/MdeModulePkg/Include -else ifeq ($(CONFIG_UDK_202005_BINDING),y) +else ifeq ($(CONFIG_UDK_202005_BINDING)$(CONFIG_USE_UDK_202005_BINDING),y) CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/Ia32 CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/IntelFsp2Pkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202005/MdeModulePkg/Include -else ifeq ($(CONFIG_UDK_202111_BINDING),y) +else ifeq ($(CONFIG_UDK_202111_BINDING)$(CONFIG_USE_UDK_202111_BINDING),y) CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/edk2-stable202111/MdePkg/Include/Ia32 CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/edk2-stable202111/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202111/MdePkg/Include CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202111/IntelFsp2Pkg/Include -else ifeq ($(CONFIG_UDK_202302_BINDING),y) +else ifeq ($(CONFIG_UDK_202302_BINDING)$(CONFIG_USE_UDK_202302_BINDING),y) CPPFLAGS_x86_32 += -I$(src)/vendorcode/intel/edk2/edk2-stable202302/MdePkg/Include/Ia32 CPPFLAGS_x86_64 += -I$(src)/vendorcode/intel/edk2/edk2-stable202302/MdePkg/Include/X64 CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/edk2-stable202302/MdePkg/Include