diff options
Diffstat (limited to 'OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc')
-rw-r--r-- | OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc index 03bdbf4..bc4935e 100644 --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc @@ -25,6 +25,11 @@ FLASH_DEFINITION = OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf
#
+ # Option to enable PEI booting.
+ #
+ DEFINE RISCVVIRT_PEI_BOOTING = FALSE
+
+ #
# Enable below options may cause build error or may not work on
# the initial version of RISC-V package
# Defines for default states. These can be changed on the command line.
@@ -72,6 +77,9 @@ !endif
[BuildOptions]
+!if $(RISCVVIRT_PEI_BOOTING) == TRUE
+ GCC:*_*_*_CC_FLAGS = -DRISCVVIRT_PEI_BOOTING
+!endif
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
!ifdef $(SOURCE_DEBUG_ENABLE)
GCC:*_*_RISCV64_GENFW_FLAGS = --keepexceptiontable
@@ -92,6 +100,8 @@ !include MdePkg/MdeLibs.dsc.inc
[LibraryClasses.common]
+ PlatformSecLib|OvmfPkg/RiscVVirt/Library/PlatformSecLib/PlatformSecLib.inf
+
# Virtio Support
VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
@@ -172,7 +182,6 @@ ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.
# It could be set FALSE to save size.
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
@@ -295,15 +304,29 @@ #
# SEC Phase modules
#
- OvmfPkg/RiscVVirt/Sec/SecMain.inf {
+!if $(RISCVVIRT_PEI_BOOTING) == TRUE
+ UefiCpuPkg/SecCore/SecCoreNative.inf
+ OvmfPkg/RiscVVirt/PlatformPei/PlatformPeim.inf
+ MdeModulePkg/Core/Pei/PeiMain.inf
+ MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
+ <LibraryClasses>
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ }
+ MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
+ MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
+ <LibraryClasses>
+ NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
+ }
+!else
+ UefiCpuPkg/SecCore/SecCoreNative.inf {
<LibraryClasses>
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
- LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
- PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
+ NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
PrePiHobListPointerLib|OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
}
+!endif
#
# DXE
|