]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/Library/DxeSmbiosDataHobLib/DxeSmbiosDataHobLib.c
Remove IntelSiliconPkg that has been moved to edk2-platform repo
[mirror_edk2.git] / IntelSiliconPkg / Library / DxeSmbiosDataHobLib / DxeSmbiosDataHobLib.c
diff --git a/IntelSiliconPkg/Library/DxeSmbiosDataHobLib/DxeSmbiosDataHobLib.c b/IntelSiliconPkg/Library/DxeSmbiosDataHobLib/DxeSmbiosDataHobLib.c
deleted file mode 100644 (file)
index bcb77eb..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/** @file\r
-  Library to add SMBIOS data records from HOB to SMBIOS table.\r
-\r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
-\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-  @par Specification Reference:\r
-  System Management BIOS (SMBIOS) Reference Specification v3.0.0\r
-  dated 2015-Feb-12 (DSP0134)\r
-  http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0.0.pdf\r
-\r
-**/\r
-#include <IndustryStandard/SmBios.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Protocol/Smbios.h>\r
-\r
-\r
-/**\r
-  Adds SMBIOS records to tables\r
-\r
-  @param[in] ImageHandle          Image handle of this driver.\r
-  @param[in] SystemTable          Global system service table.\r
-\r
-  @retval EFI_UNSUPPORTED      -  Could not locate SMBIOS protocol\r
-  @retval EFI_OUT_OF_RESOURCES -  Failed to allocate memory for SMBIOS HOB type.\r
-  @retval EFI_SUCCESS          -  Successfully added SMBIOS records based on HOB.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-DxeSmbiosDataHobLibConstructor (\r
-  IN EFI_HANDLE                ImageHandle,\r
-  IN EFI_SYSTEM_TABLE          *SystemTable\r
-  )\r
-{\r
-  EFI_PEI_HOB_POINTERS         Hob;\r
-  EFI_SMBIOS_HANDLE            SmbiosHandle;\r
-  EFI_SMBIOS_PROTOCOL          *Smbios;\r
-  EFI_STATUS                   Status;\r
-  UINT8                        *RecordPtr;\r
-  UINT16                       RecordCount;\r
-\r
-  RecordCount = 0;\r
-\r
-  DEBUG ((DEBUG_INFO, "Adding SMBIOS records from HOB..\n"));\r
-\r
-  Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID **)&Smbios);\r
-  if (Smbios == NULL) {\r
-    DEBUG ((DEBUG_WARN, "Can't locate SMBIOS protocol\n"));\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  ///\r
-  /// Get SMBIOS HOB data (each hob contains one SMBIOS record)\r
-  ///\r
-  for (Hob.Raw = GetHobList (); !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB (Hob)) {\r
-    if ((GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_GUID_EXTENSION) && (CompareGuid (&Hob.Guid->Name, &gIntelSmbiosDataHobGuid))) {\r
-      RecordPtr = GET_GUID_HOB_DATA (Hob.Raw);\r
-\r
-      ///\r
-      /// Add generic SMBIOS HOB to SMBIOS table\r
-      ///\r
-      DEBUG ((DEBUG_VERBOSE, "Add SMBIOS record type: %x\n", ((EFI_SMBIOS_TABLE_HEADER *) RecordPtr)->Type));\r
-      SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;\r
-      Status = Smbios->Add (Smbios, NULL, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) RecordPtr);\r
-      if (!EFI_ERROR (Status)) {\r
-        RecordCount++;\r
-      }\r
-    }\r
-  }\r
-  DEBUG ((DEBUG_INFO, "Found %d Records and added to SMBIOS table.\n", RecordCount));\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r