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