* [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server @ 2024-07-12 8:20 Evan Chai 2024-07-12 8:20 ` [edk2-devel] [PATCH V3 1/2] RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform Evan Chai ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Evan Chai @ 2024-07-12 8:20 UTC (permalink / raw) To: devel; +Cc: Evan Chai This is a foundational patch to move the 'RISC-V QEMU Server Reference Platform' forward. Evan Chai (2): RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform RiscVQemuServerPlatform: added README file Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1432 insertions(+) create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119916): https://edk2.groups.io/g/devel/message/119916 Mute This Topic: https://groups.io/mt/107187581/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 11+ messages in thread
* [edk2-devel] [PATCH V3 1/2] RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform 2024-07-12 8:20 [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Evan Chai @ 2024-07-12 8:20 ` Evan Chai 2024-07-12 8:20 ` [edk2-devel] [PATCH V3 2/2] RiscVQemuServerPlatform: added README file Evan Chai 2024-07-12 8:30 ` 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server EvanChai 2 siblings, 0 replies; 11+ messages in thread From: Evan Chai @ 2024-07-12 8:20 UTC (permalink / raw) To: devel; +Cc: Evan Chai, Andrei Warkentin, Sunil V L, Yong Li Leveraging RiscVVirt code, this initial commit establishes the foundational framework for the first phase of the RISC-V Qemu-based Server platform. Cc: Andrei Warkentin <andrei.warkentin@intel.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Cc: Yong Li <yong.li@intel.com> Signed-off-by: Evan Chai <evan.chai@linux.alibaba.com> --- Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1267 insertions(+) diff --git a/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc new file mode 100644 index 00000000..b2aded88 --- /dev/null +++ b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc @@ -0,0 +1,496 @@ +## @file +# RISC-V Qemu-based Server Platform +# +# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR> +# Copyright (C) 2024, Alibaba Group Holding Limited.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +################################################################################ +# +# Defines Section - statements that will be processed to create a Makefile. +# +################################################################################ +[Defines] + PLATFORM_NAME = RiscVQemuServerPlatform + PLATFORM_GUID = A5FAC672-1D51-4461-AB37-B7DB202F34BA + PLATFORM_VERSION = 0.1 + DSC_SPECIFICATION = 0x0001001c + OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES = RISCV64 + BUILD_TARGETS = DEBUG|RELEASE|NOOPT + SKUID_IDENTIFIER = DEFAULT + FLASH_DEFINITION = Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf + + # + # Enable below options may cause build error or may not work on + # the initial version of RISC-V package + # Defines for default states. These can be changed on the command line. + # -D FLAG=VALUE + # + DEFINE TTY_TERMINAL = FALSE + DEFINE SECURE_BOOT_ENABLE = FALSE + DEFINE TPM2_ENABLE = FALSE + DEFINE TPM2_CONFIG_ENABLE = FALSE + DEFINE DEBUG_ON_SERIAL_PORT = TRUE + + # + # Network definition + # + DEFINE NETWORK_IP6_ENABLE = FALSE + DEFINE NETWORK_HTTP_BOOT_ENABLE = FALSE + DEFINE NETWORK_SNP_ENABLE = FALSE + DEFINE NETWORK_TLS_ENABLE = FALSE + DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE + DEFINE NETWORK_ISCSI_ENABLE = FALSE + +!if $(NETWORK_SNP_ENABLE) == TRUE + !error "NETWORK_SNP_ENABLE is IA32/X64/EBC only" +!endif + + +!include MdePkg/MdeLibs.dsc.inc +!include NetworkPkg/Network.dsc.inc + +[BuildOptions] + GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG +!ifdef $(SOURCE_DEBUG_ENABLE) + GCC:*_*_RISCV64_GENFW_FLAGS = --keepexceptiontable +!endif + +[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] + GCC: *_*_*_DLINK_FLAGS = -z common-page-size=0x1000 + MSFT: *_*_*_DLINK_FLAGS = /ALIGN:4096 + +################################################################################ +# +# Library Class section - list of all Library Classes needed by this Platform. +# +################################################################################ + +!include Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc + +!include MdePkg/MdeLibs.dsc.inc + +[LibraryClasses.common] + # Virtio Support + VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf + VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf + QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgMmioDxeLib.inf + QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf + QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf + QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf + + TimerLib|UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/BaseRiscV64CpuTimerLib.inf + VirtNorFlashPlatformLib|OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.inf + + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf + BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf + PlatformBootManagerLib|OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf + PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf + CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf + FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf + QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf + PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf + PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf + PeiHardwareInfoLib|OvmfPkg/Library/HardwareInfoLib/PeiHardwareInfoLib.inf + PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf + ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf + +!if $(TPM2_ENABLE) == TRUE + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf + Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLib.inf + TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf + TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf +!else + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf + TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf +!endif + +[LibraryClasses.common.DXE_DRIVER] + AcpiPlatformLib|OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf + PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf + +!if $(TPM2_ENABLE) == TRUE + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf +!endif + +[LibraryClasses.common.UEFI_DRIVER] + UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf + PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf + +################################################################################ +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform. +# +################################################################################ +[PcdsFeatureFlag.common] + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE + + ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe. + # It could be set FALSE to save size. + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE + + gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE + +[PcdsFixedAtBuild.common] + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 +!if $(NETWORK_TLS_ENABLE) == TRUE + # + # The cumulative and individual VOLATILE variable size limits should be set + # high enough for accommodating several and/or large CA certificates. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x80000 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x40000 +!endif + + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"2.7" + + # Serial Port + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x10000000 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|9600 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|3686400 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1 + + gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 } + +!if $(SECURE_BOOT_ENABLE) == TRUE + # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot + gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04 + gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04 + gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04 +!endif + + gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize|0x20000 + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x02 + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 + + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2 + +[PcdsDynamicDefault.common] + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 + + ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI + # enumeration to complete before installing ACPI tables. + gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE + + # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this + # PCD and PcdPciDisableBusEnumeration above have not been assigned yet + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF + + gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0 + + # + # Set video resolution for boot options and for text setup. + # PlatformDxe can set the former at runtime. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1280 + gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800 + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640 + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480 + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0 + + # + # SMBIOS entry point version + # + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300 + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 + gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE + + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0 + + # + # IPv4 and IPv6 PXE Boot support. + # + gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 + gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 + + # + # TPM2 support + # +!if $(TPM2_ENABLE) == TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0 + gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0 +!else +[PcdsPatchableInModule] + # make this PCD patchable instead of dynamic when TPM support is not enabled + # this permits setting the PCD in unreachable code without pulling in dynamic PCD support + gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0 +!endif + +[PcdsDynamicHii] + gUefiOvmfPkgTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gOvmfVariableGuid|0x0|FALSE|NV,BS + +!if $(TPM2_CONFIG_ENABLE) == TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x8|3|NV,BS +!endif + + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5 + +[LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM] +!if $(TPM2_ENABLE) == TRUE + PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf +!else + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf +!endif + +################################################################################ +# +# Components Section - list of all EDK II Modules needed by this Platform. +# +################################################################################ +[Components] + + # + # SEC Phase modules + # + OvmfPkg/RiscVVirt/Sec/SecMain.inf { + <LibraryClasses> + ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf + LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf + PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf + HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf + PrePiHobListPointerLib|OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf + MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf + } + + # + # DXE + # + MdeModulePkg/Core/Dxe/DxeMain.inf { + <LibraryClasses> + NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + } + + MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { + <LibraryClasses> + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + } + + # + # Architectural Protocols + # + UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf + MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { + <LibraryClasses> + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + # do not use unaligned CopyMem () on the UEFI varstore NOR flash region + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + } + +!if $(SECURE_BOOT_ENABLE) == TRUE + MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf { + <LibraryClasses> + NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf +!if $(TPM2_ENABLE) == TRUE + NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf +!endif + } + SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf + OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf +!else + MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf +!endif + MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf + MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf + MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf + EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf + EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf + + MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf + MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf + MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + + UefiCpuPkg/CpuTimerDxeRiscV64/CpuTimerDxeRiscV64.inf + OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf + MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf + + # + # Status Code Routing + # + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf + + # + # Platform Driver + # + OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf + EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf { + <LibraryClasses> + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + } + OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf + OvmfPkg/VirtioBlkDxe/VirtioBlk.inf + OvmfPkg/VirtioScsiDxe/VirtioScsi.inf + OvmfPkg/VirtioNetDxe/VirtioNet.inf + OvmfPkg/VirtioRngDxe/VirtioRng.inf + + # + # FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs + # + MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf + MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf + MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf + FatPkg/EnhancedFatDxe/Fat.inf + MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf + OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf + + # + # Bds + # + MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf { + <LibraryClasses> + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + } + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf + MdeModulePkg/Logo/LogoDxe.inf + MdeModulePkg/Application/UiApp/UiApp.inf { + <LibraryClasses> + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf + } + OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf { + <LibraryClasses> + NULL|OvmfPkg/Library/BlobVerifierLibNull/BlobVerifierLibNull.inf + } + + NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf { + <LibraryClasses> + NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf + } + +!if $(NETWORK_TLS_ENABLE) == TRUE + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf { + <LibraryClasses> + NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf + } +!endif + + # + # SCSI Bus and Disk Driver + # + MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf + MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf + + # + # SATA + # + MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + + # + # NVME Driver + # + MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf + + # + # SMBIOS Support + # + MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf { + <LibraryClasses> + NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf + } + OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf + + # + # PCI support + # + UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf { + <LibraryClasses> + NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + } + MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf + MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf { + <LibraryClasses> + NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + } + OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf + OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf + OvmfPkg/Virtio10Dxe/Virtio10.inf + + # + # Video support + # + OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf + OvmfPkg/PlatformDxe/Platform.inf + + # + # USB Support + # + MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf + MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf + MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf + MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf + MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf + + # + # TPM2 support + # +!if $(TPM2_ENABLE) == TRUE + SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { + <LibraryClasses> + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf + NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf + NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf + NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf + NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf + NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf + NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf + } +!if $(TPM2_CONFIG_ENABLE) == TRUE + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +!endif +!endif + + # + # ACPI Support + # + OvmfPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf + MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf + OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf { + <LibraryClasses> + NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf + } diff --git a/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc new file mode 100644 index 00000000..41ca4b6c --- /dev/null +++ b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc @@ -0,0 +1,341 @@ +## @file +# RISC-V Qemu-based Server Platform +# +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved. +# Copyright (c) 2011 - 2022, ARM Limited. All rights reserved. +# Copyright (c) 2014, Linaro Limited. All rights reserved. +# Copyright (c) 2015 - 2024, Intel Corporation. All rights reserved. +# Copyright (c) Microsoft Corporation. +# Copyright (C) 2024, Alibaba Group Holding Limited.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[Defines] + DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000047 + +[LibraryClasses.common] +!ifdef $(SOURCE_DEBUG_ENABLE) + PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf + DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf +!else + PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +!endif +!if $(DEBUG_ON_SERIAL_PORT) == TRUE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf +!else + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +!endif + DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf + SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf + BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf + SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf + IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf + UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf + CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf + CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf + DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf + DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf + UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf + HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf + UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf + SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf + ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf + FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf + PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf + UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf + OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf + OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf + PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf + + # + # Ramdisk Requirements + # + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf + + # Allow dynamic PCDs + # + + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + + # Networking Requirements +!include NetworkPkg/NetworkLibs.dsc.inc +!if $(NETWORK_TLS_ENABLE) == TRUE + TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf +!endif + + + # Add support for GCC stack protector + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + + # RISC-V Architectural Libraries + CpuExceptionHandlerLib|UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/BaseRiscV64CpuExceptionHandlerLib.inf + RiscVSbiLib|MdePkg/Library/BaseRiscVSbiLib/BaseRiscVSbiLib.inf + RiscVMmuLib|UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.inf + PlatformBootManagerLib|OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf + ResetSystemLib|OvmfPkg/RiscVVirt/Library/ResetSystemLib/BaseResetSystemLib.inf + + RealTimeClockLib|EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.inf + TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf + + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf + DebugAgentTimerLib|EmbeddedPkg/Library/DebugAgentTimerLibNull/DebugAgentTimerLibNull.inf + + # Flattened Device Tree (FDT) access library + FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf + + # PCI Libraries + PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf + PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf + PciCapLib|OvmfPkg/Library/BasePciCapLib/BasePciCapLib.inf + PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapPciSegmentLib.inf + PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.inf + DxeHardwareInfoLib|OvmfPkg/Library/HardwareInfoLib/DxeHardwareInfoLib.inf + + # USB Libraries + UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf + + # + # CryptoPkg libraries needed by multiple firmware features + # + IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf +!if $(NETWORK_TLS_ENABLE) == TRUE + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf +!else + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +!endif + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf + + # + # Secure Boot dependencies + # +!if $(SECURE_BOOT_ENABLE) == TRUE + AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf + PlatformPKProtectionLib|SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.inf + + # re-use the UserPhysicalPresent() dummy implementation from the ovmf tree + PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf +!else + AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf +!endif + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf + VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf + VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf + VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf + UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf + PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf + ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf + +[LibraryClasses.common.SEC] + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf + ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf + ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf + PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf + HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf + PrePiHobListPointerLib|OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf + MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf + +[LibraryClasses.common.DXE_CORE] + PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf + HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf + MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf + DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf + +[LibraryClasses.common.DXE_DRIVER] + SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf + +[LibraryClasses.common.UEFI_APPLICATION] + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf + HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf + +[LibraryClasses.common.UEFI_DRIVER] + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf + +[LibraryClasses.common.DXE_RUNTIME_DRIVER] + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf +!if $(DEBUG_ON_SERIAL_PORT) == TRUE + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf +!endif + VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf + +!if $(SECURE_BOOT_ENABLE) == TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf +!endif + +################################################################################ +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +################################################################################ + +[PcdsFeatureFlag.common] + gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE + + gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE + +[PcdsFeatureFlag] + # + # Activate AcpiSdtProtocol + # + gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE + +[PcdsFixedAtBuild.common] + gEfiMdePkgTokenSpaceGuid.PcdRiscVFeatureOverride|0xFFFFFFFFFFFFFFF8 + gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000 + gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000 + gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 + gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000 + gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320 + + # DEBUG_ASSERT_ENABLED 0x01 + # DEBUG_PRINT_ENABLED 0x02 + # DEBUG_CODE_ENABLED 0x04 + # CLEAR_MEMORY_ENABLED 0x08 + # ASSERT_BREAKPOINT_ENABLED 0x10 + # ASSERT_DEADLOOP_ENABLED 0x20 +!if $(DEBUG_ON_SERIAL_PORT) != TRUE + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x21 +!else + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2f +!endif + + # DEBUG_INIT 0x00000001 // Initialization + # DEBUG_WARN 0x00000002 // Warnings + # DEBUG_LOAD 0x00000004 // Load events + # DEBUG_FS 0x00000008 // EFI File system + # DEBUG_POOL 0x00000010 // Alloc & Free (pool) + # DEBUG_PAGE 0x00000020 // Alloc & Free (page) + # DEBUG_INFO 0x00000040 // Informational debug messages + # DEBUG_DISPATCH 0x00000080 // PEI/DXE/SMM Dispatchers + # DEBUG_VARIABLE 0x00000100 // Variable + # DEBUG_BM 0x00000400 // Boot Manager + # DEBUG_BLKIO 0x00001000 // BlkIo Driver + # DEBUG_NET 0x00004000 // SNP Driver + # DEBUG_UNDI 0x00010000 // UNDI Driver + # DEBUG_LOADFILE 0x00020000 // LoadFile + # DEBUG_EVENT 0x00080000 // Event messages + # DEBUG_GCD 0x00100000 // Global Coherency Database changes + # DEBUG_CACHE 0x00200000 // Memory range cachability changes + # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may + # // significantly impact boot performance + # DEBUG_ERROR 0x80000000 // Error +!if $(DEBUG_ON_SERIAL_PORT) == TRUE + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL) +!endif + + # + # Optional feature to help prevent EFI memory map fragments + # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob + # Values are in EFI Pages (4K). DXE Core will make sure that + # at least this much of each type of memory can be allocated + # from a single memory range. This way you only end up with + # maximum of two fragments for each type in the memory map + # (the memory used, and the free memory that was prereserved + # but not used). + # + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0 +!if $(SECURE_BOOT_ENABLE) == TRUE + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|600 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|400 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|1500 +!else + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|300 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|150 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|1000 +!endif + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|6000 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0 + + # + # Enable strict image permissions for all images. (This applies + # only to images that were built with >= 4 KB section alignment.) + # + gEfiMdeModulePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x3 + + # + # Enable NX memory protection for all non-code regions, including OEM and OS + # reserved ones, with the exception of LoaderData regions, of which OS loaders + # (i.e., GRUB) may assume that its contents are executable. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5 + +[Components.common] + # + # Ramdisk support + # + MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf + + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf { + <PcdsFixedAtBuild> + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE + } + ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf { + <PcdsFixedAtBuild> + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE + } + OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf { + <PcdsFixedAtBuild> + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE + } + ShellPkg/Application/Shell/Shell.inf { + <LibraryClasses> + ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf + NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf + NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf + NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf + NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf + NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf +!if $(ACPIVIEW_ENABLE) == TRUE + NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf +!endif + NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf + NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf +!if $(NETWORK_IP6_ENABLE) == TRUE + NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf +!endif + HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf + + <PcdsFixedAtBuild> + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE + gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 + } + + # + # ACPI Support + # + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf { + <LibraryClasses> + NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf + } diff --git a/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf new file mode 100644 index 00000000..98c9dae2 --- /dev/null +++ b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf @@ -0,0 +1,317 @@ +## @file +# RISC-V Qemu-based Server Platform +# +# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR> +# Copyright (C) 2024, Alibaba Group Holding Limited. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# Platform definitions +# + +!include RiscVQemuServerPlatform.fdf.inc + +################################################################################ +[FD.RISCV_SP_CODE] +BaseAddress = $(CODE_BASE_ADDRESS)|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress +Size = $(CODE_SIZE)|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize +ErasePolarity = 1 +BlockSize = $(BLOCK_SIZE) +NumBlocks = $(CODE_BLOCKS) + +0x00000000|$(CODE_SIZE) +gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize +FV = FVMAIN_COMPACT + +################################################################################ +[FD.RISCV_SP_VARS] +BaseAddress = $(VARS_BASE_ADDRESS) +Size = $(VARS_SIZE) +ErasePolarity = 1 +BlockSize = $(VARS_BLOCK_SIZE) +NumBlocks = $(VARS_BLOCKS) + +!include VarStore.fdf.inc +################################################################################ + +[FV.DXEFV] +BlockSize = 0x10000 +FvAlignment = 16 +ERASE_POLARITY = 1 +MEMORY_MAPPED = TRUE +STICKY_WRITE = TRUE +LOCK_CAP = TRUE +LOCK_STATUS = TRUE +WRITE_DISABLED_CAP = TRUE +WRITE_ENABLED_CAP = TRUE +WRITE_STATUS = TRUE +WRITE_LOCK_CAP = TRUE +WRITE_LOCK_STATUS = TRUE +READ_DISABLED_CAP = TRUE +READ_ENABLED_CAP = TRUE +READ_STATUS = TRUE +READ_LOCK_CAP = TRUE +READ_LOCK_STATUS = TRUE + +APRIORI DXE { + INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf + INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf + INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf + INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf + INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf + INF UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf + INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf +} + +# +# DXE Phase modules +# +INF MdeModulePkg/Core/Dxe/DxeMain.inf +INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf +INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf +INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf +INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf +INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf + +# +# PI DXE Drivers producing Architectural Protocols (EFI Services) +# +INF UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf +INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf +INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf +INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf +INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf +INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf +!if $(SECURE_BOOT_ENABLE) == TRUE + INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf +!endif +INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf +INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf +INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf +INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf +INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + +# +# Multiple Console IO support +# +INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf +INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + +# RISC-V Core Drivers +INF UefiCpuPkg/CpuTimerDxeRiscV64/CpuTimerDxeRiscV64.inf +INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf +INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf + +# +# FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs +# +INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf +INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf +INF FatPkg/EnhancedFatDxe/Fat.inf +INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf +INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf +INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf + +# +# Status Code Routing +# +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf + +# +# Platform Driver +# +INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf +INF OvmfPkg/VirtioNetDxe/VirtioNet.inf +INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf +INF OvmfPkg/VirtioRngDxe/VirtioRng.inf + +INF ShellPkg/Application/Shell/Shell.inf +INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf +INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf + +# +# Bds +# +INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf +INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf +INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf +INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +INF MdeModulePkg/Application/UiApp/UiApp.inf +INF OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf + +# +# Networking stack +# +!include NetworkPkg/Network.fdf.inc + +# +# SCSI Bus and Disk Driver +# +INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf +INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf + +# +# SATA +# +INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf +INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf +INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + +# +# NVME Driver +# +INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf + +# +# SMBIOS Support +# +INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf +INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf + +# +# ACPI Support +# +INF OvmfPkg/PlatformHasAcpiDtDxe/PlatformHasAcpiDtDxe.inf +INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf +INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf +INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf + +# +# PCI support +# +INF UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf +INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf +INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf +INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf +INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf +INF OvmfPkg/Virtio10Dxe/Virtio10.inf + +# +# Video support +# +INF OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf +INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf +INF OvmfPkg/PlatformDxe/Platform.inf + +# +# Usb Support +# +INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf +INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf +INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf +INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf +INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf +INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf + +# +# TianoCore logo (splash screen) +# +INF MdeModulePkg/Logo/LogoDxe.inf + +# +# Ramdisk support +# +INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf + +################################################################################ + +[FV.FVMAIN_COMPACT] +FvAlignment = 16 +ERASE_POLARITY = 1 +MEMORY_MAPPED = TRUE +STICKY_WRITE = TRUE +LOCK_CAP = TRUE +LOCK_STATUS = TRUE +WRITE_DISABLED_CAP = TRUE +WRITE_ENABLED_CAP = TRUE +WRITE_STATUS = TRUE +WRITE_LOCK_CAP = TRUE +WRITE_LOCK_STATUS = TRUE +READ_DISABLED_CAP = TRUE +READ_ENABLED_CAP = TRUE +READ_STATUS = TRUE +READ_LOCK_CAP = TRUE +READ_LOCK_STATUS = TRUE +FvNameGuid = 27A72E80-3118-4c0c-8673-AA5B4EFA9613 + +INF OvmfPkg/RiscVVirt/Sec/SecMain.inf + +FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { + SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { + SECTION FV_IMAGE = DXEFV + } + } + +[Rule.Common.SEC] + FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED FIXED { + PE32 PE32 Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING ="$(MODULE_NAME)" Optional + VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.DXE_CORE] + FILE DXE_CORE = $(NAMED_GUID) { + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.DXE_DRIVER] + FILE DRIVER = $(NAMED_GUID) { + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.DXE_RUNTIME_DRIVER] + FILE DRIVER = $(NAMED_GUID) { + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.UEFI_DRIVER] + FILE DRIVER = $(NAMED_GUID) { + DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.UEFI_DRIVER.BINARY] + FILE DRIVER = $(NAMED_GUID) { + DXE_DEPEX DXE_DEPEX Optional |.depex + PE32 PE32 |.efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.UEFI_APPLICATION] + FILE APPLICATION = $(NAMED_GUID) { + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.UEFI_APPLICATION.BINARY] + FILE APPLICATION = $(NAMED_GUID) { + PE32 PE32 |.efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + +[Rule.Common.USER_DEFINED.ACPITABLE] + FILE FREEFORM = $(NAMED_GUID) { + RAW ACPI |.acpi + RAW ASL |.aml + UI STRING="$(MODULE_NAME)" Optional + } diff --git a/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc new file mode 100644 index 00000000..eb996c3b --- /dev/null +++ b/Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc @@ -0,0 +1,41 @@ +## @file +# Definitions of Flash definition file on RISC-V Qemu Server Platform +# +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR> +# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> +# Copyright (C) 2024, Alibaba Group Holding Limited. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## +[Defines] +DEFINE BLOCK_SIZE = 0x1000 + +DEFINE PFLASH0_BASE = 0x20000000 +DEFINE PFLASH1_BASE = 0x22000000 + +DEFINE CODE_BASE_ADDRESS = $(PFLASH0_BASE) +DEFINE CODE_SIZE = 0x00800000 +DEFINE CODE_BLOCKS = 0x800 + +DEFINE VARS_BASE_ADDRESS = $(PFLASH1_BASE) +DEFINE VARS_SIZE = 0x000C0000 +DEFINE VARS_BLOCK_SIZE = 0x40000 +DEFINE VARS_BLOCKS = 0x3 + +# +# EFI Variable memory region. +# The total size of EFI Variable FD must include +# all of sub regions of EFI Variable +# +DEFINE VARS_OFFSET = 0x00000000 +DEFINE VARS_LIVE_SIZE = 0x00040000 +DEFINE VARS_FTW_WORKING_OFFSET = $(VARS_OFFSET) + $(VARS_LIVE_SIZE) +DEFINE VARS_FTW_WORKING_SIZE = 0x00040000 +DEFINE VARS_FTW_SPARE_OFFSET = $(VARS_FTW_WORKING_OFFSET) + $(VARS_FTW_WORKING_SIZE) +DEFINE VARS_FTW_SPARE_SIZE = 0x00040000 + +SET gUefiCpuPkgTokenSpaceGuid.PcdCpuCoreCrystalClockFrequency = 10000000 +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase = 0x83FF0000 +SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize = 0x00010000 diff --git a/Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc b/Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc new file mode 100644 index 00000000..043b8e3a --- /dev/null +++ b/Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc @@ -0,0 +1,72 @@ +## @file +# FDF include file with Layout Regions that define an empty variable store. +# +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR> +# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +# Copyright (C) 2014, Red Hat, Inc. +# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +$(VARS_OFFSET)|$(VARS_LIVE_SIZE) +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize +# +# NV_VARIABLE_STORE +# +DATA = { + ## This is the EFI_FIRMWARE_VOLUME_HEADER + # ZeroVector [] + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + # FileSystemGuid: gEfiSystemNvDataFvGuid = + # { 0xFFF12B8D, 0x7696, 0x4C8B, + # { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }} + 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C, + 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50, + # FvLength: 0xC0000 + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, + # Signature "_FVH" # Attributes + 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00, + # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision + 0x48, 0x00, 0x28, 0x09, 0x00, 0x00, 0x00, 0x02, + # Blockmap[0]: 0x3 Blocks * 0x40000 Bytes / Block + 0x3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + # Blockmap[1]: End + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + ## This is the VARIABLE_STORE_HEADER + # It is compatible with SECURE_BOOT_ENABLE == FALSE as well. + # Signature: gEfiAuthenticatedVariableGuid = + # { 0xaaf32c78, 0x947b, 0x439a, + # { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 }} + 0x78, 0x2c, 0xf3, 0xaa, 0x7b, 0x94, 0x9a, 0x43, + 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92, + # Size: 0x40000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - + # 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0x3FFB8 + # This can speed up the Variable Dispatch a bit. + 0xB8, 0xFF, 0x03, 0x00, + # FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32 + 0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +} + +$(VARS_FTW_WORKING_OFFSET)|$(VARS_FTW_WORKING_SIZE) +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize +# +#NV_FTW_WORK +# +DATA = { + # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid = + # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95 }} + 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49, + 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95, + # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved + 0x5b, 0xe7, 0xc6, 0x86, 0xFE, 0xFF, 0xFF, 0xFF, + # WriteQueueSize: UINT64 + 0xE0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 +} + +$(VARS_FTW_SPARE_OFFSET)|$(VARS_FTW_SPARE_SIZE) +gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize +# +#NV_FTW_SPARE -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119917): https://edk2.groups.io/g/devel/message/119917 Mute This Topic: https://groups.io/mt/107187582/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [edk2-devel] [PATCH V3 2/2] RiscVQemuServerPlatform: added README file 2024-07-12 8:20 [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Evan Chai 2024-07-12 8:20 ` [edk2-devel] [PATCH V3 1/2] RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform Evan Chai @ 2024-07-12 8:20 ` Evan Chai 2024-07-12 8:30 ` 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server EvanChai 2 siblings, 0 replies; 11+ messages in thread From: Evan Chai @ 2024-07-12 8:20 UTC (permalink / raw) To: devel; +Cc: Evan Chai, Andrei Warkentin, Sunil V L, Yong Li 1. Added high-level software architecture model 2. Included reference examples for build and execution environments 3. Provided reference materials for other dependent components Cc: Andrei Warkentin <andrei.warkentin@intel.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Cc: Yong Li <yong.li@intel.com> Signed-off-by: Evan Chai <evan.chai@linux.alibaba.com> --- Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/Platform/Qemu/RiscVQemuServerPlatform/Readme.md b/Platform/Qemu/RiscVQemuServerPlatform/Readme.md new file mode 100644 index 00000000..21b87249 --- /dev/null +++ b/Platform/Qemu/RiscVQemuServerPlatform/Readme.md @@ -0,0 +1,165 @@ +# RISC-V UEFI Server Reference Board +The goal of this document is to provide a generic server platform firmware solution applicable to systems built on the RISC-V architecture SOC. + +## Revision History + +| Document Number | Revision Number | Description | Maintainer | Revision Date | +| ------------- | --- | :--------------------------------------------------------------------- | ---------- | -------- | +| \<XXXX\> | 0.1 | Initial release : create RISC-V UEFI server reference board | [Evan Chai](evan.chai@intel.com) | Mar 2024 | +| | 0.2 | | | | + + +## INDEX +* 1 [Overview](#1-Overview) +* 2 [Server SOC Reference Model](#2-Server-SOC-Reference-Model) +* 3 [Boot Flow](#3-Boot-Flow) +* 4 [Development Environment Setup](#4-Development-Environment-Setup) +* 5 [Verification](#5-Verification) +* 6 [WIP and Pending Tasks](#6-WIP-and-Pending-Tasks) +* 7 [Known Issues](#7-Known-Issues) +* 8 [Appendix](#8-Appendix) + +## 1 Overview +### 1.1 References +* UEFI Specification v2.10: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_10_Aug29.pdf +* UEFI PI Specification v1.8.0: https://uefi.org/sites/default/files/resources/UEFI_PI_Spec_1_8_March3.pdf +* ACPI Specification v6.5: https://uefi.org/sites/default/files/resources/ACPI_Spec_6_5_Aug29.pdf +* OpenSbi Specification: https://github.com/riscv-software-src/opensbi +* BRS Specification: https://github.com/riscv-non-isa/riscv-brs +* Device Tree Specification v0.4: https://www.devicetree.org/ +* Smbios Specification v3.7.0: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.0.pdf +* Server Soc Specification: https://github.com/riscv-non-isa/server-soc +* Server Platform Specification: https://github.com/riscv-non-isa/riscv-server-platform + +### 1.2 Target Audience +This document is intended for the following readers: +* IHVs and OSVs who actively engaged in the building of the RISC-V ecosystem, serving as a vital component in the vertical integration of systems. +* Bios developers, either those who create general-purpose BIOS and other firmware products or those who modify these products for use in various vendor architecture-based products. +* Other stakeholders who are interested in the RISC-V platform and have firmware development needs. + +### 1.3 Terminology + +| Term | Description +|:-------------------- |:------------------------- +| UEFI | Unified Extensible Firmware Interface +| SBI | Supervisor Binary Interface +| BRS | Boot and Runtime Services +| RVI | [RISC-V International](https://riscv.org/) +| RISE | [RISC-V Software Ecosystem](https://wiki.riseproject.dev/display/HOME/About+RISE) +| SCT | UEFI Self Certification Tests +| FWTS | Firmware Test Suite + + +## 2 Server SOC Reference Model +This chapter introduces the hardware-level topology of ‘rvsp-ref’, allowing users to gain insights into the device list and resource allocation under this model. + +### 2.1 Requirements +This qemu virtual machine (server soc reference board) is required to be compliant with RISC-V [Server SOC Spec](https://github.com/riscv-non-isa/server-soc) as much as possible. The details of Server SOC Requrement can be found in [Table 1 Server SOC Requirement](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-Table1ServerSOCRequirement). + +### 2.2 High Level Design +The Implementation Choices +* Make the configuration as fixed as possible so that this new machine is easy-to-go and less confusing. +* Remove the unnecessary devices as many as possible, e.g. CLINT/PLIC are removed. +* Keep the MemMap entries as similar as RiscVVirt vm for easy adoption at the early stage. +* Keep dtb entries as small as possible. + +Refer to [Table 2 Devices and Memory Mappings](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-Table2DevicesandMemoryMappings) for the details. + +## 3 Boot Flow +The following diagram illustrates various platform initialization scenarios. This document will not cover the detailed work of initializing on real hardware platforms, as it is beyond its scope. Our focus will be on the more general firmware initialization tasks performed on the qemu emulator. See the part of the diagram indicated by the blue color, which corresponds to QemuServerPlatform Boot Flow. + +Note: _For specifics on the qemu Server SOC reference model in this document, it is essential to consult both the latest developments in the qemu source code and the definition in the server platform specifications. Relevant information for both can be obtained from Server SOC TG and Server Platform TG of RVI.c_ + +#### <caption>Figuire 1 RISC-V Platform EDK2 Firmware Enabling Philosophy + +![RISC-V_Platform_EDK2_Firmware_Enabling_Philosophy](https://wiki.riseproject.dev/download/attachments/25395218/RISC-V_Platform_EDK2_Firmware_Enabling_Philosophy.jpg?version=1&modificationDate=1720687252108&api=v2) + +For a more detailed introduction to the background and specifics of Boot-Flow, please refer to [3.1 The Traditional Boot Flow](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-3.1TheTraditionalBootFlow) and [3.2 The Alternative Boot Flow](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-3.2AlternativeBootFlow). To understand the design concepts of other modules, refer to the remaining sections of [this chapter](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-3BootFlow). + +## 4 Development Environment Setup + +### 4.1 Building and running based on BRS environment (**Recommended but not mandatory**) + +1. Build brs test suit +``` +git clone https://github.com/intel/rv-brs-test-suite.git +``` + +Please refer to detailed build steps from [README.md](https://github.com/intel/rv-brs-test-suite/blob/main/README.md), then you will get the following stuff: +``` + QEMU_DIR=$WORKSPACE/rv-brs-test-suite/brsi/scripts/qemu/build + BRS_IMG_DIR=$WORKSPACE/rv-brs-test-suite/brsi/scripts/output + OPENSBI_DIR=$WORKSPACE/rv-brs-test-suite/brsi/scripts/opensbi/build/platform/generic/firmware + EDK2_DIR=$WORKSPACE/rv-brs-test-suite/brsi/scripts/Build/RiscVQemuServerPlatform/DEBUG_GCC5/FV +``` + +2. Boot Execution + +__Command example1__: +``` + ./qemu-system-riscv64 -nographic -m 8G -smp 2 \ + -machine rvsp-ref,pflash0=pflash0,pflash1=pflash1 \ + -blockdev node-name=pflash0,driver=file,read-only=on,filename=$FW_DIR/RISCV_SP_CODE.fd \ + -blockdev node-name=pflash1,driver=file,filename=$FW_DIR/RISCV_SP_VARS.fd \ + -bios $Sbi_DIR/fw_dynamic.bin \ + -drive file=$Img_DIR/brs_live_image.img,if=ide,format=raw +``` +__Note__: +* _‘rvsp-ref’ is a specified qemu-based SOC model, whose source code is still under development and will be accessible from the RVI staging repository later. (The ongoing patch can be found in the note of )_ +* _The Pre-build image ‘brs_live_image.img,if’ can be downloaded in RISC-V BRS Development Suite repository, or you can build it by yourself. See [3.6](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-3.6OSImage)_ +* _‘-bios $Sbi_DIR/fw_dynamic.bin’ the parameter points to the opensbi path. See more in [3.5](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-3.5OpenSbi)._ +* _In case the developer aims to boot just to the UEFI shell, the parameter '-drive file=$Img_DIR/brs_live_image.img,if=ide,format=raw' in the final line is not needed._ + +### 4.2 Compiling edk2 firmware separately outside of BRS (Manually) +1. Building the RISC-V edk2 server platform + +``` +git clone https://github.com/tianocore/edk2.git +cd edk2 +git submodule update --init +cd .. + +git clone https://github.com/tianocore/edk2-platforms.git +cd edk2-platforms +git submodule update --init +cd .. + +export WORKSPACE=`pwd` +export GCC5_RISCV64_PREFIX=riscv64-linux-gnu- +export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-platforms + +cd edk2 +make -C BaseTools clean +make -C BaseTools +source edksetup.sh +./edksetup.sh + +build -a RISCV64 -t GCC5 -p Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc +``` +2. Convert FD files +``` + truncate -s 32M Build/RiscVQemuServerPlatform/DEBUG_GCC5/FV/RISCV_SP_CODE.fd + truncate -s 32M Build/RiscVQemuServerPlatform/DEBUG_GCC5/FV/RISCV_SP_VARS.fd +``` +3. Boot Execution + +(See the __Command example1__) + +## 5 Verification +The tests covered in this document are based on the BRS spec, focusing on two primary modules: SCT and FWTS. The relevant test scripts, pre-build image and guidance can be obtained from the [RISC-V BRS Development Suite Repository](https://github.com/intel/rv-brs-test-suite): + +## 6 WIP and Pending Tasks +The listed items in the table represent ongoing firmware development tasks that are still unfinished. Some specifications are in the process of refinement, and a few are yet to be drafted. Please refer to subsequent updates from the RISE community for more information. + +To see [Table 5 Bios Requirements](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-Table5BiosRequirements) and [Table 6 Upcoming UEFI Features List](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-Table6UpcomingUEFIFeaturesList) + +## 7 Known Issues + +The current known issues, which will be resolved gradually during the subsequent phases of development. Please refer to [Table 7 Known Issues](https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform#EDK2_00_18RISCVQEMUServerReferencePlatform-Table7KnownIssues) for more details. + +## 8 Appendix +NA + +## Contributors +- ~~Evan Chai <evan.chai@intel.com>~~ +- Evan Chai <evan.chai@linux.alibaba.com> \ No newline at end of file -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119918): https://edk2.groups.io/g/devel/message/119918 Mute This Topic: https://groups.io/mt/107187583/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 11+ messages in thread
* 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-12 8:20 [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Evan Chai 2024-07-12 8:20 ` [edk2-devel] [PATCH V3 1/2] RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform Evan Chai 2024-07-12 8:20 ` [edk2-devel] [PATCH V3 2/2] RiscVQemuServerPlatform: added README file Evan Chai @ 2024-07-12 8:30 ` EvanChai 2024-07-19 4:29 ` EvanChai 2024-07-29 2:18 ` 回复:[edk2-devel] " Andrei Warkentin 2 siblings, 2 replies; 11+ messages in thread From: EvanChai @ 2024-07-12 8:30 UTC (permalink / raw) To: Sunil V L; +Cc: devel, evan.chai, Andrei Warkentin, yong.li [-- Attachment #1: Type: text/plain, Size: 3897 bytes --] Hi Sunil, I updated the patch by your solid commetns: 1. I didn't do any change except for renaming in this version, so the code part is no need to be splitted to pieces; 2. I simplified the Readme file, the rest of part were all linked to the RISE wik. <https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform > Then we can keep improving it on that page. Source: https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 <https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 > BR, Evan ------------------------------------------------------------------ 发件人:Evan Chai <evanchai91@gmail.com> 发送时间:2024年7月12日(星期五) 16:20 收件人:devel<devel@edk2.groups.io> 抄 送:Evan Chai<evan.chai@linux.alibaba.com> 主 题:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server This is a foundational patch to move the 'RISC-V QEMU Server Reference Platform' forward. Evan Chai (2): RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform RiscVQemuServerPlatform: added README file Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1432 insertions(+) create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119905): https://edk2.groups.io/g/devel/message/119905 Mute This Topic: https://groups.io/mt/107178717/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- [-- Attachment #2: Type: text/html, Size: 5698 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-12 8:30 ` 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server EvanChai @ 2024-07-19 4:29 ` EvanChai 2024-07-25 8:28 ` [edk2-devel] " Fu Siyuan 2024-07-29 2:18 ` 回复:[edk2-devel] " Andrei Warkentin 1 sibling, 1 reply; 11+ messages in thread From: EvanChai @ 2024-07-19 4:29 UTC (permalink / raw) To: Andrei Warkentin; +Cc: devel, Andrei Warkentin, yong.li, evan.chai, Sunil V L [-- Attachment #1: Type: text/plain, Size: 8296 bytes --] Hi Andrei, Could you help review the patch? As I said before, it is the initial commit for kicking off RV server platform project. Then we can continue to optimize it based on this foundation. More importantly, other developers now have a codebase for developing server platform features. If I remember correctly, the following table lists the next phase of feature implementation that you and Yong discussed a couple of months ago. Let's proceed with the work according to this table. Table 6 Upcoming UEFI Features List Task Category Task Description Comments # Enable Non-Virtio devices1. Add Memory mapped AHCI controller, to enable SATA deviceInlcude drivers for AHCI and Sata, eg: OvmfPkg/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf 2. Add Memory mapped EHCI/XHCI controller to enable USB devicesInclude drivers for XHCI/ECHI for USB devices, eg: MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf 3. Clean-up OVMF version of the NOR flash DXE driver, which supports QEMU's NOR flash emulationExisting OVMF Norflash driver will cause some BRS related cases’ failure, this takes includes the code clean-up and bug fixes to the existing Norflash drvier in OVMF: ExitBootServicesTestVariable * 1, BS.GetNextMonotonicCount * 3, RT.SetVariable - Non-volatile variable after system reset * 4, RT.SetTime - Verify xx after change * 8 4. Enable non-virtio network, eg: E1000E NICThis may depend on QEMU side implementation, and the server platform spec requirement, can take it as low priority and use virtio-net first 5. Enable non-virto VGA displayThis may depend on QEMU side implementation, and the server platform spec requirement, can take it as low priority and use virtio-gpu first # Add initial support for static ACPI tables6. Add the DSDT, FADT, GTDT, SPCR tables for ServerPlatform-Ref platformThis can refer to SBSA’s implementation https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 <https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 > 7. Handle EHCI and XHCI in DSDT, not to try to initialize non-existing hardwareThis can refer to SBSA’s implementation https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html <https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html > # Add SMBIOS tables8. Add SMBIOS tables by referencing ArmPkg/Universal/Smbios, set PcdSmbiosVersion to the version as required by RISCV server platform specRefer to https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 <https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 > 9. Add implementation that provides the system information. The serial numbers, asset tags etc. are currently all fixed strings, to allow fwts to pass without errorsRefer to https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib <https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib > # Move drivers toward to FdtBusPkg-based implementation (This will not be 1st priority)10. Verify and replace the OVMF Norflash driver to device tree-based Norflash driverRefer to https://github.com/intel/FdtBusPkg <https://github.com/intel/FdtBusPkg > 11. Verify and replace the PCI root bridge driver to device tree-based PCI root bridge driverRefer to https://github.com/intel/FdtBusPkg <https://github.com/intel/FdtBusPkg > # MSIC12. Initiate the design by Intel, keep ReadMe.md <http://readme.md/ > update with partnerRefer to https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md <https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md > BR, Evan ------------------------------------------------------------------ 发件人:EvanChai <evan.chai@linux.alibaba.com> 发送时间:2024年7月12日(星期五) 16:30 收件人:Sunil V L<sunilvl@ventanamicro.com> 抄 送:devel<devel@edk2.groups.io>; "evan.chai"<evan.chai@linux.alibaba.com>; Andrei Warkentin<andrei.warkentin@intel.com>; "yong.li"<yong.li@intel.com> 主 题:回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Hi Sunil, I updated the patch by your solid commetns: 1. I didn't do any change except for renaming in this version, so the code part is no need to be splitted to pieces; 2. I simplified the Readme file, the rest of part were all linked to the RISE wik. <https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform > Then we can keep improving it on that page. Source: https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 <https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 > BR, Evan ------------------------------------------------------------------ 发件人:Evan Chai <evanchai91@gmail.com> 发送时间:2024年7月12日(星期五) 16:20 收件人:devel<devel@edk2.groups.io> 抄 送:Evan Chai<evan.chai@linux.alibaba.com> 主 题:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server This is a foundational patch to move the 'RISC-V QEMU Server Reference Platform' forward. Evan Chai (2): RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform RiscVQemuServerPlatform: added README file Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1432 insertions(+) create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119979): https://edk2.groups.io/g/devel/message/119979 Mute This Topic: https://groups.io/mt/107178717/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- [-- Attachment #2: Type: text/html, Size: 19549 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-19 4:29 ` EvanChai @ 2024-07-25 8:28 ` Fu Siyuan 2024-07-25 12:08 ` 回复:[edk2-devel] " EvanChai 0 siblings, 1 reply; 11+ messages in thread From: Fu Siyuan @ 2024-07-25 8:28 UTC (permalink / raw) To: devel, EvanChai; +Cc: Andrei Warkentin, yong.li, Sunil V L [-- Attachment #1: Type: text/plain, Size: 10561 bytes --] Hi, Evan Here are some more comments for the Readme.md in the v2.5 branch. https://github.com/ChaiEvan/edk2-platforms/blob/RV_ServerPlatformRef_v2.5/Platform/Qemu/RiscVQemuServerPlatform/Readme.md 1. Please remove the Revision History section, since this is a readme file instead of a formal released document. I guess you may copied from a design doc of this Pkg? If yes pls put a link here. 2. The “2.1 Requirements” and “2.2 High Level Design” are describing the QEMO model requirement/design, not this platform package. Please replace them by a link to the QEMO model doc. It doesn’t make sense to maintain these content here. 3. About figure 1 “RISC-V Platform EDK2 Firmware Enabling Philosophy” in section 3. It makes me confuse about the platform enabling philosophy instead of explained it. The dotted line “QemuVirt Boot Flow” and blue like “QemuServerPlatform Boot Flow” behaves exactly same with each other - both loaded OpenSbi, both consume VirtDevices dotted box, and both boot to Shell/Linux - so what’s the meaning of creating a new QemuServerPlatform package and what’s the expected diffenence (benifit) vs the existing Virt? Please consider to update this figure to make it more clear. Again, considering the boot flow design may change, please move it to the design doc. 4. Please reverse the order of Section 4.1 built test, 4.2 build platform BIOS, or move 4.1 to 5 Verification. A common dev setup process should be like “download code, build it, then test”. 5. Please remove the 8 Appendix if there is no content. 6. Please remove your old email address, not cross it out. Best Regards, Siyuan On 19 Jul 2024, at 12:29, EvanChai wrote: > Hi Andrei, > Could you help review the patch? > As I said before, it is the initial commit for kicking off RV server > platform project. Then we can continue to optimize it based on this > foundation. More importantly, other developers now have a codebase for > developing server platform features. > If I remember correctly, the following table lists the next phase of > feature implementation that you and Yong discussed a couple of months > ago. Let's proceed with the work according to this table. > Table 6 Upcoming UEFI Features List > Task Category > Task Description > Comments > # Enable Non-Virtio devices1. Add Memory mapped AHCI controller, to > enable SATA deviceInlcude drivers for AHCI and Sata, eg: > OvmfPkg/SataControllerDxe/SataControllerDxe.inf > MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf > MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf > 2. Add Memory mapped EHCI/XHCI controller to enable USB devicesInclude > drivers for XHCI/ECHI for USB devices, eg: > MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf > MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf > MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf > MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf > 3. Clean-up OVMF version of the NOR flash DXE driver, which supports > QEMU's NOR flash emulationExisting OVMF Norflash driver will cause > some BRS related cases’ failure, this takes includes the code > clean-up and bug fixes to the existing Norflash drvier in OVMF: > ExitBootServicesTestVariable * 1, BS.GetNextMonotonicCount * 3, > RT.SetVariable - Non-volatile variable after system reset * 4, > RT.SetTime - Verify xx after change * 8 > 4. Enable non-virtio network, eg: E1000E NICThis may depend on QEMU > side implementation, and the server platform spec requirement, can > take it as low priority and use virtio-net first > 5. Enable non-virto VGA displayThis may depend on QEMU side > implementation, and the server platform spec requirement, can take it > as low priority and use virtio-gpu first > # Add initial support for static ACPI tables6. Add the DSDT, FADT, > GTDT, SPCR tables for ServerPlatform-Ref platformThis can refer to > SBSA’s implementation > https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 > <https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 > > > 7. Handle EHCI and XHCI in DSDT, not to try to initialize non-existing > hardwareThis can refer to SBSA’s implementation > https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html > <https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html > > # Add SMBIOS tables8. Add SMBIOS tables by referencing > ArmPkg/Universal/Smbios, set PcdSmbiosVersion to the version as > required by RISCV server platform specRefer to > https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 > <https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 > > > 9. Add implementation that provides the system information. The serial > numbers, asset tags etc. are currently all fixed strings, to allow > fwts to pass without errorsRefer to > https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib > <https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib > > > # Move drivers toward to FdtBusPkg-based implementation (This will not > be 1st priority)10. Verify and replace the OVMF Norflash driver to > device tree-based Norflash driverRefer to > https://github.com/intel/FdtBusPkg <https://github.com/intel/FdtBusPkg > > > 11. Verify and replace the PCI root bridge driver to device tree-based > PCI root bridge driverRefer to https://github.com/intel/FdtBusPkg > <https://github.com/intel/FdtBusPkg > > # MSIC12. Initiate the design by Intel, keep ReadMe.md > <http://readme.md/ > update with partnerRefer to > https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md > <https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md > > > BR, > Evan > ------------------------------------------------------------------ > 发件人:EvanChai <evan.chai@linux.alibaba.com> > 发送时间:2024年7月12日(星期五) 16:30 > 收件人:Sunil V L<sunilvl@ventanamicro.com> > 抄 送:devel<devel@edk2.groups.io>; > "evan.chai"<evan.chai@linux.alibaba.com>; Andrei > Warkentin<andrei.warkentin@intel.com>; "yong.li"<yong.li@intel.com> > 主 题:回复:[edk2-devel] [PATCH V3 0/2] Initial commit for > RISC-V Qemu-based Server > Hi Sunil, > I updated the patch by your solid commetns: > 1. I didn't do any change except for renaming in this version, so the > code part is no need to be splitted to pieces; > 2. I simplified the Readme file, the rest of part were all linked to > the RISE wik. > <https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform > > Then we can keep improving it on that page. > Source: > https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 > <https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 > > > BR, > Evan > ------------------------------------------------------------------ > 发件人:Evan Chai <evanchai91@gmail.com> > 发送时间:2024年7月12日(星期五) 16:20 > 收件人:devel<devel@edk2.groups.io> > 抄 送:Evan Chai<evan.chai@linux.alibaba.com> > 主 题:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V > Qemu-based Server > This is a foundational patch to move the 'RISC-V QEMU Server Reference > Platform' forward. > Evan Chai (2): > RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server > platform > RiscVQemuServerPlatform: added README file > Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | > 496 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc > | 341 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | > 317 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc > | 41 +++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 6 files changed, 1432 insertions(+) > create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md > create mode 100644 > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc > create mode 100644 > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc > create mode 100644 > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf > create mode 100644 > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc > create mode 100644 > Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc > -- > 2.45.1.windows.1 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120032): https://edk2.groups.io/g/devel/message/120032 Mute This Topic: https://groups.io/mt/107539286/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- [-- Attachment #2: Type: text/html, Size: 22321 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-25 8:28 ` [edk2-devel] " Fu Siyuan @ 2024-07-25 12:08 ` EvanChai 2024-07-26 1:27 ` [edk2-devel] " Fu Siyuan 0 siblings, 1 reply; 11+ messages in thread From: EvanChai @ 2024-07-25 12:08 UTC (permalink / raw) To: devel, siyuan.fu; +Cc: Andrei Warkentin, yong.li, Sunil V L [-- Attachment #1: Type: text/plain, Size: 11722 bytes --] Hi Siyuan, Thanks for your comments. 1. will remove it in the next patch 2. In my oppinion, we should keep the content here. Similar to how writing a manual for a development board starts with an introduction to its hardware architecture, our server platform relies on a virtual hardware topology, which is currently 'rvsp-ref'. Based on Sunil's earlier recommendation, I have moved all relevant hardware information tables out of this document and created a minimal hardware introduction (or index). Moreover, no 'Qemu model documentation' or similar document exists at present. 3. I am considering improving several details in this image, or I might temporarily move it outside and merge it back in the next version once it is ready. 4. My intention is actually: in 4.1, try to describe the automation of downloading, compiling, executing, and testing through the rv-brs-test-suit repo. And in 4.2, describe the manual steps for performing the above tasks. I will reconsider how to optimize this section. Maybe Chapter 5 is not suitable as a separate chapter. 5. Will remove it in the next patch 6. Will remove it. BR, Evan ------------------------------------------------------------------ 发件人:Fu Siyuan <siyuan.fu@linux.alibaba.com> 发送时间:2024年7月25日(星期四) 16:28 收件人:devel<devel@edk2.groups.io>; EvanChai<evan.chai@linux.alibaba.com> 抄 送:Andrei Warkentin<andrei.warkentin@intel.com>; "yong.li"<yong.li@intel.com>; Sunil V L<sunilvl@ventanamicro.com> 主 题:Re: [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Hi, Evan Here are some more comments for the Readme.md in the v2.5 branch. https://github.com/ChaiEvan/edk2-platforms/blob/RV_ServerPlatformRef_v2.5/Platform/Qemu/RiscVQemuServerPlatform/Readme.md <https://github.com/ChaiEvan/edk2-platforms/blob/RV_ServerPlatformRef_v2.5/Platform/Qemu/RiscVQemuServerPlatform/Readme.md > * Please remove the Revision History section, since this is a readme file instead of a formal released document. I guess you may copied from a design doc of this Pkg? If yes pls put a link here. * The “2.1 Requirements” and “2.2 High Level Design” are describing the QEMO model requirement/design, not this platform package. Please replace them by a link to the QEMO model doc. It doesn’t make sense to maintain these content here. * About figure 1 “RISC-V Platform EDK2 Firmware Enabling Philosophy” in section 3. It makes me confuse about the platform enabling philosophy instead of explained it. The dotted line “QemuVirt Boot Flow” and blue like “QemuServerPlatform Boot Flow” behaves exactly same with each other - both loaded OpenSbi, both consume VirtDevices dotted box, and both boot to Shell/Linux - so what’s the meaning of creating a new QemuServerPlatform package and what’s the expected diffenence (benifit) vs the existing Virt? Please consider to update this figure to make it more clear. Again, considering the boot flow design may change, please move it to the design doc. * Please reverse the order of Section 4.1 built test, 4.2 build platform BIOS, or move 4.1 to 5 Verification. A common dev setup process should be like “download code, build it, then test”. * Please remove the 8 Appendix if there is no content. * Please remove your old email address, not cross it out. Best Regards, Siyuan On 19 Jul 2024, at 12:29, EvanChai wrote: Hi Andrei, Could you help review the patch? As I said before, it is the initial commit for kicking off RV server platform project. Then we can continue to optimize it based on this foundation. More importantly, other developers now have a codebase for developing server platform features. If I remember correctly, the following table lists the next phase of feature implementation that you and Yong discussed a couple of months ago. Let's proceed with the work according to this table. Table 6 Upcoming UEFI Features List Task Category Task Description Comments # Enable Non-Virtio devices1. Add Memory mapped AHCI controller, to enable SATA deviceInlcude drivers for AHCI and Sata, eg: OvmfPkg/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf 2. Add Memory mapped EHCI/XHCI controller to enable USB devicesInclude drivers for XHCI/ECHI for USB devices, eg: MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf 3. Clean-up OVMF version of the NOR flash DXE driver, which supports QEMU's NOR flash emulationExisting OVMF Norflash driver will cause some BRS related cases’ failure, this takes includes the code clean-up and bug fixes to the existing Norflash drvier in OVMF: ExitBootServicesTestVariable * 1, BS.GetNextMonotonicCount * 3, RT.SetVariable - Non-volatile variable after system reset * 4, RT.SetTime - Verify xx after change * 8 4. Enable non-virtio network, eg: E1000E NICThis may depend on QEMU side implementation, and the server platform spec requirement, can take it as low priority and use virtio-net first 5. Enable non-virto VGA displayThis may depend on QEMU side implementation, and the server platform spec requirement, can take it as low priority and use virtio-gpu first # Add initial support for static ACPI tables6. Add the DSDT, FADT, GTDT, SPCR tables for ServerPlatform-Ref platformThis can refer to SBSA’s implementation https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 <https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 > 7. Handle EHCI and XHCI in DSDT, not to try to initialize non-existing hardwareThis can refer to SBSA’s implementation https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html <https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html > # Add SMBIOS tables8. Add SMBIOS tables by referencing ArmPkg/Universal/Smbios, set PcdSmbiosVersion to the version as required by RISCV server platform specRefer to https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 <https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 > 9. Add implementation that provides the system information. The serial numbers, asset tags etc. are currently all fixed strings, to allow fwts to pass without errorsRefer to https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib <https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib > # Move drivers toward to FdtBusPkg-based implementation (This will not be 1st priority)10. Verify and replace the OVMF Norflash driver to device tree-based Norflash driverRefer to https://github.com/intel/FdtBusPkg <https://github.com/intel/FdtBusPkg > 11. Verify and replace the PCI root bridge driver to device tree-based PCI root bridge driverRefer to https://github.com/intel/FdtBusPkg <https://github.com/intel/FdtBusPkg > # MSIC12. Initiate the design by Intel, keep ReadMe.md <http://readme.md/ > update with partnerRefer to https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md <https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md > BR, Evan ------------------------------------------------------------------ 发件人:EvanChai <evan.chai@linux.alibaba.com> 发送时间:2024年7月12日(星期五) 16:30 收件人:Sunil V L<sunilvl@ventanamicro.com> 抄 送:devel<devel@edk2.groups.io>; "evan.chai"<evan.chai@linux.alibaba.com>; Andrei Warkentin<andrei.warkentin@intel.com>; "yong.li"<yong.li@intel.com> 主 题:回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Hi Sunil, I updated the patch by your solid commetns: 1. I didn't do any change except for renaming in this version, so the code part is no need to be splitted to pieces; 2. I simplified the Readme file, the rest of part were all linked to the RISE wik. <https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform > Then we can keep improving it on that page. Source: https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 <https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 > BR, Evan ------------------------------------------------------------------ 发件人:Evan Chai <evanchai91@gmail.com> 发送时间:2024年7月12日(星期五) 16:20 收件人:devel<devel@edk2.groups.io> 抄 送:Evan Chai<evan.chai@linux.alibaba.com> 主 题:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server This is a foundational patch to move the 'RISC-V QEMU Server Reference Platform' forward. Evan Chai (2): RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform RiscVQemuServerPlatform: added README file Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1432 insertions(+) create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120038): https://edk2.groups.io/g/devel/message/120038 Mute This Topic: https://groups.io/mt/107541291/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- [-- Attachment #2: Type: text/html, Size: 23920 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-25 12:08 ` 回复:[edk2-devel] " EvanChai @ 2024-07-26 1:27 ` Fu Siyuan 0 siblings, 0 replies; 11+ messages in thread From: Fu Siyuan @ 2024-07-26 1:27 UTC (permalink / raw) To: devel, EvanChai; +Cc: Andrei Warkentin, yong.li, Sunil V L Hi Evan On 25 Jul 2024, at 20:08, EvanChai wrote: > Hi Siyuan, > Thanks for your comments. > 1. will remove it in the next patch > 2. In my oppinion, we should keep the content here. Similar to how writing a manual for a development board starts with an introduction to its hardware architecture, our server platform relies on a virtual hardware topology, which is currently 'rvsp-ref'. Based on Sunil's earlier recommendation, I have moved all relevant hardware information tables out of this document and created a minimal hardware introduction (or index). Moreover, no 'Qemu model documentation' or similar document exists at present. > 3. I am considering improving several details in this image, or I might temporarily move it outside and merge it back in the next version once it is ready. > 4. My intention is actually: in 4.1, try to describe the automation of downloading, compiling, executing, and testing through the rv-brs-test-suit repo. And in 4.2, describe the manual steps for performing the above tasks. I will reconsider how to optimize this section. Maybe Chapter 5 is not suitable as a separate chapter. I didn’t find how the automatic build is performed in 4.1. Will the operations in 4.1.1/4.1.2 point $FW_DIR to this RiscVQemuServerPlatform and generate the required RISCV_SP_CODE/VARS.fd file? Best Regards, Siyuan > 5. Will remove it in the next patch > 6. Will remove it. > BR, > Evan > ------------------------------------------------------------------ > 发件人:Fu Siyuan <siyuan.fu@linux.alibaba.com> > 发送时间:2024年7月25日(星期四) 16:28 > 收件人:devel<devel@edk2.groups.io>; EvanChai<evan.chai@linux.alibaba.com> > 抄 送:Andrei Warkentin<andrei.warkentin@intel.com>; "yong.li"<yong.li@intel.com>; Sunil V L<sunilvl@ventanamicro.com> > 主 题:Re: [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server > Hi, Evan > Here are some more comments for the Readme.md in the v2.5 branch. > https://github.com/ChaiEvan/edk2-platforms/blob/RV_ServerPlatformRef_v2.5/Platform/Qemu/RiscVQemuServerPlatform/Readme.md <https://github.com/ChaiEvan/edk2-platforms/blob/RV_ServerPlatformRef_v2.5/Platform/Qemu/RiscVQemuServerPlatform/Readme.md > > > * > Please remove the Revision History section, since this is a readme file instead of a formal released document. I guess you may copied from a design doc of this Pkg? If yes pls put a link here. > > * > The “2.1 Requirements” and “2.2 High Level Design” are describing the QEMO model requirement/design, not this platform package. Please replace them by a link to the QEMO model doc. It doesn’t make sense to maintain these content here. > > * > About figure 1 “RISC-V Platform EDK2 Firmware Enabling Philosophy” in section 3. It makes me confuse about the platform enabling philosophy instead of explained it. The dotted line “QemuVirt Boot Flow” and blue like “QemuServerPlatform Boot Flow” behaves exactly same with each other - both loaded OpenSbi, both consume VirtDevices dotted box, and both boot to Shell/Linux - so what’s the meaning of creating a new QemuServerPlatform package and what’s the expected diffenence (benifit) vs the existing Virt? Please consider to update this figure to make it more clear. Again, considering the boot flow design may change, please move it to the design doc. > > * > Please reverse the order of Section 4.1 built test, 4.2 build platform BIOS, or move 4.1 to 5 Verification. A common dev setup process should be like “download code, build it, then test”. > > * > Please remove the 8 Appendix if there is no content. > > * > Please remove your old email address, not cross it out. > Best Regards, > Siyuan > On 19 Jul 2024, at 12:29, EvanChai wrote: > Hi Andrei, > Could you help review the patch? > As I said before, it is the initial commit for kicking off RV server platform project. Then we can continue to optimize it based on this foundation. More importantly, other developers now have a codebase for developing server platform features. > If I remember correctly, the following table lists the next phase of feature implementation that you and Yong discussed a couple of months ago. Let's proceed with the work according to this table. > Table 6 Upcoming UEFI Features List > Task Category > Task Description > Comments > # Enable Non-Virtio devices1. Add Memory mapped AHCI controller, to enable SATA deviceInlcude drivers for AHCI and Sata, eg: OvmfPkg/SataControllerDxe/SataControllerDxe.inf MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf > 2. Add Memory mapped EHCI/XHCI controller to enable USB devicesInclude drivers for XHCI/ECHI for USB devices, eg: MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf > 3. Clean-up OVMF version of the NOR flash DXE driver, which supports QEMU's NOR flash emulationExisting OVMF Norflash driver will cause some BRS related cases’ failure, this takes includes the code clean-up and bug fixes to the existing Norflash drvier in OVMF: ExitBootServicesTestVariable * 1, BS.GetNextMonotonicCount * 3, RT.SetVariable - Non-volatile variable after system reset * 4, RT.SetTime - Verify xx after change * 8 > 4. Enable non-virtio network, eg: E1000E NICThis may depend on QEMU side implementation, and the server platform spec requirement, can take it as low priority and use virtio-net first > 5. Enable non-virto VGA displayThis may depend on QEMU side implementation, and the server platform spec requirement, can take it as low priority and use virtio-gpu first > # Add initial support for static ACPI tables6. Add the DSDT, FADT, GTDT, SPCR tables for ServerPlatform-Ref platformThis can refer to SBSA’s implementation https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 <https://github.com/tianocore/edk2-platforms/commit/4476e34cf93458e0ea84820fb88e82a2997e5075 > > 7. Handle EHCI and XHCI in DSDT, not to try to initialize non-existing hardwareThis can refer to SBSA’s implementation https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html <https://www.mail-archive.com/devel@edk2.groups.io/msg64706.html > > # Add SMBIOS tables8. Add SMBIOS tables by referencing ArmPkg/Universal/Smbios, set PcdSmbiosVersion to the version as required by RISCV server platform specRefer to https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 <https://github.com/tianocore/edk2-platforms/commit/c2016d9b6836acc27df939f0cccffe61c1bac492 > > 9. Add implementation that provides the system information. The serial numbers, asset tags etc. are currently all fixed strings, to allow fwts to pass without errorsRefer to https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib <https://github.com/tianocore/edk2-platforms/tree/master/Platform/Qemu/SbsaQemu/OemMiscLib > > # Move drivers toward to FdtBusPkg-based implementation (This will not be 1st priority)10. Verify and replace the OVMF Norflash driver to device tree-based Norflash driverRefer to https://github.com/intel/FdtBusPkg <https://github.com/intel/FdtBusPkg > > 11. Verify and replace the PCI root bridge driver to device tree-based PCI root bridge driverRefer to https://github.com/intel/FdtBusPkg <https://github.com/intel/FdtBusPkg > > # MSIC12. Initiate the design by Intel, keep ReadMe.md <http://readme.md/ > update with partnerRefer to https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md <https://github.com/tianocore/edk2-platforms/blob/master/Platform/Qemu/SbsaQemu/Readme.md > > BR, > Evan > ------------------------------------------------------------------ > 发件人:EvanChai <evan.chai@linux.alibaba.com> > 发送时间:2024年7月12日(星期五) 16:30 > 收件人:Sunil V L<sunilvl@ventanamicro.com> > 抄 送:devel<devel@edk2.groups.io>; "evan.chai"<evan.chai@linux.alibaba.com>; Andrei Warkentin<andrei.warkentin@intel.com>; "yong.li"<yong.li@intel.com> > 主 题:回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server > Hi Sunil, > I updated the patch by your solid commetns: > 1. I didn't do any change except for renaming in this version, so the code part is no need to be splitted to pieces; > 2. I simplified the Readme file, the rest of part were all linked to the RISE wik. <https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform > Then we can keep improving it on that page. > Source: https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 <https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 > > BR, > Evan > ------------------------------------------------------------------ > 发件人:Evan Chai <evanchai91@gmail.com> > 发送时间:2024年7月12日(星期五) 16:20 > 收件人:devel<devel@edk2.groups.io> > 抄 送:Evan Chai<evan.chai@linux.alibaba.com> > 主 题:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server > This is a foundational patch to move the 'RISC-V QEMU Server Reference Platform' forward. > Evan Chai (2): > RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server > platform > RiscVQemuServerPlatform: added README file > Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ > Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 6 files changed, 1432 insertions(+) > create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md > create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc > create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc > create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf > create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc > create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc > -- > 2.45.1.windows.1 > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120044): https://edk2.groups.io/g/devel/message/120044 Mute This Topic: https://groups.io/mt/107554783/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-12 8:30 ` 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server EvanChai 2024-07-19 4:29 ` EvanChai @ 2024-07-29 2:18 ` Andrei Warkentin 2024-07-29 3:10 ` 回复:回复:[edk2-devel] " EvanChai 1 sibling, 1 reply; 11+ messages in thread From: Andrei Warkentin @ 2024-07-29 2:18 UTC (permalink / raw) To: EvanChai, Sunil V L; +Cc: devel, Li, Yong [-- Attachment #1: Type: text/plain, Size: 4712 bytes --] Thanks Evan for your continued work! This initial commit looks good to me and is consistent with the approach we’ve discussed in the past. I’ll leave it up to you if you want to mention the Server Platform TG/spec in your README. Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com<mailto:andrei.warkentin@intel.com>> A From: EvanChai <evan.chai@linux.alibaba.com> Sent: Friday, July 12, 2024 3:30 AM To: Sunil V L <sunilvl@ventanamicro.com> Cc: devel <devel@edk2.groups.io>; evan.chai <evan.chai@linux.alibaba.com>; Warkentin, Andrei <andrei.warkentin@intel.com>; Li, Yong <yong.li@intel.com> Subject: 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Hi Sunil, I updated the patch by your solid commetns: 1. I didn't do any change except for renaming in this version, so the code part is no need to be splitted to pieces; 2. I simplified the Readme file, the rest of part were all linked to the RISE wik.<https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform> Then we can keep improving it on that page. Source: https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 BR, Evan ------------------------------------------------------------------ 发件人:Evan Chai <evanchai91@gmail.com<mailto:evanchai91@gmail.com>> 发送时间:2024年7月12日(星期五) 16:20 收件人:devel<devel@edk2.groups.io<mailto:devel@edk2.groups.io>> 抄 送:Evan Chai<evan.chai@linux.alibaba.com<mailto:evan.chai@linux.alibaba.com>> 主 题:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server This is a foundational patch to move the 'RISC-V QEMU Server Reference Platform' forward. Evan Chai (2): RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform RiscVQemuServerPlatform: added README file Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1432 insertions(+) create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120060): https://edk2.groups.io/g/devel/message/120060 Mute This Topic: https://groups.io/mt/107178717/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- [-- Attachment #2: Type: text/html, Size: 11864 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* 回复:回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-29 2:18 ` 回复:[edk2-devel] " Andrei Warkentin @ 2024-07-29 3:10 ` EvanChai 2024-07-29 6:30 ` Sunil V L 0 siblings, 1 reply; 11+ messages in thread From: EvanChai @ 2024-07-29 3:10 UTC (permalink / raw) To: devel, andrei.warkentin, Sunil V L; +Cc: Li, Yong [-- Attachment #1: Type: text/plain, Size: 5306 bytes --] Hi Andrei, Great! It looks that we are on the same page. Let's kick off this project now. Hi Sunil, May I get another +1 from you, or any comments are welcome? BR, Evan ------------------------------------------------------------------ 发件人:Andrei Warkentin <andrei.warkentin@intel.com> 发送时间:2024年7月29日(星期一) 10:19 收件人:EvanChai<evan.chai@linux.alibaba.com>; Sunil V L<sunilvl@ventanamicro.com> 抄 送:devel<devel@edk2.groups.io>; "Li, Yong"<yong.li@intel.com> 主 题:Re: 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Thanks Evan for your continued work! This initial commit looks good to me and is consistent with the approach we’ve discussed in the past. I’ll leave it up to you if you want to mention the Server Platform TG/spec in your README. Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com <mailto:andrei.warkentin@intel.com >> A From: EvanChai <evan.chai@linux.alibaba.com> Sent: Friday, July 12, 2024 3:30 AM To: Sunil V L <sunilvl@ventanamicro.com> Cc: devel <devel@edk2.groups.io>; evan.chai <evan.chai@linux.alibaba.com>; Warkentin, Andrei <andrei.warkentin@intel.com>; Li, Yong <yong.li@intel.com> Subject: 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Hi Sunil, I updated the patch by your solid commetns: 1. I didn't do any change except for renaming in this version, so the code part is no need to be splitted to pieces; 2. I simplified the Readme file, the rest of part were all linked to the RISE wik. <https://wiki.riseproject.dev/display/HOME/EDK2_00_18+-+RISC-V+QEMU+Server+Reference+Platform > Then we can keep improving it on that page. Source: https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 <https://github.com/ChaiEvan/edk2-platforms/commits/RV_ServerPlatformRef_v2.5 > BR, Evan ------------------------------------------------------------------ 发件人:Evan Chai <evanchai91@gmail.com <mailto:evanchai91@gmail.com >> 发送时间:2024年7月12日(星期五) 16:20 收件人:devel<devel@edk2.groups.io <mailto:devel@edk2.groups.io >> 抄 送:Evan Chai<evan.chai@linux.alibaba.com <mailto:evan.chai@linux.alibaba.com >> 主 题:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server This is a foundational patch to move the 'RISC-V QEMU Server Reference Platform' forward. Evan Chai (2): RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform RiscVQemuServerPlatform: added README file Platform/Qemu/RiscVQemuServerPlatform/Readme.md | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc | 496 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc | 41 +++++++++++++++++++++++++++++++++++++++++ Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1432 insertions(+) create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/Readme.md create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.dsc.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/RiscVQemuServerPlatform.fdf.inc create mode 100644 Platform/Qemu/RiscVQemuServerPlatform/VarStore.fdf.inc -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120061): https://edk2.groups.io/g/devel/message/120061 Mute This Topic: https://groups.io/mt/107602994/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- [-- Attachment #2: Type: text/html, Size: 14229 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 回复:回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server 2024-07-29 3:10 ` 回复:回复:[edk2-devel] " EvanChai @ 2024-07-29 6:30 ` Sunil V L 0 siblings, 0 replies; 11+ messages in thread From: Sunil V L @ 2024-07-29 6:30 UTC (permalink / raw) To: EvanChai; +Cc: devel, andrei.warkentin, Li, Yong On Mon, Jul 29, 2024 at 11:10:52AM +0800, EvanChai wrote: > Hi Andrei, > Great! It looks that we are on the same page. Let's kick off this project now. > Hi Sunil, > May I get another +1 from you, or any comments are welcome? Hi Evan, Could you send the next version for Siyuan's feedback? Thanks, Sunil -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120063): https://edk2.groups.io/g/devel/message/120063 Mute This Topic: https://groups.io/mt/107602994/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-07-29 6:30 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-07-12 8:20 [edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server Evan Chai 2024-07-12 8:20 ` [edk2-devel] [PATCH V3 1/2] RiscVQemuServerPlatform: Initial commit for RISC-V Qemu-based Server platform Evan Chai 2024-07-12 8:20 ` [edk2-devel] [PATCH V3 2/2] RiscVQemuServerPlatform: added README file Evan Chai 2024-07-12 8:30 ` 回复:[edk2-devel] [PATCH V3 0/2] Initial commit for RISC-V Qemu-based Server EvanChai 2024-07-19 4:29 ` EvanChai 2024-07-25 8:28 ` [edk2-devel] " Fu Siyuan 2024-07-25 12:08 ` 回复:[edk2-devel] " EvanChai 2024-07-26 1:27 ` [edk2-devel] " Fu Siyuan 2024-07-29 2:18 ` 回复:[edk2-devel] " Andrei Warkentin 2024-07-29 3:10 ` 回复:回复:[edk2-devel] " EvanChai 2024-07-29 6:30 ` Sunil V L
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox