From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mx.groups.io with SMTP id smtpd.web08.1951.1662484238141126940 for ; Tue, 06 Sep 2022 10:10:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=A7GPhTSY; spf=pass (domain: ventanamicro.com, ip: 209.85.215.171, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pg1-f171.google.com with SMTP id 78so11173603pgb.13 for ; Tue, 06 Sep 2022 10:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=ZWjrv/9uhTS+YGmlVubh+l0B+vf3v3fh9IrDQd/f8iU=; b=A7GPhTSYw8pv/4Yu+RoVf+chEhAo9qfi6MAbUvH/dxdtsAtHO1Trrr+svnyqdLkBNE g3PbGvl4PDi5WAH9L/Xd0zGQSdq/ct1DrlPGCWcAzD44aT/JSitIDaNToxOJRZsLQW6M I4Bs2NtlO9pD5KBLLQTEYSulm0L+9YXsmsL4qgZAMKmr+PGRbp6xLyQ2dZOGTI5tPaC8 dGrazCjGMiFKDicgDRsEcgWDH5eGNDKAUcs2Ebmuam+n8u83x0MS/W3p1HKaO651Dihn Stmxxmqgj4q2SQPCFNNQzOCdIblBZiFU2b+JQBewZunjdiogYCHrdsrf7O8lPiqaWmxG 3cUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=ZWjrv/9uhTS+YGmlVubh+l0B+vf3v3fh9IrDQd/f8iU=; b=PCSdd1Jt68hPg0i5El5DHqwEBfpPKNIUzeWNXWY8LtyLqK6jJJvD8YqoqGd/CDetrV 8K/e9tXxKFvBMsjCjKqIPDjSxuDUrbH7xBges/RyN/QdVblkQdPWpuxW6QqutdV87ne8 +aEb9eDq33B1+zfOrF0pXV3WZufQCs35bAugZZ6hzwn7pHw6+jB8/PEBefr1vQ0gzGcd 0yGTfYSKzYRIoQQP/MAtEggMpR1NDnmWEHp5bR/14EmhLzAM2GRA/TPT1LyNM+zQVOG5 GhdV6OnQvc3GSc9q4lblxZPOGmsZz+xtyieCZZsUtb7Q7TlOkxk1rMDdzAngwGrKdBES CS7w== X-Gm-Message-State: ACgBeo29aXbCTVKpMTwrK6PXi6pGV4lDzb1twkPSobiIOyClOCOGt1iQ Gt/yxgegk3qXhdmjoCIaklBRvdRmn7Reuoy+ X-Google-Smtp-Source: AA6agR5kjyzaL1ntc1DlpvzmTs7vj5G/PfHRzOsgJBFtuPfd44ElV4wyyW7vRpHCAoXvYa/B8Nhucw== X-Received: by 2002:a65:6b8f:0:b0:42b:77c3:9564 with SMTP id d15-20020a656b8f000000b0042b77c39564mr46076871pgw.91.1662484236735; Tue, 06 Sep 2022 10:10:36 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.11.92]) by smtp.gmail.com with ESMTPSA id y10-20020a17090322ca00b0016b865ea2ddsm10324327plg.85.2022.09.06.10.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 10:10:36 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao , Eric Dong , Ray Ni , Rahul Kumar , Debkumar De , Catharine West , Daniel Schaefer , Abner Chang , Leif Lindholm , Ard Biesheuvel , Heinrich Schuchardt , Anup Patel , Sunil V L Subject: [RFC PATCH 1/2] RISC-V: Add Qemu Virt platform support Date: Tue, 6 Sep 2022 22:40:19 +0530 Message-Id: <20220906171020.491573-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Add build infrastructure files to boot qemu virt machine. EDK2 will boot as S-mode payload of opensbi. There is no integrated opensbi (M-mode firmware) within EDK2 for virt machine. It relies on the RISC-V calling convention that M-mode firmware like opensbi will pass the BootHartId and the DTB to EDK2. This helps to simplify the platform specific PCD variables required. It can parse the DTB to know all the details. Even for future ACPI support, EDK2 can parse the DTB to create static tables. Signed-off-by: Sunil V L --- Platform/Qemu/RiscVVirt/RiscVVirt.dsc | 713 ++++++++++++++++++++++ Platform/Qemu/RiscVVirt/RiscVVirt.fdf | 379 ++++++++++++ Platform/Qemu/RiscVVirt/RiscVVirt.fdf.inc | 49 ++ Platform/Qemu/RiscVVirt/VarStore.fdf.inc | 79 +++ 4 files changed, 1220 insertions(+) create mode 100644 Platform/Qemu/RiscVVirt/RiscVVirt.dsc create mode 100644 Platform/Qemu/RiscVVirt/RiscVVirt.fdf create mode 100644 Platform/Qemu/RiscVVirt/RiscVVirt.fdf.inc create mode 100644 Platform/Qemu/RiscVVirt/VarStore.fdf.inc diff --git a/Platform/Qemu/RiscVVirt/RiscVVirt.dsc b/Platform/Qemu/RiscVVir= t/RiscVVirt.dsc new file mode 100644 index 0000000000..3bd030fb87 --- /dev/null +++ b/Platform/Qemu/RiscVVirt/RiscVVirt.dsc @@ -0,0 +1,713 @@ +## @file=0D +# RISC-V EFI on RiscVVirt RISC-V platform=0D +#=0D +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
= =0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +##########################################################################= ######=0D +#=0D +# Defines Section - statements that will be processed to create a Makefile= .=0D +#=0D +##########################################################################= ######=0D +[Defines]=0D + PLATFORM_NAME =3D RiscVVirt=0D + PLATFORM_GUID =3D 39DADB39-1B21-4867-838E-830B6149B9E0= =0D + PLATFORM_VERSION =3D 0.1=0D + DSC_SPECIFICATION =3D 0x0001001c=0D + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME)=0D + SUPPORTED_ARCHITECTURES =3D RISCV64=0D + BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT=0D + SKUID_IDENTIFIER =3D DEFAULT=0D + FLASH_DEFINITION =3D Platform/Qemu/RiscVVirt/RiscVVirt.fdf= =0D +=0D + #=0D + # Enable below options may cause build error or may not work on=0D + # the initial version of RISC-V package=0D + # Defines for default states. These can be changed on the command line.= =0D + # -D FLAG=3DVALUE=0D + #=0D + DEFINE SECURE_BOOT_ENABLE =3D FALSE=0D + DEFINE DEBUG_ON_SERIAL_PORT =3D TRUE=0D +=0D + #=0D + # Network definition=0D + #=0D + DEFINE NETWORK_SNP_ENABLE =3D FALSE=0D + DEFINE NETWORK_IP6_ENABLE =3D FALSE=0D + DEFINE NETWORK_TLS_ENABLE =3D TRUE=0D + DEFINE NETWORK_HTTP_BOOT_ENABLE =3D TRUE=0D + DEFINE NETWORK_ISCSI_ENABLE =3D FALSE=0D + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS =3D TRUE=0D +=0D +[BuildOptions]=0D + GCC:RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + GCC:*_*_RISCV64_GENFW_FLAGS =3D --keepexceptiontable=0D +!endif=0D +=0D +[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]=0D + GCC: *_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000=0D + MSFT: *_*_*_DLINK_FLAGS =3D /ALIGN:4096=0D +=0D +##########################################################################= ######=0D +#=0D +# SKU Identification section - list of all SKU IDs supported by this Platf= orm.=0D +#=0D +##########################################################################= ######=0D +[SkuIds]=0D + 0|DEFAULT=0D +=0D +##########################################################################= ######=0D +#=0D +# Library Class section - list of all Library Classes needed by this Platf= orm.=0D +#=0D +##########################################################################= ######=0D +=0D +!include MdePkg/MdeLibs.dsc.inc=0D +=0D +[LibraryClasses]=0D + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf=0D + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf=0D + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf=0D + SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf=0D + SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniza= tionLib.inf=0D + CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf=0D + PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibN= ull.inf=0D + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf=0D + CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMain= tenanceLib.inf=0D + UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompres= sLib.inf=0D + UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServic= esLib.inf=0D + HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf=0D + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf= =0D + DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf=0D + DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableL= ib.inf=0D + PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf=0D + IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf=0D + OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf=0D + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPort= Lib16550.inf=0D + PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf=0D + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf=0D + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBoo= tServicesTableLib.inf=0D + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf=0D + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf=0D + UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiA= pplicationEntryPoint.inf=0D + DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDev= icePathLibDevicePathProtocol.inf=0D + FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf=0D + SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeS= ecurityManagementLib.inf=0D + UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf=0D + CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf=0D + SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf=0D + VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseV= ariableFlashInfoLib.inf=0D + UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf=0D + VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ibRuntimeDxe.inf=0D + FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf=0D + VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/Var= iablePolicyHelperLib.inf=0D + TimerLib|MdePkg/Library/ArchTimerLib/ArchTimerLib.inf=0D + TimeBaseLib|EmbeddedPkg//Library/TimeBaseLib/TimeBaseLib.inf=0D + RealTimeClockLib|EmbeddedPkg//Library/VirtualRealTimeClockLib/VirtualRea= lTimeClockLib.inf=0D + NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.i= nf=0D +=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDeb= ug/PeCoffExtraActionLibDebug.inf=0D + DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibS= erialPort/DebugCommunicationLibSerialPort.inf=0D +!else=0D + PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf=0D + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.i= nf=0D +!endif=0D +=0D + DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf=0D +=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf=0D + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf=0D + TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf=0D + AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf= =0D +!else=0D + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf=0D + AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf=0D +!endif=0D + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf=0D +=0D +!if $(HTTP_BOOT_ENABLE) =3D=3D TRUE=0D + HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf=0D +!endif=0D +=0D +# ACPI not supported yet.=0D + SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf=0D + OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib= /BaseOrderedCollectionRedBlackTreeLib.inf=0D +=0D +[LibraryClasses.common]=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf=0D +!endif=0D +=0D + RiscVSbiLib|MdePkg/Library/RiscVSbiLib/RiscVSbiLib.inf=0D + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuE= xceptionHandlerLib.inf=0D +=0D + # PCI Libraries=0D + PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf=0D + PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf=0D + PciCapLib|OvmfPkg/Library/BasePciCapLib/BasePciCapLib.inf=0D + PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapPc= iSegmentLib.inf=0D + PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.inf= =0D + DxeHardwareInfoLib|OvmfPkg/Library/HardwareInfoLib/DxeHardwareInfoLib.in= f=0D +=0D + # Virtio Support=0D + VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf=0D + VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice= Lib.inf=0D + QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf=0D + QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf= =0D + QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFw= CfgSimpleParserLib.inf=0D + QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoad= ImageLib.inf=0D +=0D + # PCI support=0D + PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.i= nf=0D + PciHostBridgeLib|MdeModulePkg/Library/PciHostBridgeLibNull/PciHostBridge= LibNull.inf=0D +=0D + # Boot Manager=0D +!if $(TPM2_ENABLE) =3D=3D TRUE=0D + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf=0D + Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeT= cg2PhysicalPresenceLib.inf=0D + TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf=0D + TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi= b/PeiDxeTpmPlatformHierarchyLib.inf=0D +!else=0D + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf=0D + TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi= bNull/PeiDxeTpmPlatformHierarchyLib.inf=0D +!endif=0D +=0D + BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf=0D + PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrin= tScLib.inf=0D +=0D + # TODO: This would need to be made common for RISC-V and ARM or need to = copied=0D + PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/Platfor= mBootManagerLib.inf=0D +=0D + FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltL= ib.inf=0D + QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf=0D + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf= =0D +=0D +[LibraryClasses.common.SEC]=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D +=0D + ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf=0D + ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseE= xtractGuidedSectionLib.inf=0D +=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib= .inf=0D +!endif=0D +=0D + MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf=0D + PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.= inf=0D + HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf=0D +=0D +[LibraryClasses.common.PEI_CORE]=0D + HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf=0D + PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/Pei= ServicesTablePointerLib.inf=0D + PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf=0D + MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf=0D + ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf=0D + OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf=0D + PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf=0D + PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf= =0D +=0D +[LibraryClasses.common.PEIM]=0D + HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf=0D + PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/Pei= ServicesTablePointerLib.inf=0D + PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf=0D + MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf=0D + PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf=0D + ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf=0D + OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf=0D + PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf=0D + PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiRe= sourcePublicationLib.inf=0D + ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExt= ractGuidedSectionLib.inf=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib= .inf=0D +!endif=0D +=0D +[LibraryClasses.common.DXE_CORE]=0D + VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf=0D + HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf=0D + DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf= =0D + MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeC= oreMemoryAllocationLib.inf=0D + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D + ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.in= f=0D +!endif=0D +=0D +[LibraryClasses.common.DXE_RUNTIME_DRIVER]=0D + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D + VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf=0D + DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf= =0D + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D + ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf=0D + ResetSystemLib|MdePkg/Library/ResetSystemLib/ResetSystemLib.inf=0D + UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf=0D +!endif=0D + UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf=0D +=0D +[LibraryClasses.common.UEFI_DRIVER]=0D + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf=0D + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D + DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf= =0D + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D + UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf=0D + VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ib.inf=0D + PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExp= ressLib.inf=0D + PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.= inf=0D + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf= =0D + PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostB= ridgeUtilityLib.inf=0D +=0D +[LibraryClasses.common.DXE_DRIVER]=0D + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf=0D + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf=0D + UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.in= f=0D +!endif=0D + UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManag= erLib.inf=0D + PlatformUpdateProgressLib|MdeModulePkg/Library/PlatformBootManagerLibNul= l/PlatformBootManagerLibNull.inf=0D +=0D +[LibraryClasses.common.UEFI_APPLICATION]=0D + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D +!ifdef $(DEBUG_ON_SERIAL_PORT)=0D + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f=0D +!else=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D +!endif=0D + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf=0D +=0D +##########################################################################= ######=0D +#=0D +# Pcd Section - list of all EDK II PCD Entries defined by this Platform.=0D +#=0D +##########################################################################= ######=0D +[PcdsFeatureFlag]=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE=0D +=0D +[PcdsFixedAtBuild]=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FAL= SE=0D + gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE=0D +=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0=0D +=0D + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x02=0D + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17=0D +!else=0D + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F=0D +!endif=0D +=0D +!ifdef $(SOURCE_DEBUG_ENABLE)=0D + gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2=0D +!endif=0D +=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + # override the default values from SecurityPkg to ensure images from all= sources are verified in secure boot=0D + gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04=0D + gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04= =0D + gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0= x04=0D +!endif=0D +=0D + #=0D + # F2 for UI APP=0D + #=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 }=0D +=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"2.7"=0D +=0D + # Serial Port=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x10000000=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|9600=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|3686400=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1=0D +=0D +##########################################################################= ######=0D +#=0D +# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Pla= tform=0D +#=0D +##########################################################################= ######=0D +=0D +[PcdsDynamicDefault]=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600=0D +=0D + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|10=0D +=0D + # Set video resolution for text setup.=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480=0D +=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0208=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0=0D +=0D +##########################################################################= ######=0D +#=0D +# Components Section - list of all EDK II Modules needed by this Platform.= =0D +#=0D +##########################################################################= ######=0D +[Components]=0D +=0D + #=0D + # SEC Phase modules=0D + #=0D + UefiCpuPkg/SecCore/SecCoreRiscV.inf {=0D + =0D + NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompre= ssLib.inf=0D + }=0D +=0D + #=0D + # PEI Phase modules=0D + #=0D + MdeModulePkg/Core/Pei/PeiMain.inf=0D + MdeModulePkg/Universal/PCD/Pei/Pcd.inf {=0D + =0D + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D + }=0D + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouter= Pei.inf=0D + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf=0D + MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {=0D + =0D + NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompress= Lib.inf=0D + }=0D +=0D + MdeModulePkg/Universal/PlatformPei/PlatformPei.inf {=0D + =0D + PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf=0D + PlatformPeiLib|MdePkg/Library/PlatformPeiLib/PlatformPeiLib.inf=0D + }=0D +=0D + #=0D + # DXE Phase modules=0D + #=0D + MdeModulePkg/Core/Dxe/DxeMain.inf {=0D + =0D + NULL|MdeModulePkg//Library/LzmaCustomDecompressLib/LzmaCustomDecompr= essLib.inf=0D + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf= =0D + }=0D +=0D + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCod= eRouterRuntimeDxe.inf=0D + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf=0D +=0D + MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {=0D + =0D + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D + }=0D +=0D + MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf=0D +=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {=0D + =0D + NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificatio= nLib.inf=0D + }=0D +!else=0D + MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf=0D +!endif=0D +=0D + MdeModulePkg/Universal/Metronome/Metronome.inf=0D + EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf=0D +=0D + #=0D + # RISC-V Platform module=0D + #=0D + MdeModulePkg/Universal/TimerDxe/TimerDxe.inf=0D +=0D + #=0D + # TODO: Move this to OvmfPkg?=0D + ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf=0D +=0D + #=0D + # RISC-V Core module=0D + #=0D + UefiCpuPkg/CpuDxe/CpuDxe.inf=0D + MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf=0D +=0D + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf=0D + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {=0D + =0D + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf=0D + }=0D + MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D + MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntim= eDxe.inf=0D + MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf=0D + MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf=0D + MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf=0D +=0D +# Graphic console=0D + MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf= =0D +=0D + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf=0D + MdeModulePkg/Universal/PrintDxe/PrintDxe.inf=0D + MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf=0D + MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf=0D + MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf=0D + MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D + MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=0D + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D + MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.in= f=0D + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D +=0D + #=0D + # Network Support=0D + #=0D + !include NetworkPkg/Network.dsc.inc=0D +=0D + #=0D + # Usb Support=0D + #=0D + MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf=0D + MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf=0D + MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf=0D + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf=0D + MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf=0D + MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf=0D +=0D + #=0D + # PCI support=0D + #=0D + UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf {=0D + =0D + NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf=0D + }=0D + MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf=0D + MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {=0D + =0D + NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf=0D + }=0D + OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf=0D + OvmfPkg/Virtio10Dxe/Virtio10.inf=0D +=0D + #=0D + # Video support=0D + #=0D + OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf=0D + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf=0D + OvmfPkg/PlatformDxe/Platform.inf=0D +=0D + #=0D + # Platform Driver=0D + #=0D + OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf=0D + EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf=0D + OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf=0D + OvmfPkg/VirtioBlkDxe/VirtioBlk.inf=0D + OvmfPkg/VirtioScsiDxe/VirtioScsi.inf=0D + OvmfPkg/VirtioNetDxe/VirtioNet.inf=0D + OvmfPkg/VirtioRngDxe/VirtioRng.inf=0D +=0D + #=0D + # TODO: Move this to OVMF/Generic=0D + #=0D + ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf=0D +=0D + #=0D + # FAT filesystem + GPT/MBR partitioning + UDF filesystem=0D + #=0D + FatPkg/EnhancedFatDxe/Fat.inf=0D + MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf=0D +=0D + OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.in= f {=0D + =0D + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D + =0D + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf=0D + SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf=0D + }=0D +=0D + ShellPkg/Application/Shell/Shell.inf {=0D + =0D + ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellComman= dLib.inf=0D + NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comm= andsLib.inf=0D + NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1Comm= andsLib.inf=0D + NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Comm= andsLib.inf=0D + NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Co= mmandsLib.inf=0D + NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewC= ommandLib.inf=0D + NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comm= andsLib.inf=0D + NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1= CommandsLib.inf=0D + NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1= CommandsLib.inf=0D + HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandlePar= singLib.inf=0D + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf=0D + FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf= =0D + SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf=0D + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf=0D + BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcf= gCommandLib.inf=0D +=0D + =0D + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF=0D + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D + gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000=0D + }=0D +=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDx= e.inf=0D +!endif=0D +=0D + #=0D + # Bds=0D + #=0D + MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {=0D + =0D + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf= =0D + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + }=0D + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D + MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf= =0D + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D + MdeModulePkg/Logo/LogoDxe.inf=0D + MdeModulePkg/Application/UiApp/UiApp.inf {=0D + =0D + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf= =0D + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf=0D + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf=0D + }=0D + OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf {=0D + =0D + NULL|OvmfPkg/Library/BlobVerifierLibNull/BlobVerifierLibNull.inf=0D + }=0D +=0D +# HTTPS(secure) support in GUI for updating ssl keys for PXE boot=0D + MdeModulePkg/Application/UiApp/UiApp.inf {=0D + =0D + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf= =0D + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf=0D + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf=0D + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib= .inf=0D + }=0D +=0D +# TFTP support for PXE boot=0D + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {=0D + =0D + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D + =0D + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf=0D + SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf=0D + }=0D + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpApp.inf {=0D + =0D + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D + =0D + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf=0D + SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf=0D + }=0D +=0D + # HTTP support for PXE boot=0D + ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {=0D + =0D + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D + =0D + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf=0D + SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf=0D + HttpLib|NetworkPkg/Library/DxeHttpLib/DxeHttpLib.inf=0D + }=0D + ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.inf {=0D + =0D + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D + =0D + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf=0D + SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf=0D + HttpLib|NetworkPkg/Library/DxeHttpLib/DxeHttpLib.inf=0D + }=0D +=0D +# HTTPS (secure) support for PXE boot=0D + NetworkPkg/TlsDxe/TlsDxe.inf {=0D + =0D + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf=0D + TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf=0D + IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf=0D + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf=0D + RngLib|MdePkg/Library/DxeRngLib/DxeRngLib.inf=0D + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib= .inf=0D + }=0D + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {=0D + =0D + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib= .inf=0D + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf=0D + }=0D +=0D +[PcdsDynamicDefault.common]=0D + # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this= =0D + # PCD and PcdPciDisableBusEnumeration above have not been assigned yet=0D + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF=0D +=0D + gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0=0D +=0D +[PcdsFeatureFlag.common]=0D + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE=0D + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE=0D +=0D + ## If TRUE, Graphics Output Protocol will be installed on virtual handle= created by ConsplitterDxe.=0D + # It could be set FALSE to save size.=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE=0D diff --git a/Platform/Qemu/RiscVVirt/RiscVVirt.fdf b/Platform/Qemu/RiscVVir= t/RiscVVirt.fdf new file mode 100644 index 0000000000..9996d8a299 --- /dev/null +++ b/Platform/Qemu/RiscVVirt/RiscVVirt.fdf @@ -0,0 +1,379 @@ +# @file=0D +# Flash definition file on RiscVVirt RISC-V platform=0D +#=0D +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
= =0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +# Platform definitions=0D +#=0D +=0D +!include RiscVVirt.fdf.inc=0D +=0D +##########################################################################= ######=0D +=0D +[FD.RISCV_VIRT]=0D +BaseAddress =3D $(FW_BASE_ADDRESS)=0D +Size =3D $(FW_SIZE)=0D +ErasePolarity =3D 1=0D +BlockSize =3D $(BLOCK_SIZE)=0D +NumBlocks =3D $(FW_BLOCKS)=0D +=0D +$(SECFV_OFFSET)|$(SECFV_SIZE)=0D +gEfiMdeModulePkgTokenSpaceGuid.PcdSecMemFvBase|gEfiMdeModulePkgTokenSpaceG= uid.PcdSecMemFvSize=0D +FV =3D SECFV=0D +=0D +$(FVMAIN_OFFSET)|$(FVMAIN_SIZE)=0D +FV =3D FVMAIN_COMPACT=0D +=0D +!include VarStore.fdf.inc=0D +##########################################################################= ######=0D +=0D +[FD.RISCV_MEMFD]=0D +BaseAddress =3D $(MEMFD_BASE_ADDRESS)=0D +Size =3D 0x00a00000=0D +ErasePolarity =3D 1=0D +BlockSize =3D $(BLOCK_SIZE)=0D +NumBlocks =3D 0xa00=0D +=0D +0x00000000|0x00010000=0D +gEfiMdeModulePkgTokenSpaceGuid.PcdSecPeiTempRamBase|gEfiMdeModulePkgTokenS= paceGuid.PcdSecPeiTempRamSize=0D +=0D +0x00010000|0x001000=0D +gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmfPkgT= okenSpaceGuid.PcdGuidedExtractHandlerTableSize=0D +=0D +0x00040000|0x00080000=0D +gEfiMdeModulePkgTokenSpaceGuid.PcdPeiMemFvBase|gEfiMdeModulePkgTokenSpaceG= uid.PcdPeiMemFvSize=0D +FV =3D PEIFV=0D +=0D +0x00100000|0x00900000=0D +gEfiMdeModulePkgTokenSpaceGuid.PcdDxeMemFvBase|gEfiMdeModulePkgTokenSpaceG= uid.PcdDxeMemFvSize=0D +FV =3D DXEFV=0D +=0D +##########################################################################= ################=0D +=0D +[FV.SECFV]=0D +BlockSize =3D 0x1000=0D +FvAlignment =3D 16=0D +ERASE_POLARITY =3D 1=0D +MEMORY_MAPPED =3D TRUE=0D +STICKY_WRITE =3D TRUE=0D +LOCK_CAP =3D TRUE=0D +LOCK_STATUS =3D TRUE=0D +WRITE_DISABLED_CAP =3D TRUE=0D +WRITE_ENABLED_CAP =3D TRUE=0D +WRITE_STATUS =3D TRUE=0D +WRITE_LOCK_CAP =3D TRUE=0D +WRITE_LOCK_STATUS =3D TRUE=0D +READ_DISABLED_CAP =3D TRUE=0D +READ_ENABLED_CAP =3D TRUE=0D +READ_STATUS =3D TRUE=0D +READ_LOCK_CAP =3D TRUE=0D +READ_LOCK_STATUS =3D TRUE=0D +=0D +#=0D +# SEC Phase modules=0D +#=0D +# The code in this FV handles the initial firmware startup, and=0D +# decompresses the PEI and DXE FVs which handles the rest of the boot sequ= ence.=0D +#=0D +INF UefiCpuPkg/SecCore/SecCoreRiscV.inf=0D +=0D +##########################################################################= ######=0D +[FV.PEIFV]=0D +BlockSize =3D 0x10000=0D +FvAlignment =3D 16=0D +ERASE_POLARITY =3D 1=0D +MEMORY_MAPPED =3D TRUE=0D +STICKY_WRITE =3D TRUE=0D +LOCK_CAP =3D TRUE=0D +LOCK_STATUS =3D TRUE=0D +WRITE_DISABLED_CAP =3D TRUE=0D +WRITE_ENABLED_CAP =3D TRUE=0D +WRITE_STATUS =3D TRUE=0D +WRITE_LOCK_CAP =3D TRUE=0D +WRITE_LOCK_STATUS =3D TRUE=0D +READ_DISABLED_CAP =3D TRUE=0D +READ_ENABLED_CAP =3D TRUE=0D +READ_STATUS =3D TRUE=0D +READ_LOCK_CAP =3D TRUE=0D +READ_LOCK_STATUS =3D TRUE=0D +=0D +APRIORI PEI {=0D + INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeR= outerPei.inf=0D + INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.i= nf=0D + INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf=0D +}=0D +=0D +#=0D +# PEI Phase modules=0D +#=0D +INF MdeModulePkg/Core/Pei/PeiMain.inf=0D +INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf=0D +INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRou= terPei.inf=0D +INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf= =0D +INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf=0D +=0D +# RISC-V Platform PEI Driver=0D +INF MdeModulePkg/Universal/PlatformPei/PlatformPei.inf=0D +=0D +##########################################################################= ######=0D +=0D +[FV.DXEFV]=0D +BlockSize =3D 0x10000=0D +FvAlignment =3D 16=0D +ERASE_POLARITY =3D 1=0D +MEMORY_MAPPED =3D TRUE=0D +STICKY_WRITE =3D TRUE=0D +LOCK_CAP =3D TRUE=0D +LOCK_STATUS =3D TRUE=0D +WRITE_DISABLED_CAP =3D TRUE=0D +WRITE_ENABLED_CAP =3D TRUE=0D +WRITE_STATUS =3D TRUE=0D +WRITE_LOCK_CAP =3D TRUE=0D +WRITE_LOCK_STATUS =3D TRUE=0D +READ_DISABLED_CAP =3D TRUE=0D +READ_ENABLED_CAP =3D TRUE=0D +READ_STATUS =3D TRUE=0D +READ_LOCK_CAP =3D TRUE=0D +READ_LOCK_STATUS =3D TRUE=0D +=0D +APRIORI DXE {=0D + INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D + INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf=0D +}=0D +=0D +#=0D +# DXE Phase modules=0D +#=0D +INF MdeModulePkg/Core/Dxe/DxeMain.inf=0D +=0D +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatus= CodeRouterRuntimeDxe.inf=0D +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandler= RuntimeDxe.inf=0D +INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf=0D +=0D +#=0D +# PCI support=0D +#=0D +INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf=0D +INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf=0D +INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf=0D +INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf=0D +INF OvmfPkg/Virtio10Dxe/Virtio10.inf=0D +=0D +#=0D +# Video support=0D +#=0D +INF OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf=0D +INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf=0D +INF OvmfPkg/PlatformDxe/Platform.inf=0D +=0D +#=0D +# Platform Driver=0D +#=0D +INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf=0D +INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf=0D +INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf=0D +INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf=0D +INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf=0D +INF OvmfPkg/VirtioNetDxe/VirtioNet.inf=0D +INF OvmfPkg/VirtioRngDxe/VirtioRng.inf=0D +INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf=0D +INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf=0D +=0D +INF MdeModulePkg/Universal/Metronome/Metronome.inf=0D +INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf=0D +=0D +# TODO: Move this to OVMF?=0D +INF ArmVirtPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf=0D +=0D +# RISC-V Platform Drivers=0D +INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf=0D +=0D +# RISC-V Core Drivers=0D +INF MdeModulePkg/Universal/TimerDxe/TimerDxe.inf=0D +INF UefiCpuPkg/CpuDxe/CpuDxe.inf=0D +=0D +INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.in= f=0D +=0D +INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCon= figDxe.inf=0D +!endif=0D +=0D +INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.in= f=0D +INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D +INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRun= timeDxe.inf=0D +INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf=0D +INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf=0D +INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf=0D +INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.= inf=0D +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf=0D +INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D +INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D +INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf=0D +INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf=0D +INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf=0D +INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.in= f=0D +INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D +INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=0D +INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D +INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D +INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D +INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe= .inf=0D +INF FatPkg/EnhancedFatDxe/Fat.inf=0D +INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf=0D +=0D +!ifndef $(SOURCE_DEBUG_ENABLE)=0D +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D +!endif=0D +=0D +INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand= .inf=0D +INF ShellPkg/Application/Shell/Shell.inf=0D +=0D +# TFTP support for PXE boot=0D +INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf=0D +INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpApp.inf=0D +=0D +# HTTP support for PXE boot=0D +INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf=0D +INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.inf=0D +=0D +#=0D +# Network modules=0D +#=0D +!if $(E1000_ENABLE)=0D + FILE DRIVER =3D 5D695E11-9B3F-4b83-B25F-4A8D5D69BE07 {=0D + SECTION PE32 =3D Intel3.5/EFIX64/E3507X2.EFI=0D + }=0D +!endif=0D +=0D +!include NetworkPkg/Network.fdf.inc=0D +=0D +#=0D +# Usb Support=0D +#=0D +INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf=0D +INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf=0D +INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf=0D +INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf=0D +INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf=0D +INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf=0D +=0D +INF MdeModulePkg/Application/UiApp/UiApp.inf=0D +INF OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf=0D +=0D +##########################################################################= ######=0D +=0D +[FV.FVMAIN_COMPACT]=0D +FvAlignment =3D 16=0D +ERASE_POLARITY =3D 1=0D +MEMORY_MAPPED =3D TRUE=0D +STICKY_WRITE =3D TRUE=0D +LOCK_CAP =3D TRUE=0D +LOCK_STATUS =3D TRUE=0D +WRITE_DISABLED_CAP =3D TRUE=0D +WRITE_ENABLED_CAP =3D TRUE=0D +WRITE_STATUS =3D TRUE=0D +WRITE_LOCK_CAP =3D TRUE=0D +WRITE_LOCK_STATUS =3D TRUE=0D +READ_DISABLED_CAP =3D TRUE=0D +READ_ENABLED_CAP =3D TRUE=0D +READ_STATUS =3D TRUE=0D +READ_LOCK_CAP =3D TRUE=0D +READ_LOCK_STATUS =3D TRUE=0D +FvNameGuid =3D 27A72E80-3118-4c0c-8673-AA5B4EFA9613=0D +=0D +FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {=0D + SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED= =3D TRUE {=0D + #=0D + # These firmware volumes will have files placed in them uncompressed,= =0D + # and then both firmware volumes will be compressed in a single=0D + # compression operation in order to achieve better overall compressio= n.=0D + #=0D + SECTION FV_IMAGE =3D PEIFV=0D + SECTION FV_IMAGE =3D DXEFV=0D + }=0D + }=0D +=0D +[Rule.Common.SEC]=0D + FILE SEC =3D $(NAMED_GUID) RELOCS_STRIPPED {=0D + PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING =3D"$(MODULE_NAME)" Optional=0D + VERSION STRING =3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R)=0D + }=0D +=0D +[Rule.Common.PEI_CORE]=0D + FILE PEI_CORE =3D $(NAMED_GUID) {=0D + PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING =3D"$(MODULE_NAME)" Optional=0D + VERSION STRING =3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R)=0D + }=0D +=0D +[Rule.Common.PEIM]=0D + FILE PEIM =3D $(NAMED_GUID) {=0D + PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depe= x=0D + PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R)=0D + }=0D +=0D +[Rule.Common.DXE_CORE]=0D + FILE DXE_CORE =3D $(NAMED_GUID) {=0D + PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBER= )=0D + }=0D +=0D +[Rule.Common.DXE_DRIVER]=0D + FILE DRIVER =3D $(NAMED_GUID) {=0D + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depe= x=0D + PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBER= )=0D + }=0D +=0D +[Rule.Common.DXE_RUNTIME_DRIVER]=0D + FILE DRIVER =3D $(NAMED_GUID) {=0D + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depe= x=0D + PE32 PE32 Align =3D 4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBER= )=0D + }=0D +=0D +[Rule.Common.UEFI_DRIVER]=0D + FILE DRIVER =3D $(NAMED_GUID) {=0D + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depe= x=0D + PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBER= )=0D + }=0D +=0D +[Rule.Common.UEFI_DRIVER.BINARY]=0D + FILE DRIVER =3D $(NAMED_GUID) {=0D + DXE_DEPEX DXE_DEPEX Optional |.depex=0D + PE32 PE32 Align=3D4K |.efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R)=0D + }=0D +=0D +[Rule.Common.UEFI_APPLICATION]=0D + FILE APPLICATION =3D $(NAMED_GUID) {=0D + PE32 PE32 Align=3D4K $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBER= )=0D + }=0D +=0D +[Rule.Common.UEFI_APPLICATION.BINARY]=0D + FILE APPLICATION =3D $(NAMED_GUID) {=0D + PE32 PE32 Align=3D4K |.efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R)=0D + }=0D +=0D +[Rule.Common.USER_DEFINED.ACPITABLE]=0D + FILE FREEFORM =3D $(NAMED_GUID) {=0D + RAW ACPI |.acpi=0D + RAW ASL |.aml=0D + }=0D diff --git a/Platform/Qemu/RiscVVirt/RiscVVirt.fdf.inc b/Platform/Qemu/Risc= VVirt/RiscVVirt.fdf.inc new file mode 100644 index 0000000000..6e08e8e9ba --- /dev/null +++ b/Platform/Qemu/RiscVVirt/RiscVVirt.fdf.inc @@ -0,0 +1,49 @@ +## @file=0D +# Definitions of Flash definition file on RiscVVirt RISC-V platform=0D +#=0D +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
= =0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +[Defines]=0D +DEFINE BLOCK_SIZE =3D 0x1000=0D +=0D +DEFINE FW_BASE_ADDRESS =3D 0x22000000=0D +DEFINE FW_SIZE =3D 0x00300000=0D +DEFINE FW_BLOCKS =3D 0x300=0D +=0D +DEFINE CODE_BASE_ADDRESS =3D $(FW_BASE_ADDRESS)=0D +DEFINE CODE_SIZE =3D 0x00240000=0D +DEFINE CODE_BLOCKS =3D 0x240=0D +=0D +=0D +#=0D +# The size of memory region must be power of 2.=0D +# The base address must be aligned with the size.=0D +#=0D +# FW memory region=0D +#=0D +DEFINE SECFV_OFFSET =3D 0x00000000=0D +DEFINE SECFV_SIZE =3D 0x00040000=0D +DEFINE FVMAIN_OFFSET =3D 0x00040000=0D +DEFINE FVMAIN_SIZE =3D 0x00200000=0D +=0D +#=0D +# EFI Variable memory region.=0D +# The total size of EFI Variable FD must include=0D +# all of sub regions of EFI Variable=0D +#=0D +DEFINE VARS_OFFSET =3D 0x00240000=0D +DEFINE VARS_SIZE =3D 0x00040000=0D +DEFINE VARS_FTW_WORKING_OFFSET =3D 0x00280000=0D +DEFINE VARS_FTW_WORKING_SIZE =3D 0x00040000=0D +DEFINE VARS_FTW_SPARE_OFFSET =3D 0x002c0000=0D +DEFINE VARS_FTW_SPARE_SIZE =3D 0x00040000=0D +=0D +#=0D +# Base Address where SEC phase will decompress and load=0D +# the PEI and DXE FVs=0D +#=0D +DEFINE MEMFD_BASE_ADDRESS =3D 0x80200000=0D diff --git a/Platform/Qemu/RiscVVirt/VarStore.fdf.inc b/Platform/Qemu/RiscV= Virt/VarStore.fdf.inc new file mode 100644 index 0000000000..fd97db71d2 --- /dev/null +++ b/Platform/Qemu/RiscVVirt/VarStore.fdf.inc @@ -0,0 +1,79 @@ +## @file=0D +# FDF include file with Layout Regions that define an empty variable stor= e.=0D +#=0D +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
= =0D +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (C) 2014, Red Hat, Inc.=0D +# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
= =0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +$(VARS_OFFSET)|$(VARS_SIZE)=0D +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModule= PkgTokenSpaceGuid.PcdFlashNvStorageVariableSize=0D +#=0D +# NV_VARIABLE_STORE=0D +#=0D +DATA =3D {=0D + ## This is the EFI_FIRMWARE_VOLUME_HEADER=0D + # ZeroVector []=0D + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,=0D + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,=0D + # FileSystemGuid: gEfiSystemNvDataFvGuid =3D=0D + # { 0xFFF12B8D, 0x7696, 0x4C8B,=0D + # { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }}=0D + 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C,=0D + 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50,=0D + # FvLength: 0x20000=0D + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,=0D + # Signature "_FVH" # Attributes=0D + 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,=0D + # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision=0D + 0x48, 0x00, 0x39, 0xF1, 0x00, 0x00, 0x00, 0x02,=0D + # Blockmap[0]: 0x20 Blocks * 0x1000 Bytes / Block=0D + 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,=0D + # Blockmap[1]: End=0D + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,=0D + ## This is the VARIABLE_STORE_HEADER=0D +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE=0D + # Signature: gEfiAuthenticatedVariableGuid =3D=0D + # { 0xaaf32c78, 0x947b, 0x439a,=0D + # { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 }}=0D + 0x78, 0x2c, 0xf3, 0xaa, 0x7b, 0x94, 0x9a, 0x43,=0D + 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92,=0D +!else=0D + # Signature: gEfiVariableGuid =3D=0D + # { 0xddcf3616, 0x3275, 0x4164,=0D + # { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}=0D + 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41,=0D + 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d,=0D +!endif=0D + # Size: 0x40000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariabl= eSize) -=0D + # 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) =3D 0x3FFB8=0D + # This can speed up the Variable Dispatch a bit.=0D + 0xB8, 0xFF, 0x03, 0x00,=0D + # FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32=0D + 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00=0D +}=0D +=0D +$(VARS_FTW_WORKING_OFFSET)|$(VARS_FTW_WORKING_SIZE)=0D +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMdeModu= lePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize=0D +#=0D +#NV_FTW_WROK=0D +#=0D +DATA =3D {=0D + # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature =3D gEdkiiWorkingBl= ockSignatureGuid =3D=0D + # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0= x1b, 0x95 }}=0D + 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49,=0D + 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95,=0D + # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Res= erved=0D + 0x2c, 0xaf, 0x2c, 0x64, 0xFE, 0xFF, 0xFF, 0xFF,=0D + # WriteQueueSize: UINT64=0D + 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00=0D +}=0D +=0D +$(VARS_FTW_SPARE_OFFSET)|$(VARS_FTW_SPARE_SIZE)=0D +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModule= PkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize=0D +#=0D +#NV_FTW_SPARE=0D --=20 2.25.1