]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/SmbiosPlatformDxe/Xen.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / SmbiosPlatformDxe / Xen.c
1 /** @file
2 This driver installs SMBIOS information for OVMF on Xen
3
4 Copyright (C) 2021, Red Hat, Inc.
5 Copyright (c) 2011, Bei Guan <gbtju85@gmail.com>
6 Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
7
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10 **/
11
12 #include "SmbiosPlatformDxe.h"
13 #include "XenSmbiosPlatformDxe.h"
14
15 /**
16 Installs SMBIOS information for OVMF on Xen
17
18 @param ImageHandle Module's image handle
19 @param SystemTable Pointer of EFI_SYSTEM_TABLE
20
21 @retval EFI_SUCCESS Smbios data successfully installed
22 @retval Other Smbios data was not installed
23
24 **/
25 EFI_STATUS
26 EFIAPI
27 XenSmbiosTablePublishEntry (
28 IN EFI_HANDLE ImageHandle,
29 IN EFI_SYSTEM_TABLE *SystemTable
30 )
31 {
32 EFI_STATUS Status;
33 SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure;
34 UINT8 *SmbiosTables;
35
36 Status = EFI_NOT_FOUND;
37 //
38 // Add Xen SMBIOS data if found
39 //
40 EntryPointStructure = GetXenSmbiosTables ();
41 if (EntryPointStructure != NULL) {
42 SmbiosTables = (UINT8 *)(UINTN)EntryPointStructure->TableAddress;
43 if (SmbiosTables != NULL) {
44 Status = InstallAllStructures (SmbiosTables);
45 }
46 }
47
48 return Status;
49 }