summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiewen Yao <jiewen.yao@intel.com>2018-02-15 21:59:42 +0800
committerJiewen Yao <jiewen.yao@intel.com>2018-03-02 08:36:15 +0800
commitc34762c8cf9323a8613609c116f3c78efad423b2 (patch)
treed242366239e8b7507d4fa32daf640bf44a61d477
parent78b62d1a0c3fc425107b85d8c97404a80609f752 (diff)
downloadedk2-platforms-c34762c8cf9323a8613609c116f3c78efad423b2.tar.xz
Add AdvancedFeaturePkg. We can put open source advanced feature here.
Cc: Michael A Kubacki <michael.a.kubacki@intel.com> Cc: Amy Chan <amy.chan@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com> Cc: Isaac W Oram <isaac.w.oram@intel.com> Cc: Brett Wang <brett.wang@intel.com> Cc: Daocheng Bu <daocheng.bu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec149
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc136
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Contributions.txt218
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc52
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedPeiInclude.dsc15
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf53
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPostMemoryInclude.fdf14
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPreMemoryInclude.fdf15
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/License.txt25
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h59
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf96
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryPoint.c137
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVendorFunction.c88
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemManufacturerFunction.c121
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoardManufacturerFunction.c138
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootInformationFunction.c61
-rw-r--r--Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3ChassisManufacturerFunction.c131
17 files changed, 1508 insertions, 0 deletions
diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
new file mode 100644
index 0000000000..a0e6f78a42
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
@@ -0,0 +1,149 @@
+## @file
+# This package provides the modules that build for a full feature platform.
+# This AdvancedFeaturePkg should only depend on EDKII Core packages and MinPlatformPkg.
+#
+# The DEC files are used by the utilities that parse DSC and
+# INF files to generate AutoGen.c and AutoGen.h files
+# for the build infrastructure.
+#
+# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+
+[Defines]
+DEC_SPECIFICATION = 0x00010017
+PACKAGE_NAME = AdvancedFeaturePkg
+PACKAGE_VERSION = 0.1
+PACKAGE_GUID = 290127D9-ABED-4DD8-A35D-73DCB4261BCB
+
+
+[Includes]
+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
new file mode 100644
index 0000000000..fa590c3262
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -0,0 +1,136 @@
+## @file
+# Platform description.
+#
+# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+ PLATFORM_NAME = AdvancedFeaturePkg
+ PLATFORM_GUID = 5E4C05BC-C5F0-4843-BAE1-3AAFE269DB8F
+ PLATFORM_VERSION = 0.1
+ DSC_SPECIFICATION = 0x00010005
+ OUTPUT_DIRECTORY = Build/AdvancedFeaturePkg
+ SUPPORTED_ARCHITECTURES = IA32|X64
+ BUILD_TARGETS = DEBUG|RELEASE
+ SKUID_IDENTIFIER = DEFAULT
+
+################################################################################
+#
+# SKU Identification section - list of all SKU IDs supported by this
+# Platform.
+#
+################################################################################
+[SkuIds]
+ 0|DEFAULT # The entry: 0|DEFAULT is reserved and always required.
+
+################################################################################
+#
+# Pcd Section - list of all EDK II PCD Entries defined by this Platform
+#
+################################################################################
+
+[PcdsFeatureFlag]
+
+################################################################################
+#
+# Library Class section - list of all Library Classes needed by this Platform.
+#
+################################################################################
+
+[LibraryClasses.common]
+
+ PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
+ PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
+ DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
+ UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+ UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
+ SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+ PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
+
+ #
+ # Basic
+ #
+ BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
+
+ PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+ CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+ IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
+ PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
+ PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
+ BasePciLibPciExpress|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+# PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+ PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
+ PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+ CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
+ PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
+ PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+ SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
+ #
+ # UEFI & PI
+ #
+ UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+ UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+ UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+ UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+ HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
+ UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+
+ UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
+ PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
+ PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
+ DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
+ DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
+ UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
+
+ DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+
+[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
+ PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
+ HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
+ MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.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]
+ HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
+ MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+
+###################################################################################################
+#
+# Components Section - list of the modules and components that will be processed by compilation
+# tools and the EDK II tools to generate PE32/PE32+/Coff image files.
+#
+# Note: The EDK II DSC file is not used to specify how compiled binary images get placed
+# into firmware volume images. This section is just a list of modules to compile from
+# source into UEFI-compliant binaries.
+# It is the FDF file that contains information on combining binary files into firmware
+# volume images, whose concept is beyond UEFI and is described in PI specification.
+# Binary modules do not need to be listed in this section, as they should be
+# specified in the FDF file. For example: Shell binary (Shell_Full.efi), FAT binary (Fat.efi),
+# Logo (Logo.bmp), and etc.
+# There may also be modules listed in this section that are not required in the FDF file,
+# When a module listed here is excluded from FDF file, then UEFI-compliant binary will be
+# generated for it, but the binary will not be put into any firmware volume.
+#
+###################################################################################################
+
+[Components]
+
+ AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf
diff --git a/Platform/Intel/AdvancedFeaturePkg/Contributions.txt b/Platform/Intel/AdvancedFeaturePkg/Contributions.txt
new file mode 100644
index 0000000000..f87cbd73c6
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Contributions.txt
@@ -0,0 +1,218 @@
+
+======================
+= Code Contributions =
+======================
+
+To make a contribution to a TianoCore project, follow these steps.
+1. Create a change description in the format specified below to
+ use in the source control commit log.
+2. Your commit message must include your "Signed-off-by" signature,
+ and "Contributed-under" message.
+3. Your "Contributed-under" message explicitly states that the
+ contribution is made under the terms of the specified
+ contribution agreement. Your "Contributed-under" message
+ must include the name of contribution agreement and version.
+ For example: Contributed-under: TianoCore Contribution Agreement 1.0
+ The "TianoCore Contribution Agreement" is included below in
+ this document.
+4. Submit your code to the TianoCore project using the process
+ that the project documents on its web page. If the process is
+ not documented, then submit the code on development email list
+ for the project.
+5. It is preferred that contributions are submitted using the same
+ copyright license as the base project. When that is not possible,
+ then contributions using the following licenses can be accepted:
+ * BSD (2-clause): http://opensource.org/licenses/BSD-2-Clause
+ * BSD (3-clause): http://opensource.org/licenses/BSD-3-Clause
+ * MIT: http://opensource.org/licenses/MIT
+ * Python-2.0: http://opensource.org/licenses/Python-2.0
+ * Zlib: http://opensource.org/licenses/Zlib
+
+ Contributions of code put into the public domain can also be
+ accepted.
+
+ Contributions using other licenses might be accepted, but further
+ review will be required.
+
+=====================================================
+= Change Description / Commit Message / Patch Email =
+=====================================================
+
+Your change description should use the standard format for a
+commit message, and must include your "Signed-off-by" signature
+and the "Contributed-under" message.
+
+== Sample Change Description / Commit Message =
+
+=== Start of sample patch email message ===
+
+From: Contributor Name <contributor@example.com>
+Subject: [PATCH] CodeModule: Brief-single-line-summary
+
+Full-commit-message
+
+Contributed-under: TianoCore Contribution Agreement 1.0
+Signed-off-by: Contributor Name <contributor@example.com>
+---
+
+An extra message for the patch email which will not be considered part
+of the commit message can be added here.
+
+Patch content inline or attached
+
+=== End of sample patch email message ===
+
+=== Notes for sample patch email ===
+
+* The first line of commit message is taken from the email's subject
+ line following [PATCH]. The remaining portion of the commit message
+ is the email's content until the '---' line.
+* git format-patch is one way to create this format
+
+=== Definitions for sample patch email ===
+
+* "CodeModule" is a short idenfier for the affected code. For
+ example MdePkg, or MdeModulePkg UsbBusDxe.
+* "Brief-single-line-summary" is a short summary of the change.
+* The entire first line should be less than ~70 characters.
+* "Full-commit-message" a verbose multiple line comment describing
+ the change. Each line should be less than ~70 characters.
+* "Contributed-under" explicitely states that the contribution is
+ made under the terms of the contribtion agreement. This
+ agreement is included below in this document.
+* "Signed-off-by" is the contributor's signature identifying them
+ by their real/legal name and their email address.
+
+========================================
+= TianoCore Contribution Agreement 1.0 =
+========================================
+
+INTEL CORPORATION ("INTEL") MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
+INFORMATION AND/OR OTHER MATERIALS FOR USE IN THE TIANOCORE OPEN SOURCE
+PROJECT (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE
+TERMS AND CONDITIONS OF THIS AGREEMENT BETWEEN YOU AND INTEL AND/OR THE
+TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR
+REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE
+CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
+AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
+AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
+USE THE CONTENT.
+
+Unless otherwise indicated, all Content made available on the TianoCore
+site is provided to you under the terms and conditions of the BSD
+License ("BSD"). A copy of the BSD License is available at
+http://opensource.org/licenses/bsd-license.php
+or when applicable, in the associated License.txt file.
+
+Certain other content may be made available under other licenses as
+indicated in or with such Content. (For example, in a License.txt file.)
+
+You accept and agree to the following terms and conditions for Your
+present and future Contributions submitted to TianoCore site. Except
+for the license granted to Intel hereunder, You reserve all right,
+title, and interest in and to Your Contributions.
+
+== SECTION 1: Definitions ==
+* "You" or "Contributor" shall mean the copyright owner or legal
+ entity authorized by the copyright owner that is making a
+ Contribution hereunder. All other entities that control, are
+ controlled by, or are under common control with that entity are
+ considered to be a single Contributor. For the purposes of this
+ definition, "control" means (i) the power, direct or indirect, to
+ cause the direction or management of such entity, whether by
+ contract or otherwise, or (ii) ownership of fifty percent (50%)
+ or more of the outstanding shares, or (iii) beneficial ownership
+ of such entity.
+* "Contribution" shall mean any original work of authorship,
+ including any modifications or additions to an existing work,
+ that is intentionally submitted by You to the TinaoCore site for
+ inclusion in, or documentation of, any of the Content. For the
+ purposes of this definition, "submitted" means any form of
+ electronic, verbal, or written communication sent to the
+ TianoCore site or its representatives, including but not limited
+ to communication on electronic mailing lists, source code
+ control systems, and issue tracking systems that are managed by,
+ or on behalf of, the TianoCore site for the purpose of
+ discussing and improving the Content, but excluding
+ communication that is conspicuously marked or otherwise
+ designated in writing by You as "Not a Contribution."
+
+== SECTION 2: License for Contributions ==
+* Contributor hereby agrees that redistribution and use of the
+ Contribution in source and binary forms, with or without
+ modification, are permitted provided that the following
+ conditions are met:
+** Redistributions of source code must retain the Contributor's
+ copyright notice, this list of conditions and the following
+ disclaimer.
+** Redistributions in binary form must reproduce the Contributor's
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+* Disclaimer. None of the names of Contributor, Intel, or the names
+ of their respective contributors may be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+* Contributor grants a license (with the right to sublicense) under
+ claims of Contributor's patents that Contributor can license that
+ are infringed by the Contribution (as delivered by Contributor) to
+ make, use, distribute, sell, offer for sale, and import the
+ Contribution and derivative works thereof solely to the minimum
+ extent necessary for licensee to exercise the granted copyright
+ license; this patent license applies solely to those portions of
+ the Contribution that are unmodified. No hardware per se is
+ licensed.
+* EXCEPT AS EXPRESSLY SET FORTH IN SECTION 3 BELOW, THE
+ CONTRIBUTION IS PROVIDED BY THE CONTRIBUTOR "AS IS" AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
+ CONTRIBUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGE.
+
+== SECTION 3: Representations ==
+* You represent that You are legally entitled to grant the above
+ license. If your employer(s) has rights to intellectual property
+ that You create that includes Your Contributions, You represent
+ that You have received permission to make Contributions on behalf
+ of that employer, that Your employer has waived such rights for
+ Your Contributions.
+* You represent that each of Your Contributions is Your original
+ creation (see Section 4 for submissions on behalf of others).
+ You represent that Your Contribution submissions include complete
+ details of any third-party license or other restriction
+ (including, but not limited to, related patents and trademarks)
+ of which You are personally aware and which are associated with
+ any part of Your Contributions.
+
+== SECTION 4: Third Party Contributions ==
+* Should You wish to submit work that is not Your original creation,
+ You may submit it to TianoCore site separately from any
+ Contribution, identifying the complete details of its source
+ and of any license or other restriction (including, but not
+ limited to, related patents, trademarks, and license agreements)
+ of which You are personally aware, and conspicuously marking the
+ work as "Submitted on behalf of a third-party: [named here]".
+
+== SECTION 5: Miscellaneous ==
+* Applicable Laws. Any claims arising under or relating to this
+ Agreement shall be governed by the internal substantive laws of
+ the State of Delaware or federal courts located in Delaware,
+ without regard to principles of conflict of laws.
+* Language. This Agreement is in the English language only, which
+ language shall be controlling in all respects, and all versions
+ of this Agreement in any other language shall be for accommodation
+ only and shall not be binding. All communications and notices made
+ or given pursuant to this Agreement, and all documentation and
+ support to be provided, unless otherwise noted, shall be in the
+ English language.
+
diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
new file mode 100644
index 0000000000..4d70db6062
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
@@ -0,0 +1,52 @@
+## @file
+# Platform description.
+#
+# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+
+ #
+ # UEFI network modules
+ #
+!if gAdvancedFeaturePkgTokenSpaceGuid.PcdNetworkEnable == TRUE
+ MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
+ MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
+ MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+ MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
+ MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
+ MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
+ MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
+ MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+ MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
+ MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+ MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+ #MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+
+ NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+ NetworkPkg/TcpDxe/TcpDxe.inf
+ NetworkPkg/Udp6Dxe/Udp6Dxe.inf
+ NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
+ NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
+
+ NetworkPkg/DnsDxe/DnsDxe.inf
+ NetworkPkg/HttpDxe/HttpDxe.inf
+ NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
+ NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+
+ #NetworkPkg/IScsiDxe/IScsiDxe.inf
+ NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+!endif
+
+!if gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable == TRUE
+ MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!endif
+
diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedPeiInclude.dsc b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedPeiInclude.dsc
new file mode 100644
index 0000000000..30f37cfc24
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Dsc/CoreAdvancedPeiInclude.dsc
@@ -0,0 +1,15 @@
+## @file
+# Platform description.
+#
+# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
new file mode 100644
index 0000000000..0be408d13b
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedLateInclude.fdf
@@ -0,0 +1,53 @@
+## @file
+# FDF file of Platform.
+#
+# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+
+#
+# UEFI network modules
+#
+!if gAdvancedFeaturePkgTokenSpaceGuid.PcdNetworkEnable == TRUE
+INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
+INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
+INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
+INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
+INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
+INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
+INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+#INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
+INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+#INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+
+INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+INF NetworkPkg/TcpDxe/TcpDxe.inf
+INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf
+INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
+INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
+
+INF NetworkPkg/DnsDxe/DnsDxe.inf
+INF NetworkPkg/HttpDxe/HttpDxe.inf
+INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
+INF NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+
+#INF NetworkPkg/IScsiDxe/IScsiDxe.inf
+INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+!endif
+
+!if gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable == TRUE
+INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+!endif
+
+
diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPostMemoryInclude.fdf b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPostMemoryInclude.fdf
new file mode 100644
index 0000000000..013c10146b
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPostMemoryInclude.fdf
@@ -0,0 +1,14 @@
+## @file
+# FDF file of Platform.
+#
+# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
diff --git a/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPreMemoryInclude.fdf b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPreMemoryInclude.fdf
new file mode 100644
index 0000000000..95fe1e875e
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Include/Fdf/CoreAdvancedPreMemoryInclude.fdf
@@ -0,0 +1,15 @@
+## @file
+# FDF file of Platform.
+#
+# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
diff --git a/Platform/Intel/AdvancedFeaturePkg/License.txt b/Platform/Intel/AdvancedFeaturePkg/License.txt
new file mode 100644
index 0000000000..3bb2e6d1ea
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/License.txt
@@ -0,0 +1,25 @@
+Copyright (c) 2017, Intel Corporation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h
new file mode 100644
index 0000000000..204e16e617
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasic.h
@@ -0,0 +1,59 @@
+/**
+ This file contains a 'Sample Driver' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may be modified by the user, subject to
+ the additional terms of the license agreement
+
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+ @file SmbiosMisc.h
+
+ Header file for the SmbiosMisc Driver.
+
+**/
+
+#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/SmbiosBasicDxe.inf b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf
new file mode 100644
index 0000000000..64dba3507e
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicDxe.inf
@@ -0,0 +1,96 @@
+#
+# This file contains a 'Sample Driver' and is licensed as such
+# under the terms of your license agreement with Intel or your
+# vendor. This file may be modified by the user, subject to
+# the additional terms of the license agreement
+#
+#
+## @file
+# Component description file for Smbios Misc module.
+#
+# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+#
+# This software and associated documentation (if any) is furnished
+# under a license and may only be used or copied in accordance
+# with the terms of the license. Except as permitted by such
+# license, no part of this software or documentation may be
+# reproduced, stored in a retrieval system, or transmitted in any
+# form or by any means without the express written consent of
+# Intel Corporation.
+#
+#
+##
+
+[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
+ 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/SmbiosBasicEntryPoint.c b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryPoint.c
new file mode 100644
index 0000000000..2eb87611d4
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/SmbiosBasicEntryPoint.c
@@ -0,0 +1,137 @@
+/**
+ This file contains a 'Sample Driver' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may be modified by the user, subject to
+ the additional terms of the license agreement
+
+
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+ @file SmbiosBasicEntryPoint.c
+
+**/
+
+#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
new file mode 100644
index 0000000000..847737cd05
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type0BiosVendorFunction.c
@@ -0,0 +1,88 @@
+/**
+ SMBIOS type 0.
+
+ Copyright (c) 1999 - 2016 Intel Corporation. All rights reserved.
+ This software and associated documentation (if any) is furnished
+ under a license and may only be used or copied in accordance
+ with the terms of the license. Except as permitted by such
+ license, no part of this software or documentation may be
+ reproduced, stored in a retrieval system, or transmitted in any
+ form or by any means without the express written consent of
+ Intel Corporation.
+
+**/
+
+
+#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
new file mode 100644
index 0000000000..b3b07c57f8
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type1SystemManufacturerFunction.c
@@ -0,0 +1,121 @@
+/**
+ SMBIOS type 1.
+
+ Copyright (c) 2008 - 2016 Intel Corporation. All rights reserved.
+ This software and associated documentation (if any) is furnished
+ under a license and may only be used or copied in accordance
+ with the terms of the license. Except as permitted by such
+ license, no part of this software or documentation may be
+ reproduced, stored in a retrieval system, or transmitted in any
+ form or by any means without the express written consent of
+ Intel Corporation.
+
+**/
+
+
+#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
new file mode 100644
index 0000000000..f0159fa781
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type2BaseBoardManufacturerFunction.c
@@ -0,0 +1,138 @@
+/**
+ SMBIOS type 2.
+
+ Copyright (c) 2011 - 2012 Intel Corporation. All rights reserved.
+ This software and associated documentation (if any) is furnished
+ under a license and may only be used or copied in accordance
+ with the terms of the license. Except as permitted by such
+ license, no part of this software or documentation may be
+ reproduced, stored in a retrieval system, or transmitted in any
+ form or by any means without the express written consent of
+ Intel Corporation.
+
+**/
+
+
+#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
new file mode 100644
index 0000000000..60c70e24d8
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type32BootInformationFunction.c
@@ -0,0 +1,61 @@
+/**
+ Copyright (c) 1999 - 2016 Intel Corporation. All rights reserved.
+ This software and associated documentation (if any) is furnished
+ under a license and may only be used or copied in accordance
+ with the terms of the license. Except as permitted by such
+ license, no part of this software or documentation may be
+ reproduced, stored in a retrieval system, or transmitted in any
+ form or by any means without the express written consent of
+ Intel Corporation.
+
+**/
+
+
+#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
new file mode 100644
index 0000000000..f806bffa55
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Smbios/SmbiosBasicDxe/Type3ChassisManufacturerFunction.c
@@ -0,0 +1,131 @@
+/**
+ SMBIOS type 3.
+
+ Copyright (c) 2011 - 2016 Intel Corporation. All rights reserved.
+ This software and associated documentation (if any) is furnished
+ under a license and may only be used or copied in accordance
+ with the terms of the license. Except as permitted by such
+ license, no part of this software or documentation may be
+ reproduced, stored in a retrieval system, or transmitted in any
+ form or by any means without the express written consent of
+ Intel Corporation.
+
+**/
+
+#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;
+}