This commit is contained in:
yamahata 2026-08-26 18:00:37 +00:00 committed by GitHub
commit 7537a1bbb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 42 additions and 7 deletions

View file

@ -47,6 +47,9 @@
TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf
ArmTransferListLib|ArmPkg/Library/ArmTransferListLib/ArmTransferListLib.inf
# Required by OvmfPkg/SmbiosPlatformDxe (compiled for all archs; unused on ARM)
QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibNull.inf
!include MdePkg/MdeLibs.dsc.inc
[LibraryClasses.common.PEIM]
@ -82,6 +85,11 @@
# Rsdp base address in Cloud Hypervisor
gArmVirtTokenSpaceGuid.PcdCloudHvAcpiRsdpBaseAddress|0x40200000
# Smbios base address in Cloud Hypervisor. Must match the aarch64 SMBIOS
# staging address used by cloud-hypervisor
# ABI between cloud-hypervisor and firmware.
gUefiOvmfPkgTokenSpaceGuid.PcdCloudHvSmbiosBaseAddress|0x403F0000
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x4000000
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
@ -180,6 +188,20 @@
gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
# ArmVirtCloudHv is by construction the Cloud Hypervisor platform. On X64
# this PCD is discovered at runtime by OvmfPkg/PlatformPei probing the host
# bridge. As there is no such probe on aarch64, define it statically.
# OvmfPkg/SmbiosPlatformDxe uses this bridge device id.
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0x0D57
#
# SMBIOS entry point version. Follow ArmVirtQemu rather than the X64
# CloudHv platform: OvmfPkg/CloudHv/CloudHvX64.dsc pins 0x0208 for
# pre-2015 x86 guests. AArch64 does not have such a concern.
#
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0300
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0
[PcdsDynamicHii]
gUefiOvmfPkgTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gOvmfVariableGuid|0x0|FALSE|NV,BS
@ -249,6 +271,12 @@
#
MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
#
# SMBIOS Support
#
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
#
# ACPI Support
#

View file

@ -180,6 +180,12 @@ READ_LOCK_STATUS = TRUE
INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
#
# SMBIOS Support
#
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
#
# ACPI Support
#

View file

@ -31,8 +31,3 @@
// 32-bit MMIO memory hole size
//
#define CLOUDHV_MMIO_HOLE_SIZE 0x38000000
//
// SMBIOS address
//
#define CLOUDHV_SMBIOS_ADDRESS 0xf0000

View file

@ -398,6 +398,11 @@
# messages will be overwritten by more recent messages.
gUefiOvmfPkgTokenSpaceGuid.PcdMemDebugLogPages|32|UINT32|0x7c
## The base address where the SMBIOS 3.0 tables placed by cloud-hypervisor
# can be found. Defaults to 0xf0000, the address used on
# X64; other CloudHv platforms (e.g. ArmVirtCloudHv) may override this.
gUefiOvmfPkgTokenSpaceGuid.PcdCloudHvSmbiosBaseAddress|0xf0000|UINT64|0x81
[PcdsDynamic, PcdsDynamicEx]
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10

View file

@ -4,8 +4,8 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <IndustryStandard/CloudHv.h> // CLOUDHV_SMBIOS_ADDRESS
#include <IndustryStandard/SmBios.h> // SMBIOS_TABLE_3_0_ENTRY_POINT
#include <Library/PcdLib.h>
/**
Locates and extracts Cloud Hypervisor SMBIOS data
@ -18,7 +18,7 @@ GetCloudHvSmbiosTables (
VOID
)
{
SMBIOS_TABLE_3_0_ENTRY_POINT *CloudHvTables = (VOID *)CLOUDHV_SMBIOS_ADDRESS;
SMBIOS_TABLE_3_0_ENTRY_POINT *CloudHvTables = (VOID *)(UINTN)PcdGet64 (PcdCloudHvSmbiosBaseAddress);
if ((CloudHvTables->AnchorString[0] == '_') &&
(CloudHvTables->AnchorString[1] == 'S') &&

View file

@ -40,6 +40,7 @@
UefiDriverEntryPoint
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdCloudHvSmbiosBaseAddress
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor