2 Find and extract SMBIOS data.
4 SPDX-License-Identifier: BSD-2-Clause-Patent
7 #include <Library/MemoryAllocationLib.h> // FreePool()
8 #include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
10 #include "SmbiosPlatformDxe.h"
13 Installs SMBIOS information for OVMF
15 @param ImageHandle Module's image handle
16 @param SystemTable Pointer of EFI_SYSTEM_TABLE
18 @retval EFI_SUCCESS Smbios data successfully installed
19 @retval Other Smbios data was not installed
24 SmbiosTablePublishEntry (
25 IN EFI_HANDLE ImageHandle
,
26 IN EFI_SYSTEM_TABLE
*SystemTable
31 UINT16 HostBridgeDevId
;
33 Status
= EFI_NOT_FOUND
;
35 // Add SMBIOS data if found
37 HostBridgeDevId
= PcdGet16 (PcdOvmfHostBridgePciDevId
);
38 if (HostBridgeDevId
== CLOUDHV_DEVICE_ID
) {
39 SmbiosTables
= GetCloudHvSmbiosTables ();
40 if (SmbiosTables
!= NULL
) {
41 Status
= InstallAllStructures (SmbiosTables
);
44 SmbiosTables
= GetQemuSmbiosTables ();
45 if (SmbiosTables
!= NULL
) {
46 Status
= InstallAllStructures (SmbiosTables
);
47 FreePool (SmbiosTables
);