]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/SmbiosPlatformDxe/EntryPoint.c
f53af2b2e63554d426f8036bd049d81120d01cfb
[mirror_edk2.git] / OvmfPkg / SmbiosPlatformDxe / EntryPoint.c
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
9 #include "SmbiosPlatformDxe.h"
10
11 /**
12 Installs SMBIOS information for OVMF
13
14 @param ImageHandle Module's image handle
15 @param SystemTable Pointer of EFI_SYSTEM_TABLE
16
17 @retval EFI_SUCCESS Smbios data successfully installed
18 @retval Other Smbios data was not installed
19
20 **/
21 EFI_STATUS
22 EFIAPI
23 SmbiosTablePublishEntry (
24 IN EFI_HANDLE ImageHandle,
25 IN EFI_SYSTEM_TABLE *SystemTable
26 )
27 {
28 EFI_STATUS Status;
29 UINT8 *SmbiosTables;
30
31 Status = EFI_NOT_FOUND;
32 //
33 // Add QEMU SMBIOS data if found
34 //
35 SmbiosTables = GetQemuSmbiosTables ();
36 if (SmbiosTables != NULL) {
37 Status = InstallAllStructures (SmbiosTables);
38 FreePool (SmbiosTables);
39 }
40
41 return Status;
42 }