|
@@ -32,11 +32,12 @@
|
|
|
DEFINE SIO_BUS_ENABLE = FALSE
|
|
|
DEFINE UNIVERSAL_PAYLOAD = FALSE
|
|
|
DEFINE SECURITY_STUB_ENABLE = TRUE
|
|
|
+ DEFINE SMM_SUPPORT = FALSE
|
|
|
#
|
|
|
# SBL: UEFI payload for Slim Bootloader
|
|
|
# COREBOOT: UEFI payload for coreboot
|
|
|
#
|
|
|
- DEFINE BOOTLOADER = SBL
|
|
|
+ DEFINE BOOTLOADER = SBL
|
|
|
|
|
|
#
|
|
|
# CPU options
|
|
@@ -90,7 +91,13 @@
|
|
|
#
|
|
|
DEFINE SHELL_TYPE = BUILD_SHELL
|
|
|
|
|
|
- DEFINE EMU_VARIABLE_ENABLE = TRUE
|
|
|
+ #
|
|
|
+ # EMU: UEFI payload with EMU variable
|
|
|
+ # SPI: UEFI payload with SPI NV variable support
|
|
|
+ # NONE: UEFI payload with no variable modules
|
|
|
+ #
|
|
|
+ DEFINE VARIABLE_SUPPORT = EMU
|
|
|
+
|
|
|
DEFINE DISABLE_RESET_SYSTEM = FALSE
|
|
|
DEFINE NETWORK_DRIVER_ENABLE = FALSE
|
|
|
|
|
@@ -241,10 +248,18 @@
|
|
|
LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
|
|
|
FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
|
|
|
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
|
|
|
+!if $(VARIABLE_SUPPORT) == "EMU"
|
|
|
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
|
|
|
+!elseif $(VARIABLE_SUPPORT) == "SPI"
|
|
|
+ PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
|
|
|
+ TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
|
|
|
+ S3BootScriptLib|MdePkg/Library/BaseS3BootScriptLibNull/BaseS3BootScriptLibNull.inf
|
|
|
+ MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
|
|
|
+!endif
|
|
|
VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
|
|
|
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
|
|
|
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
|
|
|
+ VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
|
|
|
|
|
|
[LibraryClasses.common.SEC]
|
|
|
HobLib|UefiPayloadPkg/Library/PayloadEntryHobLib/HobLib.inf
|
|
@@ -262,7 +277,6 @@
|
|
|
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
|
|
|
!endif
|
|
|
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
|
|
|
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
|
|
|
|
|
|
[LibraryClasses.common.DXE_DRIVER]
|
|
|
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
@@ -274,7 +288,6 @@
|
|
|
!endif
|
|
|
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
|
|
|
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
|
|
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
|
|
|
|
|
|
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
|
|
|
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
@@ -287,6 +300,37 @@
|
|
|
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
|
|
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
|
|
|
|
|
|
+[LibraryClasses.common.SMM_CORE]
|
|
|
+!if $(SMM_SUPPORT) == TRUE
|
|
|
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
|
+ SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
|
|
|
+
|
|
|
+ MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf
|
|
|
+ SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
|
|
|
+ SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
|
|
|
+ ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
|
|
|
+!endif
|
|
|
+
|
|
|
+[LibraryClasses.common.DXE_SMM_DRIVER]
|
|
|
+!if $(SMM_SUPPORT) == TRUE
|
|
|
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
|
+
|
|
|
+ MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
|
|
|
+ SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
|
|
|
+ SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
|
|
|
+ MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf
|
|
|
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
|
|
+ SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf
|
|
|
+ SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
|
|
|
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
|
|
|
+ ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
|
|
|
+!endif
|
|
|
+!if $(VARIABLE_SUPPORT) == "SPI"
|
|
|
+ SpiFlashLib|UefiPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
|
|
|
+ FlashDeviceLib|UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
|
|
|
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
|
|
|
+!endif
|
|
|
+
|
|
|
################################################################################
|
|
|
#
|
|
|
# Pcd Section - list of all EDK II PCD Entries defined by this Platform.
|
|
@@ -300,15 +344,17 @@
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE
|
|
|
+ gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
|
|
|
|
|
|
[PcdsFixedAtBuild]
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000
|
|
|
- #
|
|
|
- # Make VariableRuntimeDxe work at emulated non-volatile variable mode.
|
|
|
- #
|
|
|
- gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
|
|
|
+!if $(VARIABLE_SUPPORT) == "EMU"
|
|
|
+ gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable |TRUE
|
|
|
+!else
|
|
|
+ gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable |FALSE
|
|
|
+!endif
|
|
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
|
|
@@ -319,6 +365,7 @@
|
|
|
!if $(SOURCE_DEBUG_ENABLE)
|
|
|
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
|
|
|
!endif
|
|
|
+ gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
|
|
|
|
|
|
[PcdsPatchableInModule.X64]
|
|
|
gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
|
|
@@ -390,6 +437,14 @@
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
|
|
|
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
|
|
|
+!if $(VARIABLE_SUPPORT) == "SPI"
|
|
|
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize |0
|
|
|
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0
|
|
|
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize |0
|
|
|
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase |0
|
|
|
+!endif
|
|
|
+ # Disable SMM S3 script
|
|
|
+ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
|
|
|
|
|
|
## This PCD defines the video horizontal resolution.
|
|
|
# This PCD could be set to 0 then video resolution could be at highest resolution.
|
|
@@ -579,6 +634,36 @@
|
|
|
!endif
|
|
|
UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutputDxe.inf
|
|
|
|
|
|
+ #
|
|
|
+ # SMM Support
|
|
|
+ #
|
|
|
+!if $(SMM_SUPPORT) == TRUE
|
|
|
+ UefiPayloadPkg/SmmAccessDxe/SmmAccessDxe.inf
|
|
|
+ UefiPayloadPkg/SmmControlRuntimeDxe/SmmControlRuntimeDxe.inf
|
|
|
+ UefiPayloadPkg/BlSupportSmm/BlSupportSmm.inf
|
|
|
+ MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
|
|
+ MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
|
|
+ UefiPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
|
|
|
+ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
|
|
|
+ UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
|
|
|
+!endif
|
|
|
+
|
|
|
+!if $(VARIABLE_SUPPORT) == "EMU"
|
|
|
+ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
|
|
+!elseif $(VARIABLE_SUPPORT) == "SPI"
|
|
|
+ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
|
|
|
+ <LibraryClasses>
|
|
|
+ NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
|
|
|
+ NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
|
|
|
+ NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
|
|
|
+ NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf
|
|
|
+ }
|
|
|
+
|
|
|
+ UefiPayloadPkg/FvbRuntimeDxe/FvbSmm.inf
|
|
|
+ MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
|
|
|
+ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
|
|
|
+!endif
|
|
|
+
|
|
|
#------------------------------
|
|
|
# Build the shell
|
|
|
#------------------------------
|