From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.7599.1664435298132748378 for ; Thu, 29 Sep 2022 00:08:19 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lixianglai@loongson.cn) Received: from localhost.localdomain (unknown [10.2.5.185]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxPGtURDVjqakjAA--.6225S16; Thu, 29 Sep 2022 15:08:15 +0800 (CST) From: "xianglai" To: devel@edk2.groups.io Cc: quic_llindhol@quicinc.com, michael.d.kinney@intel.com, kraxel@redhat.com, ardb@kernel.org, maobibo@loongson.cn Subject: [edk2-platforms][PATCH V3 14/16] Platform/Loongson: Support Dxe Date: Thu, 29 Sep 2022 15:08:02 +0800 Message-Id: <3ea74123195605e88d67904546d9f139483a12e7.1664433514.git.lixianglai@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxPGtURDVjqakjAA--.6225S16 X-Coremail-Antispam: 1UD129KBjvAXoWDAryruFW7uw48GF13GF45KFg_yoWruw1DGo Z7JF1jyr45tr1kJ3yUKFs8try7ZwsIvrs0qr1kZw1kAF4Utr12yrWDtwnrWr1DAFn8Ar1D G3y5J3y8JrW7twn7n29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UjIYCTnIWjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRUUUUUUUUU= X-CM-SenderInfo: 5ol0xt5qjotxo6or00hjvr0hdfq/ Content-Transfer-Encoding: quoted-printable Support Dxe for LoogArch. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4054 Signed-off-by: xianglai li --- .../Loongson/LoongArchQemuPkg/Loongson.dec | 14 +- .../Loongson/LoongArchQemuPkg/Loongson.dsc | 420 +++++++++++++++++- .../Loongson/LoongArchQemuPkg/Loongson.fdf | 243 ++++++++++ .../LoongArchQemuPkg/Loongson.fdf.inc | 42 ++ .../LoongArchQemuPkg/VarStore.fdf.inc | 64 +++ 5 files changed, 778 insertions(+), 5 deletions(-) create mode 100644 Platform/Loongson/LoongArchQemuPkg/VarStore.fdf.inc diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dec b/Platform/Loo= ngson/LoongArchQemuPkg/Loongson.dec index 6a423f3ed6..5065f99042 100644 --- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dec +++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dec @@ -18,7 +18,8 @@ # Comments are used for Keywords and Module Types.=0D #=0D # Supported Module Types:=0D -# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_D= RIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION=0D +# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_D= RIVER=0D +# DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION=0D #=0D ##########################################################################= ######=0D [Includes.common]=0D @@ -26,12 +27,20 @@ =0D [Guids]=0D gLoongArchQemuPkgTokenSpaceGuid =3D { 0x0e0383ce, 0x0151, 0x4d01, { 0x8= 0, 0x0e, 0x3f, 0xef, 0x8b, 0x27, 0x6d, 0x52 } }=0D + gEfiLoongsonBootparamsTableGuid =3D { 0x4660f721, 0x2ec5, 0x416a, { 0x8= 9, 0x9a, 0x43, 0x18, 0x02, 0x50, 0xa0, 0xc9 } }=0D +=0D +[Protocols]=0D =0D [PcdsFixedAtBuild, PcdsDynamic]=0D gLoongArchQemuPkgTokenSpaceGuid.PcdFlashPeiFvBase|0x0|UINT64|0x00000003= =0D gLoongArchQemuPkgTokenSpaceGuid.PcdFlashPeiFvSize|0x0|UINT32|0x00000004= =0D + gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvOffset|0x0|UINT64|0x0000000= 7=0D gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvBase|0x0|UINT64|0x00000008= =0D gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvSize|0x0|UINT32|0x00000009= =0D + gLoongArchQemuPkgTokenSpaceGuid.PcdFlashSecModuleBase|0x0|UINT64|0x00000= 00a=0D + gLoongArchQemuPkgTokenSpaceGuid.PcdFlashSecModuleSize|0x0|UINT32|0x00000= 00b=0D + gLoongArchQemuPkgTokenSpaceGuid.PcdFlashEventLogBase|0x0|UINT64|0x000000= 0c=0D + gLoongArchQemuPkgTokenSpaceGuid.PcdFlashEventLogSize|0x0|UINT32|0x000000= 0d=0D gLoongArchQemuPkgTokenSpaceGuid.PcdDeviceTreeBase|0x0|UINT64|0x00000018= =0D gLoongArchQemuPkgTokenSpaceGuid.PcdDeviceTreePadding|256|UINT32|0x000000= 19=0D =0D @@ -45,6 +54,8 @@ [PcdsFixedAtBuild.LOONGARCH64]=0D gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|32|UINT8|0x00000010=0D gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|0|UINT8|0x00000011=0D + gLoongArchQemuPkgTokenSpaceGuid.PcdDeviceSpaceStartAddress|0x10000000|U= INT32|0x00000012=0D + gLoongArchQemuPkgTokenSpaceGuid.PcdDeviceSpaceLength|0x80000000|UINT32|= 0x00000013=0D =0D [PcdsDynamic]=0D gLoongArchQemuPkgTokenSpaceGuid.PcdRamSize|0x40000000|UINT64|0x00000041= =0D @@ -56,3 +67,4 @@ gLoongArchQemuPkgTokenSpaceGuid.PcdInvalidPmd|0x0|UINT64|0x00000047=0D gLoongArchQemuPkgTokenSpaceGuid.PcdInvalidPte|0x0|UINT64|0x00000048=0D =0D +[PcdsFeatureFlag]=0D diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc b/Platform/Loo= ngson/LoongArchQemuPkg/Loongson.dsc index 1ca8cc09f7..74c83720b7 100644 --- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc +++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc @@ -24,6 +24,25 @@ FLASH_DEFINITION =3D Platform/Loongson/LoongArchQemuPkg/Lo= ongson.fdf=0D TTY_TERMINAL =3D FALSE=0D =0D + #=0D + # Defines for default states. These can be changed on the command line.= =0D + # -D FLAG=3DVALUE=0D + DEFINE TTY_TERMINAL =3D FALSE=0D + DEFINE SECURE_BOOT_ENABLE =3D FALSE=0D + DEFINE TPM2_ENABLE =3D FALSE=0D + DEFINE TPM2_CONFIG_ENABLE =3D FALSE=0D +=0D + #=0D + # Network definition=0D + #=0D + DEFINE NETWORK_IP6_ENABLE =3D FALSE=0D + DEFINE NETWORK_HTTP_BOOT_ENABLE =3D FALSE=0D + DEFINE NETWORK_SNP_ENABLE =3D FALSE=0D + DEFINE NETWORK_TLS_ENABLE =3D FALSE=0D + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS =3D TRUE=0D + DEFINE NETWORK_ISCSI_ENABLE =3D FALSE=0D +=0D +!include NetworkPkg/NetworkDefines.dsc.inc=0D ##########################################################################= ##=0D #=0D # Defines for default states. These can be changed on the command line.=0D @@ -37,16 +56,25 @@ #=0D GCC:*_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES=0D =0D +!include NetworkPkg/NetworkBuildOptions.dsc.inc=0D =0D [BuildOptions.LOONGARCH64.EDKII.SEC]=0D *_*_*_CC_FLAGS =3D=0D =0D -#[BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,= BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLIC= ATION]=0D -# GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000=0D +[BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,B= uildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICA= TION]=0D + GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000=0D =0D [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]=0D GCC:*_*_LOONGARCH64_DLINK_FLAGS =3D -z common-page-size=3D0x10000=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 @@ -61,19 +89,88 @@ PrintLib | MdePkg/Library/BasePrintLib/BasePrint= Lib.inf=0D BaseMemoryLib | MdePkg/Library/BaseMemoryLib/BaseMemo= ryLib.inf=0D =0D + # Networking Requirements=0D +!include NetworkPkg/NetworkLibs.dsc.inc=0D +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE=0D + TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf=0D +!endif=0D =0D BaseLib | MdePkg/Library/BaseLib/BaseLib.inf=0D + SafeIntLib | MdePkg/Library/BaseSafeIntLib/BaseSaf= eIntLib.inf=0D + TimeBaseLib | EmbeddedPkg/Library/TimeBaseLib/TimeB= aseLib.inf=0D + BmpSupportLib | MdeModulePkg/Library/BaseBmpSupportLi= b/BaseBmpSupportLib.inf=0D + SynchronizationLib | MdePkg/Library/BaseSynchronizationLib= /BaseSynchronizationLib.inf=0D + CpuLib | MdePkg/Library/BaseCpuLib/BaseCpuLib.= inf=0D PerformanceLib | MdePkg/Library/BasePerformanceLibNull= /BasePerformanceLibNull.inf=0D PeCoffLib | MdePkg/Library/BasePeCoffLib/BasePeCo= ffLib.inf=0D CacheMaintenanceLib | MdePkg/Library/BaseCacheMaintenanceLi= b/BaseCacheMaintenanceLib.inf=0D UefiDecompressLib | MdePkg/Library/BaseUefiDecompressLib/= BaseUefiDecompressLib.inf=0D + UefiHiiServicesLib | MdeModulePkg/Library/UefiHiiServicesL= ib/UefiHiiServicesLib.inf=0D + HiiLib | MdeModulePkg/Library/UefiHiiLib/UefiH= iiLib.inf=0D + CapsuleLib | MdeModulePkg/Library/DxeCapsuleLibNul= l/DxeCapsuleLibNull.inf=0D + DxeServicesLib | MdePkg/Library/DxeServicesLib/DxeServ= icesLib.inf=0D + DxeServicesTableLib | MdePkg/Library/DxeServicesTableLib/Dx= eServicesTableLib.inf=0D PeCoffGetEntryPointLib | MdePkg/Library/BasePeCoffGetEntryPoin= tLib/BasePeCoffGetEntryPointLib.inf=0D + PciLib | MdePkg/Library/BasePciLibPciExpress/B= asePciLibPciExpress.inf=0D + PciExpressLib | OvmfPkg/Library/BaseCachingPciExpress= Lib/BaseCachingPciExpressLib.inf=0D + PciCapLib | OvmfPkg/Library/BasePciCapLib/BasePci= CapLib.inf=0D + PciCapPciSegmentLib | OvmfPkg/Library/BasePciCapPciSegmentL= ib/BasePciCapPciSegmentLib.inf=0D + PciCapPciIoLib | OvmfPkg/Library/UefiPciCapPciIoLib/Ue= fiPciCapPciIoLib.inf=0D IoLib | MdePkg/Library/BaseIoLibIntrinsic/Bas= eIoLibIntrinsic.inf=0D SerialPortLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/SerialPortLib/SerialPortLib.inf=0D + EfiResetSystemLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/ResetSystemAcpiLib/BaseResetSystemAcpiGedLib.inf=0D + ResetSystemLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/ResetSystemAcpiLib/BaseResetSystemAcpiGedLib.inf=0D +=0D + UefiLib | MdePkg/Library/UefiLib/UefiLib.inf=0D + UefiBootServicesTableLib | MdePkg/Library/UefiBootServicesTableL= ib/UefiBootServicesTableLib.inf=0D + UefiRuntimeServicesTableLib | MdePkg/Library/UefiRuntimeServicesTab= leLib/UefiRuntimeServicesTableLib.inf=0D + UefiDriverEntryPoint | MdePkg/Library/UefiDriverEntryPoint/U= efiDriverEntryPoint.inf=0D + UefiApplicationEntryPoint | MdePkg/Library/UefiApplicationEntryPo= int/UefiApplicationEntryPoint.inf=0D + DevicePathLib | MdePkg/Library/UefiDevicePathLibDevic= ePathProtocol/UefiDevicePathLibDevicePathProtocol.inf=0D + FileHandleLib | MdePkg/Library/UefiFileHandleLib/Uefi= FileHandleLib.inf=0D + SecurityManagementLib | MdeModulePkg/Library/DxeSecurityManag= ementLib/DxeSecurityManagementLib.inf=0D + UefiUsbLib | MdePkg/Library/UefiUsbLib/UefiUsbLib.= inf=0D + SerializeVariablesLib | OvmfPkg/Library/SerializeVariablesLib= /SerializeVariablesLib.inf=0D + CustomizedDisplayLib | MdeModulePkg/Library/CustomizedDispla= yLib/CustomizedDisplayLib.inf=0D DebugPrintErrorLevelLib | MdePkg/Library/BaseDebugPrintErrorLev= elLib/BaseDebugPrintErrorLevelLib.inf=0D + TpmMeasurementLib | MdeModulePkg/Library/TpmMeasurementLi= bNull/TpmMeasurementLibNull.inf=0D + AuthVariableLib | MdeModulePkg/Library/AuthVariableLibN= ull/AuthVariableLibNull.inf=0D + VarCheckLib | MdeModulePkg/Library/VarCheckLib/VarC= heckLib.inf=0D + VariablePolicyLib | MdeModulePkg/Library/VariablePolicyLi= b/VariablePolicyLib.inf=0D + VariablePolicyHelperLib | MdeModulePkg/Library/VariablePolicyHe= lperLib/VariablePolicyHelperLib.inf=0D + SortLib | MdeModulePkg/Library/UefiSortLib/Uefi= SortLib.inf=0D FdtLib | EmbeddedPkg/Library/FdtLib/FdtLib.inf= =0D + PciPcdProducerLib | OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtP= ciPcdProducerLib.inf=0D + PciSegmentLib | MdePkg/Library/BasePciSegmentLibPci/B= asePciSegmentLibPci.inf=0D + PciHostBridgeLib | OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPc= iHostBridgeLib.inf=0D + PciHostBridgeUtilityLib | ArmVirtPkg/Library/ArmVirtPciHostBrid= geUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf=0D + MmuLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/MmuLib/MmuBaseLib.inf=0D + FileExplorerLib | MdeModulePkg/Library/FileExplorerLib/= FileExplorerLib.inf=0D +=0D +!if $(HTTP_BOOT_ENABLE) =3D=3D TRUE=0D + HttpLib | MdeModulePkg/Library/DxeHttpLib/DxeHt= tpLib.inf=0D +!endif=0D + UefiBootManagerLib | MdeModulePkg/Library/UefiBootManagerL= ib/UefiBootManagerLib.inf=0D + OrderedCollectionLib | MdePkg/Library/BaseOrderedCollectionR= edBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf=0D + ReportStatusCodeLib | MdePkg/Library/BaseReportStatusCodeLi= bNull/BaseReportStatusCodeLibNull.inf=0D +=0D + PeCoffGetEntryPointLib | MdePkg/Library/BasePeCoffGetEntryPoin= tLib/BasePeCoffGetEntryPointLib.inf=0D PeCoffExtraActionLib | MdePkg/Library/BasePeCoffExtraActionL= ibNull/BasePeCoffExtraActionLibNull.inf=0D DebugAgentLib | MdeModulePkg/Library/DebugAgentLibNul= l/DebugAgentLibNull.inf=0D + CpuExceptionHandlerLib | MdeModulePkg/Library/CpuExceptionHand= lerLibNull/CpuExceptionHandlerLibNull.inf=0D +=0D + PlatformBootManagerLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/PlatformBootManagerLib/PlatformBootManagerLib.inf=0D + BootLogoLib | MdeModulePkg/Library/BootLogoLib/Boot= LogoLib.inf=0D + QemuBootOrderLib | OvmfPkg/Library/QemuBootOrderLib/Qemu= BootOrderLib.inf=0D + QemuFwCfgSimpleParserLib | OvmfPkg/Library/QemuFwCfgSimpleParser= Lib/QemuFwCfgSimpleParserLib.inf=0D + QemuLoadImageLib | OvmfPkg/Library/GenericQemuLoadImageL= ib/GenericQemuLoadImageLib.inf=0D +=0D + #=0D + # Virtio Support=0D + #=0D + VirtioLib | OvmfPkg/Library/VirtioLib/VirtioLib.i= nf=0D + FrameBufferBltLib | MdeModulePkg/Library/FrameBufferBltLi= b/FrameBufferBltLib.inf=0D + QemuFwCfgLib | OvmfPkg/Library/QemuFwCfgLib/QemuFwCf= gLibMmio.inf=0D =0D DebugLib | MdePkg/Library/BaseDebugLibSerialPort= /BaseDebugLibSerialPort.inf=0D =0D @@ -91,7 +188,7 @@ ReportStatusCodeLib | MdeModulePkg/Library/PeiReportStatusC= odeLib/PeiReportStatusCodeLib.inf=0D OemHookStatusCodeLib | MdeModulePkg/Library/OemHookStatusCod= eLibNull/OemHookStatusCodeLibNull.inf=0D PeCoffGetEntryPointLib | MdePkg/Library/BasePeCoffGetEntryPoin= tLib/BasePeCoffGetEntryPointLib.inf=0D - QemuFwCfgLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/QemuFwCfgLib/QemuFwCfgLib.inf=0D + QemuFwCfgLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/QemuFwCfgLib/QemuFwCfgPeiLib.inf=0D MmuLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/MmuLib/MmuBaseLibPei.inf=0D =0D [LibraryClasses.common.PEIM]=0D @@ -106,9 +203,59 @@ ExtractGuidedSectionLib | MdePkg/Library/PeiExtractGuidedSectio= nLib/PeiExtractGuidedSectionLib.inf=0D PcdLib | MdePkg/Library/PeiPcdLib/PeiPcdLib.in= f=0D QemuFwCfgS3Lib | OvmfPkg/Library/QemuFwCfgS3Lib/PeiQem= uFwCfgS3LibFwCfg.inf=0D - QemuFwCfgLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/QemuFwCfgLib/QemuFwCfgLib.inf=0D + QemuFwCfgLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/QemuFwCfgLib/QemuFwCfgPeiLib.inf=0D =0D MmuLib | Platform/Loongson/LoongArchQemuPkg/Librar= y/MmuLib/MmuBaseLibPei.inf=0D +[LibraryClasses.common.DXE_CORE]=0D + HobLib | MdePkg/Library/DxeCoreHobLib/DxeCoreH= obLib.inf=0D + DxeCoreEntryPoint | MdePkg/Library/DxeCoreEntryPoint/DxeC= oreEntryPoint.inf=0D + MemoryAllocationLib | MdeModulePkg/Library/DxeCoreMemoryAll= ocationLib/DxeCoreMemoryAllocationLib.inf=0D + ReportStatusCodeLib | MdeModulePkg/Library/DxeReportStatusC= odeLib/DxeReportStatusCodeLib.inf=0D +=0D +[LibraryClasses.common.DXE_RUNTIME_DRIVER]=0D + PcdLib | MdePkg/Library/DxePcdLib/DxePcdLib.in= f=0D + HobLib | MdePkg/Library/DxeHobLib/DxeHobLib.in= f=0D + DxeCoreEntryPoint | MdePkg/Library/DxeCoreEntryPoint/DxeC= oreEntryPoint.inf=0D + MemoryAllocationLib | MdePkg/Library/UefiMemoryAllocationLi= b/UefiMemoryAllocationLib.inf=0D + ReportStatusCodeLib | MdeModulePkg/Library/RuntimeDxeReport= StatusCodeLib/RuntimeDxeReportStatusCodeLib.inf=0D + UefiRuntimeLib | MdePkg/Library/UefiRuntimeLib/UefiRun= timeLib.inf=0D + ExtractGuidedSectionLib | MdePkg/Library/PeiExtractGuidedSectio= nLib/PeiExtractGuidedSectionLib.inf=0D + QemuFwCfgS3Lib | OvmfPkg/Library/QemuFwCfgS3Lib/DxeQem= uFwCfgS3LibFwCfg.inf=0D + RealTimeClockLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/LsRealTimeClockLib/LsRealTimeClockLib.inf=0D + VariablePolicyLib | MdeModulePkg/Library/VariablePolicyLi= b/VariablePolicyLibRuntimeDxe.inf=0D + QemuFwCfgLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/QemuFwCfgLib/QemuFwCfgPeiLib.inf=0D + EfiResetSystemLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/ResetSystemAcpiLib/DxeResetSystemAcpiGedLib.inf=0D + ResetSystemLib | Platform/Loongson/LoongArchQemuPkg/Li= brary/ResetSystemAcpiLib/DxeResetSystemAcpiGedLib.inf=0D +!if $(TARGET) !=3D RELEASE=0D + DebugLib | MdePkg/Library/DxeRuntimeDebugLibSeri= alPort/DxeRuntimeDebugLibSerialPort.inf=0D +!endif=0D +=0D +[LibraryClasses.common.UEFI_DRIVER]=0D + PcdLib | MdePkg/Library/DxePcdLib/DxePcdLib.in= f=0D + HobLib | MdePkg/Library/DxeHobLib/DxeHobLib.in= f=0D + DxeCoreEntryPoint | MdePkg/Library/DxeCoreEntryPoint/DxeC= oreEntryPoint.inf=0D + MemoryAllocationLib | MdePkg/Library/UefiMemoryAllocationLi= b/UefiMemoryAllocationLib.inf=0D + ReportStatusCodeLib | MdeModulePkg/Library/DxeReportStatusC= odeLib/DxeReportStatusCodeLib.inf=0D + UefiScsiLib | MdePkg/Library/UefiScsiLib/UefiScsiLi= b.inf=0D + ExtractGuidedSectionLib | MdePkg/Library/PeiExtractGuidedSectio= nLib/PeiExtractGuidedSectionLib.inf=0D + QemuFwCfgLib | OvmfPkg/Library/QemuFwCfgLib/QemuFwCf= gLibMmio.inf=0D +=0D +[LibraryClasses.common.DXE_DRIVER]=0D + PcdLib | MdePkg/Library/DxePcdLib/DxePcdLib.in= f=0D + HobLib | MdePkg/Library/DxeHobLib/DxeHobLib.in= f=0D + MemoryAllocationLib | MdePkg/Library/UefiMemoryAllocationLi= b/UefiMemoryAllocationLib.inf=0D + ReportStatusCodeLib | MdeModulePkg/Library/DxeReportStatusC= odeLib/DxeReportStatusCodeLib.inf=0D + UefiScsiLib | MdePkg/Library/UefiScsiLib/UefiScsiLi= b.inf=0D + CpuExceptionHandlerLib | UefiCpuPkg/Library/CpuExceptionHandle= rLib/DxeCpuExceptionHandlerLib.inf=0D + ExtractGuidedSectionLib | MdePkg/Library/DxeExtractGuidedSectio= nLib/DxeExtractGuidedSectionLib.inf=0D + QemuFwCfgS3Lib | OvmfPkg/Library/QemuFwCfgS3Lib/DxeQem= uFwCfgS3LibFwCfg.inf=0D + QemuFwCfgLib | OvmfPkg/Library/QemuFwCfgLib/QemuFwCf= gLibMmio.inf=0D +=0D +[LibraryClasses.common.UEFI_APPLICATION]=0D + PcdLib | MdePkg/Library/DxePcdLib/DxePcdLib.in= f=0D + HobLib | MdePkg/Library/DxeHobLib/DxeHobLib.in= f=0D + MemoryAllocationLib | MdePkg/Library/UefiMemoryAllocationLi= b/UefiMemoryAllocationLib.inf=0D + ExtractGuidedSectionLib | MdePkg/Library/DxeExtractGuidedSectio= nLib/DxeExtractGuidedSectionLib.inf=0D =0D =0D ##########################################################################= ######=0D @@ -116,12 +263,32 @@ # Pcd Section - list of all EDK II PCD Entries defined by this Platform.=0D #=0D ##########################################################################= ######=0D +[PcdsFeatureFlag]=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport | F= ALSE=0D +# gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial | T= RUE=0D +# gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory | T= RUE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress | T= RUE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport | T= RUE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport | F= ALSE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport | F= ALSE=0D + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation | T= RUE=0D + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation | T= RUE=0D [PcdsFixedAtBuild]=0D ## BaseLib ##=0D gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength | 1= 000000=0D gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength | 1= 000000=0D gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength | 1= 000000=0D + gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout | 1= 0000000=0D =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize | 1= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange | F= ALSE=0D + gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler | 0= x10=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize | 0= x2000=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize | 0= x8000=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress | 0= x0=0D + gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize | 4= 8=0D + gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize | 3= 2=0D + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask | 0= x07=0D gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel | 0= x8000004F=0D # DEBUG_INIT 0x00000001 // Initialization=0D # DEBUG_WARN 0x00000002 // Warnings=0D @@ -165,6 +332,60 @@ # 0x90000000 - 0xA0000000=0D #=0D gLoongArchQemuPkgTokenSpaceGuid.PcdUefiRamTop | 0= x10000000=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions | 0= x06=0D +=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile | {= 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0x= f4, 0x66, 0x23, 0x31 }=0D +=0D + #=0D + # Network Pcds=0D + #=0D +!include NetworkPkg/NetworkPcds.dsc.inc=0D +##########################################################################= ######=0D +#=0D +# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Pla= tform=0D +#=0D +##########################################################################= ######=0D +[PcdsDynamicDefault]=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase | 0= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 | 0= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 | 0= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase | 0= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 | 0= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved | 0= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration | F= ALSE=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution | 8= 00=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution | 6= 00=0D + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut | 2= =0D +=0D + # Set video resolution for text setup.=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution | 6= 40=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution | 4= 80=0D +=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion | 0= x0300=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev | 0= x0=0D +=0D + gLoongArchQemuPkgTokenSpaceGuid.PcdRamSize | 0= x40000000=0D +=0D + ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI=0D + # enumeration to complete before installing ACPI tables.=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration |TR= UE=0D + gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation |0x= 0=0D + # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this= =0D + # PCD and PcdPciDisableBusEnumeration above have not been assigned yet=0D + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress |0x= FFFFFFFFFFFFFFFF=0D +=0D + #=0D + # IPv4 and IPv6 PXE Boot support.=0D + #=0D + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport | 0= x01=0D + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport | 0= x01=0D +=0D + #=0D + # SMBIOS entry point version=0D + #=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0=0D + gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|TRUE=0D =0D [Components]=0D =0D @@ -192,3 +413,194 @@ PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf=0D }=0D =0D + #=0D + # DXE Phase modules=0D + #=0D + MdeModulePkg/Core/Dxe/DxeMain.inf {=0D + =0D + NULL | MdeModulePkg/Library/LzmaCustomDe= compressLib/LzmaCustomDecompressLib.inf=0D + DevicePathLib | MdePkg/Library/UefiDevicePathLib/= UefiDevicePathLib.inf=0D + ExtractGuidedSectionLib | MdePkg/Library/DxeExtractGuidedSe= ctionLib/DxeExtractGuidedSectionLib.inf=0D + }=0D +=0D + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCod= eRouterRuntimeDxe.inf=0D + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf=0D + MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {=0D + =0D + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D + }=0D +=0D + MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf=0D + Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.inf=0D + MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D + MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntim= eDxe.inf=0D + MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf=0D + MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf=0D + Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/TimerDxe.inf=0D + MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf=0D + MdeModulePkg/Universal/Metronome/Metronome.inf=0D + EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf=0D +=0D + #=0D + # Variable=0D + #=0D +# Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeD= xe/FvbServicesRuntimeDxe.inf=0D + OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf {=0D + =0D + PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.i= nf=0D + }=0D + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf=0D + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {=0D + =0D + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf=0D + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf=0D + }=0D +=0D + #=0D + # Platform Driver=0D + #=0D + OvmfPkg/VirtioBlkDxe/VirtioBlk.inf=0D + OvmfPkg/VirtioScsiDxe/VirtioScsi.inf=0D + OvmfPkg/VirtioRngDxe/VirtioRng.inf=0D +=0D + #=0D + # File system=0D + #=0D + MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf=0D + MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf=0D + MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf=0D + FatPkg/EnhancedFatDxe/Fat.inf=0D +=0D + #=0D + #BDS=0D + #=0D + MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {=0D + =0D + DevicePathLib | MdePkg/Library/UefiDevicePathLib/= UefiDevicePathLib.inf=0D + PcdLib | MdePkg/Library/BasePcdLibNull/Bas= ePcdLibNull.inf=0D + }=0D + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D + MdeModulePkg/Logo/LogoDxe.inf=0D + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.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 +=0D + OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf {=0D + =0D + NULL|OvmfPkg/Library/BlobVerifierLibNull/BlobVerifierLibNull.inf=0D + }=0D +=0D + #=0D + # Network Support=0D + #=0D +#!include NetworkPkg/NetworkComponents.dsc.inc=0D +=0D +# NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf {=0D +# =0D +# NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf=0D +# }=0D +=0D +!if $(NETWORK_TLS_ENABLE) =3D=3D TRUE=0D + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {=0D + =0D + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf=0D + }=0D +!endif=0D + OvmfPkg/VirtioNetDxe/VirtioNet.inf=0D +=0D +=0D + #=0D + # IDE/SCSI=0D + #=0D + OvmfPkg/SataControllerDxe/SataControllerDxe.inf=0D + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf=0D + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf=0D + MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D + MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=0D +=0D + #=0D + # SMBIOS Support=0D + #=0D + MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf {=0D + =0D + NULL | OvmfPkg/Library/SmbiosVersionLib/= DetectSmbiosVersionLib.inf=0D + }=0D + OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf=0D +=0D + #=0D + # PCI=0D + #=0D + Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.inf= =0D + EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf=0D + MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf=0D + MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf=0D + OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf=0D + OvmfPkg/Virtio10Dxe/Virtio10.inf=0D +=0D + #=0D + # Console=0D + #=0D + MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf=0D + MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf=0D + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf=0D + MdeModulePkg/Universal/PrintDxe/PrintDxe.inf=0D + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D + MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf= {=0D + =0D + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf=0D + }=0D +=0D + #=0D + # Video=0D + #=0D + OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf=0D + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf=0D + OvmfPkg/PlatformDxe/Platform.inf=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 + # ACPI Support=0D + #=0D + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf=0D + MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsRes= ourceTableDxe.inf=0D + OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf=0D +=0D + #=0D + #app=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/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 + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF=0D + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D + gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000=0D + }=0D diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.fdf b/Platform/Loo= ngson/LoongArchQemuPkg/Loongson.fdf index f964304fdc..ba2942e455 100644 --- a/Platform/Loongson/LoongArchQemuPkg/Loongson.fdf +++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.fdf @@ -22,6 +22,15 @@ $(SECFV_OFFSET)|$(SECFV_SIZE) gLoongArchQemuPkgTokenSpaceGuid.PcdFlashSecFvBase|gLoongArchQemuPkgTokenSp= aceGuid.PcdFlashSecFvSize=0D FV =3D SECFV=0D =0D +$(PEIFV_OFFSET)|$(PEIFV_SIZE)=0D +gLoongArchQemuPkgTokenSpaceGuid.PcdFlashPeiFvBase|gLoongArchQemuPkgTokenSp= aceGuid.PcdFlashPeiFvSize=0D +FV =3D PEIFV=0D +=0D +$(DXEFV_OFFSET)|$(DXEFV_SIZE)=0D +gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvBase|gLoongArchQemuPkgTokenSp= aceGuid.PcdFlashDxeFvSize=0D +FV =3D FVMAIN_COMPACT=0D +=0D +!include VarStore.fdf.inc=0D ##########################################################################= ###########################=0D [FV.SECFV]=0D FvNameGuid =3D 587d4265-5e71-41da-9c35-4258551f1e22=0D @@ -78,6 +87,178 @@ INF MdeModulePkg/Core/Pei/PeiMain.inf INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf=0D INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf=0D INF Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf=0D +##########################################################################= ###########################=0D +[FV.DXEFV]=0D +FvNameGuid =3D 5d19a5b3-130f-459b-a292-9270a9e6bc62=0D +BlockSize =3D $(BLOCK_SIZE)=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 +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 +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 +=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 +INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf=0D +INF Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.inf=0D +INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf=0D +INF Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/TimerDxe.in= f=0D +INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.in= f=0D +INF MdeModulePkg/Universal/Metronome/Metronome.inf=0D +INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D +INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRun= timeDxe.inf=0D +INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf=0D +INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf=0D +=0D +#=0D +# Variable=0D +#=0D +INF Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntim= eDxe/FvbServicesRuntimeDxe.inf=0D +INF OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf=0D +INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.in= f=0D +INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf=0D +#=0D +# PCI=0D +#=0D +INF Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.= inf=0D +INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.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 +# Platform Driver=0D +#=0D +INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf=0D +INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf=0D +INF OvmfPkg/VirtioRngDxe/VirtioRng.inf=0D +INF OvmfPkg/VirtioNetDxe/VirtioNet.inf=0D +=0D +#=0D +# Console=0D +#=0D +INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf=0D +INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf=0D +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf=0D +INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf=0D +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D +INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.= inf=0D +=0D +#=0D +#Video=0D +#=0D +INF OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf=0D +INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf=0D +INF OvmfPkg/PlatformDxe/Platform.inf=0D +=0D +#=0D +# IDE=0D +#=0D +INF OvmfPkg/SataControllerDxe/SataControllerDxe.inf=0D +INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf=0D +INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf=0D +INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D +INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=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 +#=0D +#BDS=0D +#=0D +INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D +INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D +INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D +INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D +INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D +INF MdeModulePkg/Logo/LogoDxe.inf=0D +INF MdeModulePkg/Application/UiApp/UiApp.inf=0D +INF OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf=0D +#=0D +#Smbios=0D +#=0D +INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf=0D +INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf=0D +=0D +#=0D +#Acpi=0D +#=0D +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf=0D +INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphics= ResourceTableDxe.inf=0D +INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf=0D +=0D +#=0D +# Network modules=0D +#!include NetworkPkg/Network.fdf.inc=0D +=0D +#=0D +# File system=0D +#=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 FatPkg/EnhancedFatDxe/Fat.inf=0D +=0D +#=0D +#Boot OS=0D +#=0D +INF ShellPkg/Application/Shell/Shell.inf=0D +=0D +##########################################################################= ###########################=0D +[FV.FVMAIN_COMPACT]=0D +FvNameGuid =3D af8c3fe8-9ce8-4548-884a-e3f4dd91f040=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 +FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {=0D + SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED= =3D TRUE {=0D + SECTION FV_IMAGE =3D DXEFV=0D + }=0D + }=0D =0D ##########################################################################= ###########################=0D [Rule.Common.SEC]=0D @@ -102,3 +283,65 @@ INF Platform/Loongson/LoongArchQemuPkg/PlatformPei/Pl= atformPei.inf }=0D =0D ##########################################################################= ###########################=0D +[Rule.Common.DXE_CORE]=0D + FILE DXE_CORE =3D $(NAMED_GUID) {=0D + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + }=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 $(INF_OUTPUT)/$(MODULE_NAME).efi= =0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + RAW ACPI Optional |.acpi=0D + RAW ASL Optional |.aml=0D + }=0D +=0D +##########################################################################= ###########################=0D +[Rule.Common.DXE_RUNTIME_DRIVER]=0D + FILE DRIVER =3D $(NAMED_GUID) {=0D + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex= =0D + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + }=0D +=0D +##########################################################################= ###########################=0D +[Rule.Common.UEFI_DRIVER]=0D + FILE DRIVER =3D $(NAMED_GUID) {=0D + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex=0D + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + }=0D +=0D +##########################################################################= ###########################=0D +[Rule.Common.UEFI_DRIVER.BINARY]=0D + FILE DRIVER =3D $(NAMED_GUID) {=0D + DXE_DEPEX DXE_DEPEX Optional |.depex=0D + PE32 PE32 |.efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R)=0D + }=0D +=0D +##########################################################################= ###########################=0D +[Rule.Common.UEFI_APPLICATION]=0D + FILE APPLICATION =3D $(NAMED_GUID) {=0D + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + }=0D +=0D +##########################################################################= ###########################=0D +[Rule.Common.UEFI_APPLICATION.BINARY]=0D + FILE APPLICATION =3D $(NAMED_GUID) {=0D + PE32 PE32 |.efi=0D + UI STRING=3D"$(MODULE_NAME)" Optional=0D + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R)=0D + }=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/Loongson/LoongArchQemuPkg/Loongson.fdf.inc b/Platform= /Loongson/LoongArchQemuPkg/Loongson.fdf.inc index a1a2d537e3..964d69ed44 100644 --- a/Platform/Loongson/LoongArchQemuPkg/Loongson.fdf.inc +++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.fdf.inc @@ -19,3 +19,45 @@ DEFINE FD_SIZE =3D 0x400000 #Set Sec base address and size in flash=0D DEFINE SECFV_OFFSET =3D 0x00000000=0D DEFINE SECFV_SIZE =3D 0x00010000=0D +=0D +#Set Pei base address and size in flash=0D +DEFINE PEIFV_OFFSET =3D 0x00010000=0D +DEFINE PEIFV_SIZE =3D 0x00040000=0D +=0D +#Set Dxe base address and size in flash=0D +DEFINE DXEFV_OFFSET =3D 0x00050000=0D +DEFINE DXEFV_SIZE =3D 0x00350000=0D +=0D +#Set Var base address and size in flash=0D +DEFINE VARIABLE_OFFSET =3D 0x003a0000=0D +DEFINE VAR_ALL_SIZE =3D 0x60000=0D +=0D +##########################################################################= ##=0D +#Set Var Flash layout=0D +DEFINE VARIABLE_SIZE =3D 0x00010000=0D +DEFINE VAR_ALL_BLOCKS =3D 0x60=0D +=0D +DEFINE RESERVE1_OFFSET =3D $(VARIABLE_OFFSET) + $(VARIABLE_SIZE= )=0D +DEFINE RESERVE1_SIZE =3D 0xB000=0D +=0D +DEFINE RESERVE2_OFFSET =3D $(RESERVE1_OFFSET) + $(RESERVE1_SIZE= )=0D +DEFINE RESERVE2_SIZE =3D 0x14000=0D +=0D +DEFINE SPARE_OFFSET =3D $(RESERVE2_OFFSET) + $(RESERVE2_SIZE= )=0D +DEFINE SPARE_SIZE =3D 0x20000=0D +=0D +DEFINE FWTWORKING_OFFSET =3D $(SPARE_OFFSET) + $(SPARE_SIZE)=0D +DEFINE FWTWORKING_SIZE =3D 0x8000=0D +=0D +DEFINE EVENT_LOG_OFFSET =3D $(FWTWORKING_OFFSET) + $(FWTWORKING_= SIZE)=0D +DEFINE EVENT_LOG_SIZE =3D 0x8000=0D +=0D +# Set Variable=0D +SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 =3D 0=0D +SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize =3D $(VAR= IABLE_SIZE)=0D +=0D +# Set FtwSpare=0D +SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize =3D $(SPA= RE_SIZE)=0D +=0D +# Set FtwWorking=0D +SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize =3D $(F= WTWORKING_SIZE)=0D diff --git a/Platform/Loongson/LoongArchQemuPkg/VarStore.fdf.inc b/Platform= /Loongson/LoongArchQemuPkg/VarStore.fdf.inc new file mode 100644 index 0000000000..625fa23543 --- /dev/null +++ b/Platform/Loongson/LoongArchQemuPkg/VarStore.fdf.inc @@ -0,0 +1,64 @@ +## @file=0D +#=0D +# Copyright (c) 2021 Loongson Technology Corporation Limited. All rights = reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +$(VARIABLE_OFFSET)|$(VARIABLE_SIZE)=0D +#NV_VARIABLE_STORE=0D +DATA =3D {=0D + #jmp to 0x1c060000=0D + 0x01, 0x0c, 0x38, 0x14, 0x21, 0x00, 0x80, 0x03,=0D + 0x21, 0x00, 0x00, 0x4c, 0x00, 0x10, 0x14, 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: 0x60000=0D + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,=0D + # Signature "_FVH" # Attributes=0D + 0x5f, 0x46, 0x56, 0x48, 0x36, 0x0c, 0x04, 0x00,=0D + # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision=0D + 0x48, 0x00, 0x8F, 0x6B, 0x00, 0x00, 0x00, 0x02,=0D + # Blockmap[0]: 0x10 Blocks * 0x1000 Bytes / Block=0D + 0x60, 0x00, 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 + # gEfiVariableGuid =3D {0xddcf3616, 0x3275, 0x4164, { 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 + # Size: 0x10000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariabl= eSize) -=0D + # 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) =3D 0xffb8=0D + # This can speed up the Variable Dispatch a bit.=0D + 0xb8, 0xff, 0x00, 0x00,=0D + # FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32=0D + 0x5a, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00=0D +}=0D +$(RESERVE1_OFFSET)|$(RESERVE1_SIZE)=0D +#NV_RESERVE1_STORE=0D +=0D +$(RESERVE2_OFFSET)|$(RESERVE2_SIZE)=0D +#NV_RESERVE2_STORE=0D +=0D +$(SPARE_OFFSET)|$(SPARE_SIZE)=0D +#NV_FTW_SPARE=0D +=0D +$(FWTWORKING_OFFSET)|$(FWTWORKING_SIZE)=0D +#NV_FTW_WORKING=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 + 0x07, 0x7f, 0x44, 0x88, 0xfe, 0xff, 0xff, 0xff,=0D + # WriteQueueSize: UINT64 #Size:0x8000 - 0x20(FTW_WORKING_HEADER) =3D 0x7= FE0=0D + 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00=0D +}=0D +=0D +$(EVENT_LOG_OFFSET)|$(EVENT_LOG_SIZE)=0D +#NV_EVENT_LOG=0D --=20 2.31.1