VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/SmbiosPlatformDxe/EntryPoint.c@ 99404

Last change on this file since 99404 was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1/** @file
2 Find and extract SMBIOS data.
3
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5**/
6
7#include <Library/MemoryAllocationLib.h> // FreePool()
8#include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
9
10#include "SmbiosPlatformDxe.h"
11
12/**
13 Installs SMBIOS information for OVMF
14
15 @param ImageHandle Module's image handle
16 @param SystemTable Pointer of EFI_SYSTEM_TABLE
17
18 @retval EFI_SUCCESS Smbios data successfully installed
19 @retval Other Smbios data was not installed
20
21**/
22EFI_STATUS
23EFIAPI
24SmbiosTablePublishEntry (
25 IN EFI_HANDLE ImageHandle,
26 IN EFI_SYSTEM_TABLE *SystemTable
27 )
28{
29 EFI_STATUS Status;
30 UINT8 *SmbiosTables;
31 UINT16 HostBridgeDevId;
32
33 Status = EFI_NOT_FOUND;
34 //
35 // Add SMBIOS data if found
36 //
37 HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
38 if (HostBridgeDevId == CLOUDHV_DEVICE_ID) {
39 SmbiosTables = GetCloudHvSmbiosTables ();
40 if (SmbiosTables != NULL) {
41 Status = InstallAllStructures (SmbiosTables);
42 }
43 } else {
44 SmbiosTables = GetQemuSmbiosTables ();
45 if (SmbiosTables != NULL) {
46 Status = InstallAllStructures (SmbiosTables);
47 FreePool (SmbiosTables);
48 }
49 }
50
51 return Status;
52}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette