From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com []) by mx.groups.io with SMTP id smtpd.web11.643.1573861763377294078 for ; Fri, 15 Nov 2019 15:49:28 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2019 15:49:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,310,1569308400"; d="scan'208";a="203526658" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga008.fm.intel.com with ESMTP; 15 Nov 2019 15:49:27 -0800 Received: from orsmsx155.amr.corp.intel.com (10.22.240.21) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 15 Nov 2019 15:49:27 -0800 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.67]) by ORSMSX155.amr.corp.intel.com ([169.254.7.211]) with mapi id 14.03.0439.000; Fri, 15 Nov 2019 15:49:26 -0800 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Kubacki, Michael A" CC: "Chaganty, Rangasai V" , "Gao, Liming" Subject: Re: [edk2-devel] [edk2-platforms][PATCH V1 19/49] AdvancedFeaturePkg: Remove the SMBIOS feature Thread-Topic: [edk2-devel] [edk2-platforms][PATCH V1 19/49] AdvancedFeaturePkg: Remove the SMBIOS feature Thread-Index: AQHVmdKTe7l67ihFmk6vg5pMMgOrhqeMqxJQ Date: Fri, 15 Nov 2019 23:49:26 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BDB232@ORSMSX114.amr.corp.intel.com> References: <20191113032816.4056-1-michael.a.kubacki@intel.com> <20191113032816.4056-20-michael.a.kubacki@intel.com> In-Reply-To: <20191113032816.4056-20-michael.a.kubacki@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzY1NjRkZDUtNzYyMS00YjcxLThmOTEtZGQxY2MzMWRiNGIxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiV01mWlhXcnRENG9jMTBHK1V5clpYT0trZjVcL3dDaDFZb0RDZjltVkVEZzROelc4cHlMSHBRSXVjZVFnNEdwdWIifQ== x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: devel@edk2.groups.io On Behalf Of Kubacki, Mi= chael A Sent: Tuesday, November 12, 2019 7:28 PM To: devel@edk2.groups.io Cc: Chaganty, Rangasai V ; Gao, Liming Subject: [edk2-devel] [edk2-platforms][PATCH V1 19/49] AdvancedFeaturePkg:= Remove the SMBIOS feature Removes the SMBIOS feature from AdvancedFeaturePkg. The feature does not f= ollow the advanced feature design. A future change will add the feature bac= k following the advanced feature design. Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Michael Kubacki --- 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.in= f | 83 ------------- Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h = | 45 ------- Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryP= oint.c | 125 ------------------- Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVendorFu= nction.c | 81 ------------ Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemManufa= cturerFunction.c | 114 ----------------- Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoardMan= ufacturerFunction.c | 131 -------------------- Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootInforma= tionFunction.c | 56 --------- Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3ChassisManuf= acturerFunction.c | 125 ------------------- 12 files changed, 903 deletions(-) diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec b/Pl= atform/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 =3D {0xa8514688, 0x6693, 0x4ab= 5, {0xaa, 0xc8, 0xcc, 0xa9, 0x8d, 0xde, 0x90, 0xe1}} =20 -[PcdsDynamic, PcdsDynamicEx] - - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation|{0x0}|S= MBIOS_TABLE_TYPE0|0x80010000 { - - IndustryStandard/SmBios.h - - MdePkg/MdePkg.dec - AdvancedFeaturePkg/AdvancedFeaturePkg.dec - } - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.Vendor|= 0x1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosVer= sion|0x2 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosSeg= ment|0xF000 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosRel= easeDate|0x3 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosSiz= e|0xFF - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.PciIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.PlugAndPlayIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.BiosIsUpgradable|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.BiosShadowingAllowed|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.BootFromCdIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.SelectableBootIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.EDDSpecificationIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.Floppy525_12IsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.Floppy35_720IsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.Floppy35_288IsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.PrintScreenIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.Keyboard8042IsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.SerialIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.PrinterIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosCha= racteristics.CgaMonoIsSupported|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BIOSCha= racteristicsExtensionBytes[0]|0x33 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BIOSCha= racteristicsExtensionBytes[1]|0x0F - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringVendor|"Intel Cor= poration"|VOID*|0x80010001 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringBiosVersion|"PURL= EY CV/CRB BIOS Internal"|VOID*|0x80010002 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType0StringBiosReleaseDate|"= 2008-12-23"|VOID*|0x80010003 - - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation|{0x0}= |SMBIOS_TABLE_TYPE1|0x80010100 { - - IndustryStandard/SmBios.h - - MdePkg/MdePkg.dec - AdvancedFeaturePkg/AdvancedFeaturePkg.dec - } - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Manuf= acturer|0x1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Produ= ctName|0x2 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Versi= on|0x3 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Seria= lNumber|0x4 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Uuid|= {GUID("88888888-8887-8888-8888-878888888888")} - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.WakeU= pType|SystemWakeupTypePowerSwitch - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.SKUNu= mber|0x5 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Famil= y|0x6 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringManufacturer|"Int= el Corporation"|VOID*|0x80010101 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringProductName|"PURL= EY"|VOID*|0x80010102 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringVersion|"1.0"|VOI= D*|0x80010103 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringSerialNumber|"UNK= NOWN"|VOID*|0x80010104 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringSKUNumber|"SKU Nu= mber"|VOID*|0x80010105 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType1StringFamily|"Family"|V= OID*|0x80010106 - - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation|{0= x0}|SMBIOS_TABLE_TYPE2|0x80010200 { - - IndustryStandard/SmBios.h - - MdePkg/MdePkg.dec - AdvancedFeaturePkg/AdvancedFeaturePkg.dec - } - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Ma= nufacturer|0x1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Pr= oductName|0x2 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Ve= rsion|0x3 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Se= rialNumber|0x4 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.As= setTag|0x5 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Fe= atureFlag.Motherboard|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Fe= atureFlag.Replaceable|1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Lo= cationInChassis|0x6 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2BaseBoardInformation.Bo= ardType|BaseBoardTypeMotherBoard - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringManufacturer|"Int= el Corporation"|VOID*|0x80010201 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringProductName|"PURL= EY"|VOID*|0x80010202 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringVersion|"E63448-4= 00"|VOID*|0x80010203 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringSerialNumber|"SPR= O03200016"|VOID*|0x80010204 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringAssetTag|"Base Bo= ard Asset Tag"|VOID*|0x80010205 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType2StringLocationInChassis= |"Part Component"|VOID*|0x80010206 - - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis|= {0x0}|SMBIOS_TABLE_TYPE3|0x80010300 { - - IndustryStandard/SmBios.h - - 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|"Int= el Corporation"|VOID*|0x80010301 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringVersion|"0.1"|VOI= D*|0x80010302 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringSerialNumber|"UNK= NOWN"|VOID*|0x80010303 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringAssetTag|"Chassis= Asset Tag"|VOID*|0x80010304 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType3StringSKUNumber|"SKU Nu= mber"|VOID*|0x80010305 - - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType32SystemBootInformation|= {0x0}|SMBIOS_TABLE_TYPE32|0x80012000 { - - IndustryStandard/SmBios.h - - MdePkg/MdePkg.dec - AdvancedFeaturePkg/AdvancedFeaturePkg.dec - } - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosType32SystemBootInformation.= BootStatus|BootInformationStatusNoError - [PcdsFeatureFlag] gAdvancedFeaturePkgTokenSpaceGuid.PcdNetworkEnable |FALSE|BOOL= EAN|0xF00000A1 - gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable |FALSE|BOOL= EAN|0xF00000A2 diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Pl= atform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc index ca8db13f7c..4b8ccf3375 100644 --- a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc +++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc @@ -45,26 +45,6 @@ #########################################################################= ####### =20 [LibraryClasses.common] - ####################################### - # Edk2 Packages - ####################################### - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.in= f - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo= otServicesTableLib.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntr= yPoint.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/= UefiRuntimeServicesTableLib.inf - -[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,Libr= aryClasses.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/UefiMemoryAl= locationLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf =20 #########################################################################= ########################## # @@ -94,7 +74,6 @@ # in the package build. =20 # Add components here that should be included in the package build. - AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf =20 [BuildOptions] *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES diff --git a/Pl= atform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc b/Pl= atform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc index fceaadc100..b74c0ef2bc 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude= .dsc +++ b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclu +++ de.dsc @@ -13,7 +13,3 @@ # !include NetworkPkg/NetworkComponents.dsc.inc =20 -!if gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable =3D=3D TRUE - MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf -!endif - diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLat= eInclude.fdf b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLa= teInclude.fdf index d980e673a8..a86ecdc9d1 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclud= e.fdf +++ b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateIncl +++ ude.fdf @@ -12,9 +12,3 @@ # UEFI network modules # !include NetworkPkg/Network.fdf.inc - -!if gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable =3D=3D TRUE -INF M= deModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf -!endif - - diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Smbio= sBasicDxe.inf b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Smb= iosBasicDxe.inf deleted file mode 100644 index c3ec4f7885..0000000000 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicD= xe.inf +++ /dev/null @@ -1,83 +0,0 @@ -### @file -# Component description file for Smbios Misc module. -# -# Copyright (c) 2018-2019, Intel Corporation. All rights reserved.
-#= -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -### - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D SmbiosBasic - FILE_GUID =3D 03ADF4A1-A27A-45E3-B211-3177C6C2E7ED - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D SmbiosBasicEntryPoint - -# -# The following information is for reference only and not required by the= build tools. -# -# VALID_ARCHITECTURES =3D 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/Smbio= sBasic.h b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBa= sic.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.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef _SMBIOS_BASIC_DRIVER_H -#define _SMBIOS_BASIC_DRIVER_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#i= nclude - -/** - Add an SMBIOS record. - - @param Smbios The EFI_SMBIOS_PROTOCOL instance. - @param SmbiosHandle A unique handle will be assigned to the S= MBIOS record. - @param Record The data for the fixed portion of the SMB= IOS record. The format of the record is - determined by EFI_SMBIOS_TABLE_HEADER.Typ= e. The size of the formatted area is defined=20 - by EFI_SMBIOS_TABLE_HEADER.Length and eit= her followed by a double-null (0x0000) or=20 - a set of null terminated strings and a nu= ll. - - @retval EFI_SUCCESS Record was added. - @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of syste= m 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/Smbio= sBasicEntryPoint.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDx= e/SmbiosBasicEntryPoint.c deleted file mode 100644 index 8e68629ef6..0000000000 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicE= ntryPoint.c +++ /dev/null @@ -1,125 +0,0 @@ -/** @file - Smbios basic entry point. - -Copyright (c) 2018, Intel Corporation. All rights reserved.
-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[] =3D { - {&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 =3D gBS->LocateProtocol(&gEfiSmbiosProtocolGuid, NULL, (VOID*= *)&Smbios); - if (EFI_ERROR(EfiStatus)) { - DEBUG((EFI_D_ERROR, "Could not locate SMBIOS protocol. %r\n", EfiSta= tus)); - return EfiStatus; - } - - for (Index =3D 0; Index < sizeof(mSmbiosBasicDataFuncTable)/sizeof(mSmb= iosBasicDataFuncTable[0]); ++Index) { - EfiStatus =3D (*mSmbiosBasicDataFuncTable[Index].Function) (Smbios); - if (EFI_ERROR(EfiStatus)) { - DEBUG((EFI_D_ERROR, "Basic smbios store error. Index=3D%d, ReturnS= tatus=3D%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 S= MBIOS record. - @param Record The data for the fixed portion of the SMB= IOS record. The format of the record is - determined by EFI_SMBIOS_TABLE_HEADER.Typ= e. The size of the formatted area is defined=20 - by EFI_SMBIOS_TABLE_HEADER.Length and eit= her followed by a double-null (0x0000) or=20 - a set of null terminated strings and a nu= ll. - - @retval EFI_SUCCESS Record was added. - @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of syste= m resources. - -**/ -EFI_STATUS -AddSmbiosRecord ( - IN EFI_SMBIOS_PROTOCOL *Smbios, - OUT EFI_SMBIOS_HANDLE *SmbiosHandle, - IN EFI_SMBIOS_TABLE_HEADER *Record - ) -{ - *SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; - return Smbios->Add ( - Smbios, - NULL, - SmbiosHandle, - Record - ); -} diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0= BiosVendorFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasic= Dxe/Type0BiosVendorFunction.c deleted file mode 100644 index 331efc8614..0000000000 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVen= dorFunction.c +++ /dev/null @@ -1,81 +0,0 @@ -/** @file - Smbios type 0. - -Copyright (c) 2018, Intel Corporation. All rights reserved.
-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;=20 - 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 =3D PcdGetPtr (PcdSmbiosType0BiosInformation); - - VendorStr =3D PcdGetPtr (PcdSmbiosType0StringVendor); - VendorStrLen =3D AsciiStrLen (VendorStr); - ASSERT (VendorStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - VersionStr =3D PcdGetPtr (PcdSmbiosType0StringBiosVersion); - VerStrLen =3D AsciiStrLen (VersionStr); - ASSERT (VerStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - DateStr =3D PcdGetPtr (PcdSmbiosType0StringBiosReleaseDate); - DateStrLen =3D AsciiStrLen (DateStr); - ASSERT (DateStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Two zeros following the last string. - // - SmbiosRecord =3D AllocateZeroPool (sizeof (SMBIOS_TABLE_TYPE0) + Vendor= StrLen + 1 + VerStrLen + 1 + DateStrLen + 1 + 1); - if (SmbiosRecord =3D=3D NULL) { - ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES); - return EFI_OUT_OF_RESOURCES; - } - - CopyMem (SmbiosRecord, PcdSmbiosRecord, sizeof(SMBIOS_TABLE_TYPE0)); - - SmbiosRecord->Hdr.Type =3D SMBIOS_TYPE_BIOS_INFORMATION; - SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE0); - SmbiosRecord->Hdr.Handle =3D 0; - - StringOffset =3D SmbiosRecord->Hdr.Length; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VendorStr, VendorStrLen)= ; - StringOffset +=3D VendorStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VerStrLen); - StringOffset +=3D VerStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, DateStr, DateStrLen); - - // - // Now we have got the full smbios record, call smbios protocol to add = this record. - // - Status =3D AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HE= ADER *) SmbiosRecord); - - FreePool (SmbiosRecord); - return Status; -} diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1= SystemManufacturerFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/Smb= iosBasicDxe/Type1SystemManufacturerFunction.c deleted file mode 100644 index 2314d09695..0000000000 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemM= anufacturerFunction.c +++ /dev/null @@ -1,114 +0,0 @@ -/** @file - Smbios type 1. - -Copyright (c) 2018, Intel Corporation. All rights reserved.
-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;=20 - 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 =3D PcdGetPtr (PcdSmbiosType1SystemInformation); - - ManufacturerStr =3D PcdGetPtr (PcdSmbiosType1StringManufacturer); - ManufacturerStrLen =3D AsciiStrLen (ManufacturerStr); - ASSERT (ManufacturerStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - ProductNameStr =3D PcdGetPtr (PcdSmbiosType1StringProductName); - ProductNameStrLen =3D AsciiStrLen (ProductNameStr); - ASSERT (ProductNameStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - VersionStr =3D PcdGetPtr (PcdSmbiosType1StringVersion); - VersionStrLen =3D AsciiStrLen (VersionStr); - ASSERT (VersionStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - SerialNumberStr =3D PcdGetPtr (PcdSmbiosType1StringSerialNumber); - SerialNumberStrLen =3D AsciiStrLen (SerialNumberStr); - ASSERT (SerialNumberStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - SKUNumberStr =3D PcdGetPtr (PcdSmbiosType1StringSKUNumber); - SKUNumberStrLen =3D AsciiStrLen (SKUNumberStr); - ASSERT (SKUNumberStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - FamilyStr =3D PcdGetPtr (PcdSmbiosType1StringFamily); - FamilyStrLen =3D AsciiStrLen (FamilyStr); - ASSERT (FamilyStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Create table size based on string lengths - // - TableSize =3D sizeof (SMBIOS_TABLE_TYPE1) + ManufacturerStrLen + 1 + Pr= oductNameStrLen + 1 + VersionStrLen + 1 + SerialNumberStrLen + 1 + SKUNumbe= rStrLen + 1 + FamilyStrLen + 1 + 1; - SmbiosRecord =3D AllocateZeroPool (TableSize); - if (SmbiosRecord =3D=3D 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 =3D SMBIOS_TYPE_SYSTEM_INFORMATION; - SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE1); - SmbiosRecord->Hdr.Handle =3D 0; - - // - // Add strings to bottom of data block - // - StringOffset =3D SmbiosRecord->Hdr.Length; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ManufacturerStr, Manufac= turerStrLen); - StringOffset +=3D ManufacturerStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ProductNameStr, ProductN= ameStrLen); - StringOffset +=3D ProductNameStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VersionStrLe= n); - StringOffset +=3D VersionStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SerialNumberStr, SerialN= umberStrLen); - StringOffset +=3D SerialNumberStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SKUNumberStr, SKUNumberS= trLen); - StringOffset +=3D SKUNumberStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, FamilyStr, FamilyStrLen)= ; - - // - // Now we have got the full smbios record, call smbios protocol to add = this record. - // - Status =3D AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HE= ADER *) SmbiosRecord); - - FreePool(SmbiosRecord); - return Status; -} diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2= BaseBoardManufacturerFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/= SmbiosBasicDxe/Type2BaseBoardManufacturerFunction.c deleted file mode 100644 index 9193cb0be7..0000000000 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoa= rdManufacturerFunction.c +++ /dev/null @@ -1,131 +0,0 @@ -/** @file - Smbios type 2. - -Copyright (c) 2018, Intel Corporation. All rights reserved.
-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 =3D PcdGetPtr (PcdSmbiosType2BaseBoardInformation); - - // - // Get BoardManufacturer String. - // - ManufacturerStr =3D PcdGetPtr (PcdSmbiosType2StringManufacturer); - ManuStrLen =3D AsciiStrLen (ManufacturerStr); - ASSERT (ManuStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get Board ProductName String. - // - ProductStr =3D PcdGetPtr (PcdSmbiosType2StringProductName); - ProductStrLen =3D AsciiStrLen (ProductStr); - ASSERT (ProductStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get Board Version String. - // - VersionStr =3D PcdGetPtr (PcdSmbiosType2StringVersion); - VerStrLen =3D AsciiStrLen (VersionStr); - ASSERT (VerStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get Board Serial Number String. - // - SerialNumberStr =3D PcdGetPtr (PcdSmbiosType2StringSerialNumber); - SerialNumStrLen =3D AsciiStrLen (SerialNumberStr); - ASSERT (SerialNumStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get Board Asset Tag String. - // - AssertTagStr =3D PcdGetPtr (PcdSmbiosType2StringAssetTag); - AssertTagStrLen =3D AsciiStrLen (AssertTagStr); - ASSERT (AssertTagStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get Board Chassis Location Tag String. - // - ChassisStr =3D PcdGetPtr (PcdSmbiosType2StringLocationInChassis); - ChassisStrLen =3D AsciiStrLen (ChassisStr); - ASSERT (ChassisStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Two zeros following the last string. - // - SourceSize =3D PcdGetSize (PcdSmbiosType2BaseBoardInformation); - TotalSize =3D SourceSize + ManuStrLen + 1 + ProductStrLen + 1 + VerStrL= en + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1 + ChassisStrLen + 1 + 1; - SmbiosRecord =3D AllocateZeroPool(TotalSize); - if (SmbiosRecord =3D=3D NULL) { - ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES); - return EFI_OUT_OF_RESOURCES; - } - - CopyMem (SmbiosRecord, PcdSmbiosRecord, SourceSize); - - SmbiosRecord->Hdr.Type =3D SMBIOS_TYPE_BASEBOARD_INFORMATION; - SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE2); - if (PcdSmbiosRecord->NumberOfContainedObjectHandles >=3D 2) { - SmbiosRecord->Hdr.Length +=3D (PcdSmbiosRecord->NumberOfContainedObje= ctHandles - 1) * sizeof(PcdSmbiosRecord->ContainedObjectHandles); - } - ASSERT(SourceSize >=3D SmbiosRecord->Hdr.Length); - SmbiosRecord->Hdr.Handle =3D 0; - - StringOffset =3D SmbiosRecord->Hdr.Length; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ManufacturerStr, ManuStr= Len); - StringOffset +=3D ManuStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ProductStr, ProductStrLe= n); - StringOffset +=3D ProductStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VerStrLen); - StringOffset +=3D VerStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SerialNumberStr, SerialN= umStrLen); - StringOffset +=3D SerialNumStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, AssertTagStr, AssertTagS= trLen); - StringOffset +=3D AssertTagStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ChassisStr, ChassisStrLe= n); - - // - // Now we have got the full smbios record, call smbios protocol to add = this record. - // - Status =3D AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HE= ADER *) SmbiosRecord); - - FreePool(SmbiosRecord); - return Status; -} diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3= 2BootInformationFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/Smbio= sBasicDxe/Type32BootInformationFunction.c deleted file mode 100644 index 87bfd045da..0000000000 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootIn= formationFunction.c +++ /dev/null @@ -1,56 +0,0 @@ -/** @file - Smbios type 32. - -Copyright (c) 2018, Intel Corporation. All rights reserved.
-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 =3D PcdGetPtr (PcdSmbiosType32SystemBootInformation); - - // - // Two zeros following the last string. - // - SmbiosRecord =3D AllocateZeroPool(sizeof (SMBIOS_TABLE_TYPE32) + 1 + 1)= ; - if (SmbiosRecord =3D=3D NULL) { - ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES); - return EFI_OUT_OF_RESOURCES; - } - - CopyMem (SmbiosRecord, PcdSmbiosRecord, sizeof(SMBIOS_TABLE_TYPE32)); - - SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION; - SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE32); - SmbiosRecord->Hdr.Handle =3D 0; - - // - // Now we have got the full smbios record, call smbios protocol to add = this record. - // - Status =3D AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HE= ADER *) SmbiosRecord); - - FreePool(SmbiosRecord); - return Status; -} diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3= ChassisManufacturerFunction.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/Sm= biosBasicDxe/Type3ChassisManufacturerFunction.c deleted file mode 100644 index 33732bc9ca..0000000000 --- a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3Chassis= ManufacturerFunction.c +++ /dev/null @@ -1,125 +0,0 @@ -/** @file - Smbios type 3. - -Copyright (c) 2018, Intel Corporation. All rights reserved.
-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 =3D PcdGetPtr (PcdSmbiosType3SystemEnclosureChassis); - - // - // Get ChassisManufacturer String. - // - ManufacturerStr =3D PcdGetPtr (PcdSmbiosType3StringManufacturer); - ManuStrLen =3D AsciiStrLen (ManufacturerStr); - ASSERT (ManuStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get ChassisVersion String. - // - VersionStr =3D PcdGetPtr (PcdSmbiosType3StringVersion); - VerStrLen =3D AsciiStrLen (VersionStr); - ASSERT (VerStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get ChassisSerialNumber String. - // - SerialNumberStr =3D PcdGetPtr (PcdSmbiosType3StringSerialNumber); - SerialNumStrLen =3D AsciiStrLen (SerialNumberStr); - ASSERT (SerialNumStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get ChassisAssetTag String. - // - AssertTagStr =3D PcdGetPtr (PcdSmbiosType3StringAssetTag); - AssertTagStrLen =3D AsciiStrLen (AssertTagStr); - ASSERT (AssertTagStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Get ChassisSKUNumber String. - // - SKUNumberStr =3D PcdGetPtr (PcdSmbiosType3StringSKUNumber); - SKUNumberStrLen =3D AsciiStrLen (SKUNumberStr); - ASSERT (SKUNumberStrLen <=3D SMBIOS_STRING_MAX_LENGTH); - - // - // Two zeros following the last string. - // - SourceSize =3D PcdGetSize(PcdSmbiosType3SystemEnclosureChassis); - TotalSize =3D SourceSize + sizeof(SMBIOS_TABLE_STRING) + ManuStrLen + 1= + VerStrLen + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1 + SKUNumberStr= Len + 1 + 1; - SmbiosRecord =3D AllocateZeroPool(TotalSize); - if (SmbiosRecord =3D=3D NULL) { - ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES); - return EFI_OUT_OF_RESOURCES; - } - - CopyMem (SmbiosRecord, PcdSmbiosRecord, SourceSize); - - SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE; - SmbiosRecord->Hdr.Length =3D OFFSET_OF (SMBIOS_TABLE_TYPE3, ContainedEl= ements) + sizeof(SMBIOS_TABLE_STRING); - if (PcdSmbiosRecord->ContainedElementCount >=3D 1) { - SmbiosRecord->Hdr.Length +=3D PcdSmbiosRecord->ContainedElementCount = * PcdSmbiosRecord->ContainedElementRecordLength; - } - SmbiosRecord->Hdr.Handle =3D 0; - - if ((PcdSmbiosRecord->ContainedElementCount =3D=3D 0) || (SourceSize < = (UINTN)SmbiosRecord + SmbiosRecord->Hdr.Length)) { - SKUNumberPtr =3D (SMBIOS_TABLE_STRING *)((UINTN)SmbiosRecord + Smbios= Record->Hdr.Length - sizeof(SMBIOS_TABLE_STRING)); - *SKUNumberPtr =3D 5; - } - - StringOffset =3D SmbiosRecord->Hdr.Length; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, ManufacturerStr, ManuStr= Len); - StringOffset +=3D ManuStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, VersionStr, VerStrLen); - StringOffset +=3D VerStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SerialNumberStr, SerialN= umStrLen); - StringOffset +=3D SerialNumStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, AssertTagStr, AssertTagS= trLen); - StringOffset +=3D AssertTagStrLen + 1; - CopyMem ((UINT8 *)SmbiosRecord + StringOffset, SKUNumberStr, SKUNumberS= trLen); - - // - // Now we have got the full smbios record, call smbios protocol to add = this record. - // - Status =3D AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HE= ADER *) SmbiosRecord); - - FreePool(SmbiosRecord); - return Status; -} -- 2.16.2.windows.1