From: "Kubacki, Michael A" <michael.a.kubacki@intel.com>
To: devel@edk2.groups.io
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>,
Liming Gao <liming.gao@intel.com>
Subject: [edk2-platforms][PATCH V2 42/47] Platform/Intel/AdvancedFeaturePkg: Remove the SMBIOS feature
Date: Wed, 27 Nov 2019 18:18:33 -0800 [thread overview]
Message-ID: <20191128021838.42640-4-michael.a.kubacki@intel.com> (raw)
In-Reply-To: <20191128021838.42640-1-michael.a.kubacki@intel.com>
Removes the SMBIOS feature from AdvancedFeaturePkg. The feature does
not follow the advanced feature design. The feature has been moved
to Features/Intel/SystemInformation/SmbiosFeaturePkg.
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec | 112 -----------------
Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc | 21 ----
Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc | 4 -
Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf | 6 -
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf | 83 -------------
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h | 45 -------
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryPoint.c | 125 -------------------
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVendorFunction.c | 81 ------------
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemManufacturerFunction.c | 114 -----------------
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoardManufacturerFunction.c | 131 --------------------
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootInformationFunction.c | 56 ---------
Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3ChassisManufacturerFunction.c | 125 -------------------
12 files changed, 903 deletions(-)
diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
index 4f8300d145..6cd333d498 100644
--- a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
+++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
@@ -26,117 +26,5 @@ Include
[Guids]
gAdvancedFeaturePkgTokenSpaceGuid = {0xa8514688, 0x6693, 0x4ab5, {0xaa, 0xc8, 0xcc, 0xa9, 0x8d, 0xde, 0x90, 0xe1}}
-[PcdsDynamic, PcdsDynamicEx]
-
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation|{0x0}|SMBIOS_TABLE_TYPE0|0x80010000 {
- <HeaderFiles>
- IndustryStandard/SmBios.h
- <Packages>
- MdePkg/MdePkg.dec
- AdvancedFeaturePkg/AdvancedFeaturePkg.dec
- }
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.Vendor|0x1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosVersion|0x2
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosSegment|0xF000
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosReleaseDate|0x3
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosSize|0xFF
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.PciIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.PlugAndPlayIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.BiosIsUpgradable|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.BiosShadowingAllowed|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.BootFromCdIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.SelectableBootIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.EDDSpecificationIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.Floppy525_12IsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.Floppy35_720IsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.Floppy35_288IsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.PrintScreenIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.Keyboard8042IsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.SerialIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.PrinterIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCharacteristics.CgaMonoIsSupported|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BIOSCharacteristicsExtensionBytes[0]|0x33
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BIOSCharacteristicsExtensionBytes[1]|0x0F
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringVendor|"Intel Corporation"|VOID*|0x80010001
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringBiosVersion|"PURLEY CV/CRB BIOS Internal"|VOID*|0x80010002
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringBiosReleaseDate|"2008-12-23"|VOID*|0x80010003
-
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation|{0x0}|SMBIOS_TABLE_TYPE1|0x80010100 {
- <HeaderFiles>
- IndustryStandard/SmBios.h
- <Packages>
- MdePkg/MdePkg.dec
- AdvancedFeaturePkg/AdvancedFeaturePkg.dec
- }
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Manufacturer|0x1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.ProductName|0x2
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Version|0x3
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.SerialNumber|0x4
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Uuid|{GUID("88888888-8887-8888-8888-878888888888")}
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.WakeUpType|SystemWakeupTypePowerSwitch
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.SKUNumber|0x5
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Family|0x6
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringManufacturer|"Intel Corporation"|VOID*|0x80010101
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringProductName|"PURLEY"|VOID*|0x80010102
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringVersion|"1.0"|VOID*|0x80010103
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringSerialNumber|"UNKNOWN"|VOID*|0x80010104
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringSKUNumber|"SKU Number"|VOID*|0x80010105
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringFamily|"Family"|VOID*|0x80010106
-
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation|{0x0}|SMBIOS_TABLE_TYPE2|0x80010200 {
- <HeaderFiles>
- IndustryStandard/SmBios.h
- <Packages>
- MdePkg/MdePkg.dec
- AdvancedFeaturePkg/AdvancedFeaturePkg.dec
- }
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Manufacturer|0x1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.ProductName|0x2
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Version|0x3
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.SerialNumber|0x4
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.AssetTag|0x5
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.FeatureFlag.Motherboard|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.FeatureFlag.Replaceable|1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.LocationInChassis|0x6
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.BoardType|BaseBoardTypeMotherBoard
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringManufacturer|"Intel Corporation"|VOID*|0x80010201
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringProductName|"PURLEY"|VOID*|0x80010202
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringVersion|"E63448-400"|VOID*|0x80010203
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringSerialNumber|"SPRO03200016"|VOID*|0x80010204
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringAssetTag|"Base Board Asset Tag"|VOID*|0x80010205
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringLocationInChassis|"Part Component"|VOID*|0x80010206
-
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis|{0x0}|SMBIOS_TABLE_TYPE3|0x80010300 {
- <HeaderFiles>
- IndustryStandard/SmBios.h
- <Packages>
- MdePkg/MdePkg.dec
- AdvancedFeaturePkg/AdvancedFeaturePkg.dec
- }
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Manufacturer|0x1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Type|MiscChassisTypeRackMountChassis
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Version|0x2
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.SerialNumber|0x3
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.AssetTag|0x4
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.BootupState|ChassisStateSafe
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.PowerSupplyState|ChassisStateSafe
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.ThermalState|ChassisStateSafe
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.SecurityStatus|ChassisSecurityStatusNone
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringManufacturer|"Intel Corporation"|VOID*|0x80010301
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringVersion|"0.1"|VOID*|0x80010302
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringSerialNumber|"UNKNOWN"|VOID*|0x80010303
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringAssetTag|"Chassis Asset Tag"|VOID*|0x80010304
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringSKUNumber|"SKU Number"|VOID*|0x80010305
-
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType32SystemBootInformation|{0x0}|SMBIOS_TABLE_TYPE32|0x80012000 {
- <HeaderFiles>
- IndustryStandard/SmBios.h
- <Packages>
- MdePkg/MdePkg.dec
- AdvancedFeaturePkg/AdvancedFeaturePkg.dec
- }
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType32SystemBootInformation.BootStatus|BootInformationStatusNoError
-
[PcdsFeatureFlag]
gAdvancedFeaturePkgTokenSpaceGuid.PcdNetworkEnable |FALSE|BOOLEAN|0xF00000A1
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable |FALSE|BOOLEAN|0xF00000A2
diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index ca8db13f7c..4b8ccf3375 100644
--- a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -45,26 +45,6 @@
################################################################################
[LibraryClasses.common]
- #######################################
- # Edk2 Packages
- #######################################
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
-[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
###################################################################################################
#
@@ -94,7 +74,6 @@
# in the package build.
# Add components here that should be included in the package build.
- AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf
[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
index fceaadc100..b74c0ef2bc 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
@@ -13,7 +13,3 @@
#
!include NetworkPkg/NetworkComponents.dsc.inc
-!if gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable == TRUE
- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-!endif
-
diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
index d980e673a8..a86ecdc9d1 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
@@ -12,9 +12,3 @@
# UEFI network modules
#
!include NetworkPkg/Network.fdf.inc
-
-!if gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable == TRUE
-INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-!endif
-
-
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf
deleted file mode 100644
index c3ec4f7885..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf
+++ /dev/null
@@ -1,83 +0,0 @@
-### @file
-# Component description file for Smbios Misc module.
-#
-# Copyright (c) 2018-2019, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-###
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = SmbiosBasic
- FILE_GUID = 03ADF4A1-A27A-45E3-B211-3177C6C2E7ED
- MODULE_TYPE = DXE_DRIVER
- VERSION_STRING = 1.0
- ENTRY_POINT = SmbiosBasicEntryPoint
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-
-[Sources]
- SmbiosBasicEntryPoint.c
- SmbiosBasic.h
- Type0BiosVendorFunction.c
- Type1SystemManufacturerFunction.c
- Type2BaseBoardManufacturerFunction.c
- Type3ChassisManufacturerFunction.c
- Type32BootInformationFunction.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- AdvancedFeaturePkg/AdvancedFeaturePkg.dec
-
-[LibraryClasses]
- PcdLib
- MemoryAllocationLib
- DevicePathLib
- BaseMemoryLib
- BaseLib
- DebugLib
- UefiBootServicesTableLib
- UefiDriverEntryPoint
- UefiLib
- HobLib
-
-[Protocols]
- gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
- gEfiVariableArchProtocolGuid
-
-[Pcd]
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringVendor
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringBiosVersion
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringBiosReleaseDate
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringManufacturer
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringProductName
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringVersion
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringSerialNumber
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringSKUNumber
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringFamily
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringManufacturer
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringProductName
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringVersion
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringSerialNumber
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringAssetTag
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringLocationInChassis
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringManufacturer
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringVersion
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringSerialNumber
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringAssetTag
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringSKUNumber
- gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType32SystemBootInformation
-
-[Depex]
- gEfiSmbiosProtocolGuid AND
- gEfiVariableArchProtocolGuid
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h
deleted file mode 100644
index 944946b5b8..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/** @file
- Smbios basic header file.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _SMBIOS_BASIC_DRIVER_H
-#define _SMBIOS_BASIC_DRIVER_H
-
-#include <PiDxe.h>
-#include <Protocol/Smbios.h>
-#include <IndustryStandard/SmBios.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/PcdLib.h>
-#include <Library/UefiLib.h>
-
-/**
- Add an SMBIOS record.
-
- @param Smbios The EFI_SMBIOS_PROTOCOL instance.
- @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.
- @param Record The data for the fixed portion of the SMBIOS record. The format of the record is
- determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined
- by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or
- a set of null terminated strings and a null.
-
- @retval EFI_SUCCESS Record was added.
- @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.
-
-**/
-EFI_STATUS
-AddSmbiosRecord (
- IN EFI_SMBIOS_PROTOCOL *Smbios,
- OUT EFI_SMBIOS_HANDLE *SmbiosHandle,
- IN EFI_SMBIOS_TABLE_HEADER *Record
- );
-
-#endif
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryPoint.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryPoint.c
deleted file mode 100644
index 8e68629ef6..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryPoint.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/** @file
- Smbios basic entry point.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include "SmbiosBasic.h"
-
-EFI_STATUS
-EFIAPI
-BiosVendorFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- );
-
-EFI_STATUS
-EFIAPI
-SystemManufacturerFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- );
-
-EFI_STATUS
-EFIAPI
-BaseBoardManufacturerFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- );
-
-EFI_STATUS
-EFIAPI
-ChassisManufacturerFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- );
-
-EFI_STATUS
-EFIAPI
-BootInfoStatusFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- );
-
-typedef
-EFI_STATUS
-(EFIAPI EFI_BASIC_SMBIOS_DATA_FUNCTION) (
- IN EFI_SMBIOS_PROTOCOL *Smbios
- );
-
-typedef struct {
- EFI_BASIC_SMBIOS_DATA_FUNCTION *Function;
-} EFI_BASIC_SMBIOS_DATA;
-
-EFI_BASIC_SMBIOS_DATA mSmbiosBasicDataFuncTable[] = {
- {&BiosVendorFunction},
- {&SystemManufacturerFunction},
- {&BaseBoardManufacturerFunction},
- {&ChassisManufacturerFunction},
- {&BootInfoStatusFunction},
-};
-
-/**
- Standard EFI driver point. This driver parses the mSmbiosMiscDataTable
- structure and reports any generated data using SMBIOS protocol.
-
- @param ImageHandle Handle for the image of this driver
- @param SystemTable Pointer to the EFI System Table
-
- @retval EFI_SUCCESS The data was successfully stored.
-
-**/
-EFI_STATUS
-EFIAPI
-SmbiosBasicEntryPoint(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- UINTN Index;
- EFI_STATUS EfiStatus;
- EFI_SMBIOS_PROTOCOL *Smbios;
-
- EfiStatus = gBS->LocateProtocol(&gEfiSmbiosProtocolGuid, NULL, (VOID**)&Smbios);
- if (EFI_ERROR(EfiStatus)) {
- DEBUG((EFI_D_ERROR, "Could not locate SMBIOS protocol. %r\n", EfiStatus));
- return EfiStatus;
- }
-
- for (Index = 0; Index < sizeof(mSmbiosBasicDataFuncTable)/sizeof(mSmbiosBasicDataFuncTable[0]); ++Index) {
- EfiStatus = (*mSmbiosBasicDataFuncTable[Index].Function) (Smbios);
- if (EFI_ERROR(EfiStatus)) {
- DEBUG((EFI_D_ERROR, "Basic smbios store error. Index=%d, ReturnStatus=%r\n", Index, EfiStatus));
- return EfiStatus;
- }
- }
-
- return EfiStatus;
-}
-
-/**
- Add an SMBIOS record.
-
- @param Smbios The EFI_SMBIOS_PROTOCOL instance.
- @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.
- @param Record The data for the fixed portion of the SMBIOS record. The format of the record is
- determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined
- by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or
- a set of null terminated strings and a null.
-
- @retval EFI_SUCCESS Record was added.
- @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.
-
-**/
-EFI_STATUS
-AddSmbiosRecord (
- IN EFI_SMBIOS_PROTOCOL *Smbios,
- OUT EFI_SMBIOS_HANDLE *SmbiosHandle,
- IN EFI_SMBIOS_TABLE_HEADER *Record
- )
-{
- *SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
- return Smbios->Add (
- Smbios,
- NULL,
- SmbiosHandle,
- Record
- );
-}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVendorFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVendorFunction.c
deleted file mode 100644
index 331efc8614..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVendorFunction.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/** @file
- Smbios type 0.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include "SmbiosBasic.h"
-
-/**
- This function makes boot time changes to the contents of the
- BiosVendor (Type 0).
-
- @retval EFI_SUCCESS All parameters were valid.
- @retval EFI_UNSUPPORTED Unexpected RecordType value.
- @retval EFI_INVALID_PARAMETER Invalid parameter was found.
-
-**/
-EFI_STATUS
-EFIAPI
-BiosVendorFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- )
-{
- EFI_STATUS Status;
- CHAR8 *VendorStr;
- UINTN VendorStrLen;
- CHAR8 *VersionStr;
- UINTN VerStrLen;
- CHAR8 *DateStr;
- UINTN DateStrLen;
- SMBIOS_TABLE_TYPE0 *SmbiosRecord;
- SMBIOS_TABLE_TYPE0 *PcdSmbiosRecord;
- EFI_SMBIOS_HANDLE SmbiosHandle;
- UINTN StringOffset;
-
- PcdSmbiosRecord = PcdGetPtr (PcdSmbiosType0BiosInformation);
-
- VendorStr = PcdGetPtr (PcdSmbiosType0StringVendor);
- VendorStrLen = AsciiStrLen (VendorStr);
- ASSERT (VendorStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- VersionStr = PcdGetPtr (PcdSmbiosType0StringBiosVersion);
- VerStrLen = AsciiStrLen (VersionStr);
- ASSERT (VerStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- DateStr = PcdGetPtr (PcdSmbiosType0StringBiosReleaseDate);
- DateStrLen = AsciiStrLen (DateStr);
- ASSERT (DateStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Two zeros following the last string.
- //
- SmbiosRecord = AllocateZeroPool (sizeof (SMBIOS_TABLE_TYPE0) + VendorStrLen + 1 + VerStrLen + 1 + DateStrLen + 1 + 1);
- if (SmbiosRecord == NULL) {
- ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);
- return EFI_OUT_OF_RESOURCES;
- }
-
- CopyMem (SmbiosRecord, PcdSmbiosRecord, sizeof(SMBIOS_TABLE_TYPE0));
-
- SmbiosRecord->Hdr.Type = SMBIOS_TYPE_BIOS_INFORMATION;
- SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE0);
- SmbiosRecord->Hdr.Handle = 0;
-
- StringOffset = SmbiosRecord->Hdr.Length;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VendorStr, VendorStrLen);
- StringOffset += VendorStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VerStrLen);
- StringOffset += VerStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, DateStr, DateStrLen);
-
- //
- // Now we have got the full smbios record, call smbios protocol to add this record.
- //
- Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
-
- FreePool (SmbiosRecord);
- return Status;
-}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemManufacturerFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemManufacturerFunction.c
deleted file mode 100644
index 2314d09695..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemManufacturerFunction.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/** @file
- Smbios type 1.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include "SmbiosBasic.h"
-
-/**
- This function makes boot time changes to the contents of the
- SystemManufacturer (Type 1).
-
- @retval EFI_SUCCESS All parameters were valid.
- @retval EFI_UNSUPPORTED Unexpected RecordType value.
- @retval EFI_INVALID_PARAMETER Invalid parameter was found.
-
-**/
-EFI_STATUS
-EFIAPI
-SystemManufacturerFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- )
-{
- EFI_STATUS Status;
- CHAR8 *ManufacturerStr;
- CHAR8 *ProductNameStr;
- CHAR8 *VersionStr;
- CHAR8 *SerialNumberStr;
- CHAR8 *SKUNumberStr;
- CHAR8 *FamilyStr;
- UINTN ManufacturerStrLen;
- UINTN ProductNameStrLen;
- UINTN VersionStrLen;
- UINTN SerialNumberStrLen;
- UINTN SKUNumberStrLen;
- UINTN FamilyStrLen;
- UINTN TableSize;
- SMBIOS_TABLE_TYPE1 *PcdSmbiosRecord;
- SMBIOS_TABLE_TYPE1 *SmbiosRecord;
- EFI_SMBIOS_HANDLE SmbiosHandle;
- UINTN StringOffset;
-
- PcdSmbiosRecord = PcdGetPtr (PcdSmbiosType1SystemInformation);
-
- ManufacturerStr = PcdGetPtr (PcdSmbiosType1StringManufacturer);
- ManufacturerStrLen = AsciiStrLen (ManufacturerStr);
- ASSERT (ManufacturerStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- ProductNameStr = PcdGetPtr (PcdSmbiosType1StringProductName);
- ProductNameStrLen = AsciiStrLen (ProductNameStr);
- ASSERT (ProductNameStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- VersionStr = PcdGetPtr (PcdSmbiosType1StringVersion);
- VersionStrLen = AsciiStrLen (VersionStr);
- ASSERT (VersionStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- SerialNumberStr = PcdGetPtr (PcdSmbiosType1StringSerialNumber);
- SerialNumberStrLen = AsciiStrLen (SerialNumberStr);
- ASSERT (SerialNumberStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- SKUNumberStr = PcdGetPtr (PcdSmbiosType1StringSKUNumber);
- SKUNumberStrLen = AsciiStrLen (SKUNumberStr);
- ASSERT (SKUNumberStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- FamilyStr = PcdGetPtr (PcdSmbiosType1StringFamily);
- FamilyStrLen = AsciiStrLen (FamilyStr);
- ASSERT (FamilyStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Create table size based on string lengths
- //
- TableSize = sizeof (SMBIOS_TABLE_TYPE1) + ManufacturerStrLen + 1 + ProductNameStrLen + 1 + VersionStrLen + 1 + SerialNumberStrLen + 1 + SKUNumberStrLen + 1 + FamilyStrLen + 1 + 1;
- SmbiosRecord = AllocateZeroPool (TableSize);
- if (SmbiosRecord == NULL) {
- ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);
- return EFI_OUT_OF_RESOURCES;
- }
-
- CopyMem (SmbiosRecord, PcdSmbiosRecord, sizeof(SMBIOS_TABLE_TYPE1));
-
- //
- // Fill in Type 1 fields
- //
-
- SmbiosRecord->Hdr.Type = SMBIOS_TYPE_SYSTEM_INFORMATION;
- SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1);
- SmbiosRecord->Hdr.Handle = 0;
-
- //
- // Add strings to bottom of data block
- //
- StringOffset = SmbiosRecord->Hdr.Length;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ManufacturerStr, ManufacturerStrLen);
- StringOffset += ManufacturerStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ProductNameStr, ProductNameStrLen);
- StringOffset += ProductNameStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VersionStrLen);
- StringOffset += VersionStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SerialNumberStr, SerialNumberStrLen);
- StringOffset += SerialNumberStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SKUNumberStr, SKUNumberStrLen);
- StringOffset += SKUNumberStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, FamilyStr, FamilyStrLen);
-
- //
- // Now we have got the full smbios record, call smbios protocol to add this record.
- //
- Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
-
- FreePool(SmbiosRecord);
- return Status;
-}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoardManufacturerFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoardManufacturerFunction.c
deleted file mode 100644
index 9193cb0be7..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoardManufacturerFunction.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/** @file
- Smbios type 2.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include "SmbiosBasic.h"
-
-/**
- This function makes boot time changes to the contents of the
- BaseBoardManufacturer (Type 2).
-
- @retval EFI_SUCCESS All parameters were valid.
- @retval EFI_UNSUPPORTED Unexpected RecordType value.
- @retval EFI_INVALID_PARAMETER Invalid parameter was found.
-
-**/
-EFI_STATUS
-EFIAPI
-BaseBoardManufacturerFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- )
-{
- EFI_STATUS Status;
- CHAR8 *ManufacturerStr;
- CHAR8 *ProductStr;
- CHAR8 *VersionStr;
- CHAR8 *SerialNumberStr;
- CHAR8 *AssertTagStr;
- CHAR8 *ChassisStr;
- UINTN ManuStrLen;
- UINTN ProductStrLen;
- UINTN VerStrLen;
- UINTN AssertTagStrLen;
- UINTN SerialNumStrLen;
- UINTN ChassisStrLen;
- EFI_SMBIOS_HANDLE SmbiosHandle;
- SMBIOS_TABLE_TYPE2 *PcdSmbiosRecord;
- SMBIOS_TABLE_TYPE2 *SmbiosRecord;
- UINTN SourceSize;
- UINTN TotalSize;
- UINTN StringOffset;
-
- PcdSmbiosRecord = PcdGetPtr (PcdSmbiosType2BaseBoardInformation);
-
- //
- // Get BoardManufacturer String.
- //
- ManufacturerStr = PcdGetPtr (PcdSmbiosType2StringManufacturer);
- ManuStrLen = AsciiStrLen (ManufacturerStr);
- ASSERT (ManuStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get Board ProductName String.
- //
- ProductStr = PcdGetPtr (PcdSmbiosType2StringProductName);
- ProductStrLen = AsciiStrLen (ProductStr);
- ASSERT (ProductStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get Board Version String.
- //
- VersionStr = PcdGetPtr (PcdSmbiosType2StringVersion);
- VerStrLen = AsciiStrLen (VersionStr);
- ASSERT (VerStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get Board Serial Number String.
- //
- SerialNumberStr = PcdGetPtr (PcdSmbiosType2StringSerialNumber);
- SerialNumStrLen = AsciiStrLen (SerialNumberStr);
- ASSERT (SerialNumStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get Board Asset Tag String.
- //
- AssertTagStr = PcdGetPtr (PcdSmbiosType2StringAssetTag);
- AssertTagStrLen = AsciiStrLen (AssertTagStr);
- ASSERT (AssertTagStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get Board Chassis Location Tag String.
- //
- ChassisStr = PcdGetPtr (PcdSmbiosType2StringLocationInChassis);
- ChassisStrLen = AsciiStrLen (ChassisStr);
- ASSERT (ChassisStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Two zeros following the last string.
- //
- SourceSize = PcdGetSize (PcdSmbiosType2BaseBoardInformation);
- TotalSize = SourceSize + ManuStrLen + 1 + ProductStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1 + ChassisStrLen + 1 + 1;
- SmbiosRecord = AllocateZeroPool(TotalSize);
- if (SmbiosRecord == NULL) {
- ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);
- return EFI_OUT_OF_RESOURCES;
- }
-
- CopyMem (SmbiosRecord, PcdSmbiosRecord, SourceSize);
-
- SmbiosRecord->Hdr.Type = SMBIOS_TYPE_BASEBOARD_INFORMATION;
- SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE2);
- if (PcdSmbiosRecord->NumberOfContainedObjectHandles >= 2) {
- SmbiosRecord->Hdr.Length += (PcdSmbiosRecord->NumberOfContainedObjectHandles - 1) * sizeof(PcdSmbiosRecord->ContainedObjectHandles);
- }
- ASSERT(SourceSize >= SmbiosRecord->Hdr.Length);
- SmbiosRecord->Hdr.Handle = 0;
-
- StringOffset = SmbiosRecord->Hdr.Length;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ManufacturerStr, ManuStrLen);
- StringOffset += ManuStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ProductStr, ProductStrLen);
- StringOffset += ProductStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VerStrLen);
- StringOffset += VerStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SerialNumberStr, SerialNumStrLen);
- StringOffset += SerialNumStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, AssertTagStr, AssertTagStrLen);
- StringOffset += AssertTagStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ChassisStr, ChassisStrLen);
-
- //
- // Now we have got the full smbios record, call smbios protocol to add this record.
- //
- Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
-
- FreePool(SmbiosRecord);
- return Status;
-}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootInformationFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootInformationFunction.c
deleted file mode 100644
index 87bfd045da..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootInformationFunction.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/** @file
- Smbios type 32.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include "SmbiosBasic.h"
-
-
-/**
- This function makes boot time changes to the contents of the
- BootInformation (Type 32).
-
- @retval EFI_SUCCESS All parameters were valid.
- @retval EFI_UNSUPPORTED Unexpected RecordType value.
- @retval EFI_INVALID_PARAMETER Invalid parameter was found.
-
-**/
-EFI_STATUS
-EFIAPI
-BootInfoStatusFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- )
-{
- EFI_STATUS Status;
- EFI_SMBIOS_HANDLE SmbiosHandle;
- SMBIOS_TABLE_TYPE32 *PcdSmbiosRecord;
- SMBIOS_TABLE_TYPE32 *SmbiosRecord;
-
- PcdSmbiosRecord = PcdGetPtr (PcdSmbiosType32SystemBootInformation);
-
- //
- // Two zeros following the last string.
- //
- SmbiosRecord = AllocateZeroPool(sizeof (SMBIOS_TABLE_TYPE32) + 1 + 1);
- if (SmbiosRecord == NULL) {
- ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);
- return EFI_OUT_OF_RESOURCES;
- }
-
- CopyMem (SmbiosRecord, PcdSmbiosRecord, sizeof(SMBIOS_TABLE_TYPE32));
-
- SmbiosRecord->Hdr.Type = EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION;
- SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE32);
- SmbiosRecord->Hdr.Handle = 0;
-
- //
- // Now we have got the full smbios record, call smbios protocol to add this record.
- //
- Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
-
- FreePool(SmbiosRecord);
- return Status;
-}
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3ChassisManufacturerFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3ChassisManufacturerFunction.c
deleted file mode 100644
index 33732bc9ca..0000000000
--- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3ChassisManufacturerFunction.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/** @file
- Smbios type 3.
-
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include "SmbiosBasic.h"
-
-/**
- This function makes boot time changes to the contents of the
- ChassisManufacturer (Type 3).
-
- @retval EFI_SUCCESS All parameters were valid.
- @retval EFI_UNSUPPORTED Unexpected RecordType value.
- @retval EFI_INVALID_PARAMETER Invalid parameter was found.
-
-**/
-EFI_STATUS
-EFIAPI
-ChassisManufacturerFunction(
- IN EFI_SMBIOS_PROTOCOL *Smbios
- )
-{
- UINTN ManuStrLen;
- UINTN VerStrLen;
- UINTN AssertTagStrLen;
- UINTN SerialNumStrLen;
- UINTN SKUNumberStrLen;
- EFI_STATUS Status;
- CHAR8 *ManufacturerStr;
- CHAR8 *VersionStr;
- CHAR8 *SerialNumberStr;
- CHAR8 *AssertTagStr;
- CHAR8 *SKUNumberStr;
- SMBIOS_TABLE_STRING *SKUNumberPtr;
- EFI_SMBIOS_HANDLE SmbiosHandle;
- SMBIOS_TABLE_TYPE3 *SmbiosRecord;
- SMBIOS_TABLE_TYPE3 *PcdSmbiosRecord;
- UINTN SourceSize;
- UINTN TotalSize;
- UINTN StringOffset;
-
- PcdSmbiosRecord = PcdGetPtr (PcdSmbiosType3SystemEnclosureChassis);
-
- //
- // Get ChassisManufacturer String.
- //
- ManufacturerStr = PcdGetPtr (PcdSmbiosType3StringManufacturer);
- ManuStrLen = AsciiStrLen (ManufacturerStr);
- ASSERT (ManuStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get ChassisVersion String.
- //
- VersionStr = PcdGetPtr (PcdSmbiosType3StringVersion);
- VerStrLen = AsciiStrLen (VersionStr);
- ASSERT (VerStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get ChassisSerialNumber String.
- //
- SerialNumberStr = PcdGetPtr (PcdSmbiosType3StringSerialNumber);
- SerialNumStrLen = AsciiStrLen (SerialNumberStr);
- ASSERT (SerialNumStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get ChassisAssetTag String.
- //
- AssertTagStr = PcdGetPtr (PcdSmbiosType3StringAssetTag);
- AssertTagStrLen = AsciiStrLen (AssertTagStr);
- ASSERT (AssertTagStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Get ChassisSKUNumber String.
- //
- SKUNumberStr = PcdGetPtr (PcdSmbiosType3StringSKUNumber);
- SKUNumberStrLen = AsciiStrLen (SKUNumberStr);
- ASSERT (SKUNumberStrLen <= SMBIOS_STRING_MAX_LENGTH);
-
- //
- // Two zeros following the last string.
- //
- SourceSize = PcdGetSize(PcdSmbiosType3SystemEnclosureChassis);
- TotalSize = SourceSize + sizeof(SMBIOS_TABLE_STRING) + ManuStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1 + SKUNumberStrLen + 1 + 1;
- SmbiosRecord = AllocateZeroPool(TotalSize);
- if (SmbiosRecord == NULL) {
- ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);
- return EFI_OUT_OF_RESOURCES;
- }
-
- CopyMem (SmbiosRecord, PcdSmbiosRecord, SourceSize);
-
- SmbiosRecord->Hdr.Type = EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE;
- SmbiosRecord->Hdr.Length = OFFSET_OF (SMBIOS_TABLE_TYPE3, ContainedElements) + sizeof(SMBIOS_TABLE_STRING);
- if (PcdSmbiosRecord->ContainedElementCount >= 1) {
- SmbiosRecord->Hdr.Length += PcdSmbiosRecord->ContainedElementCount * PcdSmbiosRecord->ContainedElementRecordLength;
- }
- SmbiosRecord->Hdr.Handle = 0;
-
- if ((PcdSmbiosRecord->ContainedElementCount == 0) || (SourceSize < (UINTN)SmbiosRecord + SmbiosRecord->Hdr.Length)) {
- SKUNumberPtr = (SMBIOS_TABLE_STRING *)((UINTN)SmbiosRecord + SmbiosRecord->Hdr.Length - sizeof(SMBIOS_TABLE_STRING));
- *SKUNumberPtr = 5;
- }
-
- StringOffset = SmbiosRecord->Hdr.Length;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ManufacturerStr, ManuStrLen);
- StringOffset += ManuStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VerStrLen);
- StringOffset += VerStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SerialNumberStr, SerialNumStrLen);
- StringOffset += SerialNumStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, AssertTagStr, AssertTagStrLen);
- StringOffset += AssertTagStrLen + 1;
- CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SKUNumberStr, SKUNumberStrLen);
-
- //
- // Now we have got the full smbios record, call smbios protocol to add this record.
- //
- Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
-
- FreePool(SmbiosRecord);
- return Status;
-}
--
2.16.2.windows.1
next prev parent reply other threads:[~2019-11-28 2:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 2:18 [edk2-platforms][PATCH V2 39/47] MinPlatformPkg: Install advanced feature FVs by stage enabled Kubacki, Michael A
2019-11-28 2:18 ` [edk2-platforms][PATCH V2 40/47] Platform/Intel/AdvancedFeaturePkg: Remove the S3 feature Kubacki, Michael A
2019-11-28 2:18 ` [edk2-platforms][PATCH V2 41/47] Platform/Intel/AdvancedFeaturePkg: Remove the IPMI feature Kubacki, Michael A
2019-12-03 23:57 ` [edk2-devel] " Nate DeSimone
2019-11-28 2:18 ` Kubacki, Michael A [this message]
2019-11-28 2:18 ` [edk2-platforms][PATCH V2 43/47] Platform/Intel/AdvancedFeaturePkg: Remove remaining contents Kubacki, Michael A
2019-11-28 2:18 ` [edk2-platforms][PATCH V2 44/47] DebugFeaturePkg: Remove the ACPI Debug feature Kubacki, Michael A
2019-12-03 23:57 ` [edk2-devel] " Nate DeSimone
2019-11-28 2:18 ` [edk2-platforms][PATCH V2 45/47] DebugFeaturePkg: Remove the USB3 " Kubacki, Michael A
2019-11-28 2:18 ` [edk2-platforms][PATCH V2 46/47] UserInterfaceFeaturePkg: Remove the User Authentication feature Kubacki, Michael A
2019-12-03 23:58 ` [edk2-devel] " Nate DeSimone
2019-11-28 2:18 ` [edk2-platforms][PATCH V2 47/47] Maintainers.txt: Update Intel feature maintainers Kubacki, Michael A
2019-11-29 7:04 ` [edk2-platforms][PATCH V2 39/47] MinPlatformPkg: Install advanced feature FVs by stage enabled Chiu, Chasel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191128021838.42640-4-michael.a.kubacki@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox