summaryrefslogtreecommitdiff
path: root/Platform/Intel/MinPlatformPkg/Include
diff options
context:
space:
mode:
authorJiewen Yao <jiewen.yao@intel.com>2017-05-20 15:42:12 +0800
committerJiewen Yao <jiewen.yao@intel.com>2017-06-23 11:54:49 +0800
commit1f003fafade69043b4fd587dd30fc63997df0d3e (patch)
tree1cb078c51efe0c56ce1b0eb3598a121862c7376f /Platform/Intel/MinPlatformPkg/Include
parent012d883a848bf7af8b4859394bb32f8b2a45313f (diff)
downloadedk2-platforms-1f003fafade69043b4fd587dd30fc63997df0d3e.tar.xz
Add MinPlatform.
reviewed-by: Jiewen Yao <jiewen.yao@intel.com> reviewed-by: Michael A Kubacki <michael.a.kubacki@intel.com> reviewed-by: Amy Chan <amy.chan@intel.com> reviewed-by: Rangasai V Chaganty <rangasai.v.chaganty@intel.com> reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'Platform/Intel/MinPlatformPkg/Include')
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc142
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc142
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc96
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiInclude.dsc58
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc56
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Fdf/CoreDxeInclude.fdf111
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiBfvInclude.fdf18
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiPostMemInclude.fdf14
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiPreMemInclude.fdf32
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf303
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h60
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/HstiIbvFeatureBit.h60
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h146
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiEnableLib.h33
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiTableLib.h28
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/BoardInitLib.h92
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h30
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h30
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/HobVariableLib.h111
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardAcpiSupportLib.h60
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardInitSupportLib.h85
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/PeiLib.h85
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/SecBoardInitLib.h38
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/SpiFlashCommonLib.h104
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/TestPointCheckLib.h219
-rw-r--r--Platform/Intel/MinPlatformPkg/Include/Library/TestPointLib.h225
26 files changed, 2378 insertions, 0 deletions
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
new file mode 100644
index 0000000000..6446898102
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
@@ -0,0 +1,142 @@
+## @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.
+#
+##
+
+ #
+ # Generic EDKII Lib
+ #
+
+[LibraryClasses.common]
+ #
+ # Entry point
+ #
+ 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
+
+ #
+ # Framework
+ #
+ S3BootScriptLib|MdePkg/Library/BaseS3BootScriptLibNull/BaseS3BootScriptLibNull.inf
+ S3IoLib|MdePkg/Library/BaseS3IoLib/BaseS3IoLib.inf
+ S3PciLib|MdePkg/Library/BaseS3PciLib/BaseS3PciLib.inf
+
+ #
+ # Generic Modules
+ #
+ UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
+
+ OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
+ CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+
+ UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+ SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
+ SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
+ SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
+ IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
+
+ PostCodeLib|MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf
+
+ DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
+
+ #
+ # CPU
+ #
+ MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
+ LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
+ SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
+
+ #
+ # Platform
+ #
+ TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
+
+ #
+ # Misc
+ #
+!if $(TARGET) == RELEASE
+ DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+!else
+ DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
+!endif
+
+ PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+
+ TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
+ VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
+ PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
+ AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
+
+!if gPlatformModuleTokenSpaceGuid.PcdUefiSecureBootEnable == TRUE
+ AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
+!endif
+
+ #
+ # CryptLib
+ #
+ IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+ OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
+
+ RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
+
+ Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf
+ Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf
+ Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
+ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
+ Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
new file mode 100644
index 0000000000..38315a4e95
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
@@ -0,0 +1,142 @@
+## @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.
+#
+##
+
+
+ #
+ # Generic EDKII Driver
+ #
+ MdeModulePkg/Core/Dxe/DxeMain.inf {
+ <LibraryClasses>
+ NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
+ }
+ MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
+ <LibraryClasses>
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ }
+
+ MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+ MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
+
+ UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
+ PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
+ MdeModulePkg/Universal/Metronome/Metronome.inf
+ MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
+ PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
+ MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
+
+!if gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly == FALSE
+ MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
+ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
+ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
+ <LibraryClasses>
+ NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+ NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
+ }
+!else
+ MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
+!endif
+
+ MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
+
+ MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+ MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
+ MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
+ <LibraryClasses>
+!if gPlatformModuleTokenSpaceGuid.PcdUefiSecureBootEnable == TRUE
+ NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
+!endif
+!if gPlatformModuleTokenSpaceGuid.PcdTpm2Enable == TRUE
+ NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf
+!endif
+ }
+
+ MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+
+ UefiCpuPkg/CpuDxe/CpuDxe.inf
+
+ MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
+ PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
+
+ MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
+ MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
+
+ MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
+ MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
+ MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
+ MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
+ MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
+ MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
+ MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
+ MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+ MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
+
+ MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
+ MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
+ MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
+ FatBinPkg/EnhancedFatDxe/Fat.inf
+
+ MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf
+ MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
+
+ MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
+ MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+
+ MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
+
+ MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+
+ MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
+ MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
+
+ MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
+
+ MdeModulePkg/Application/UiApp/UiApp.inf
+ MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
+
+!if gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly == FALSE
+ MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
+ MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+
+ MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
+ MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
+
+ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
+
+ UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
+ MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf
+!endif
+
+!if gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly == FALSE
+ MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
+ MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
+ MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf
+ MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
+!endif
+
+!if gPlatformModuleTokenSpaceGuid.PcdUefiSecureBootEnable == TRUE
+ SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+!endif
+
+!if gPlatformModuleTokenSpaceGuid.PcdTpm2Enable == TRUE
+ SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
+ SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {
+ <LibraryClasses>
+ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf
+ NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf
+ NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
+ }
+ SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+ SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
+!endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
new file mode 100644
index 0000000000..cd83e72877
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
@@ -0,0 +1,96 @@
+## @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.
+#
+##
+
+
+ #
+ # Generic EDKII Lib
+ #
+
+ #
+ # DXE phase common
+ #
+[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
+ ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
+
+ HstiLib|MdePkg/Library/DxeHstiLib/DxeHstiLib.inf
+
+ LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+
+ MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
+ FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
+ TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
+
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+
+ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf
+ HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
+ Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
+
+[LibraryClasses.common.DXE_CORE]
+ HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
+ MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+
+ PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
+
+!if $(TARGET) == DEBUG
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+!endif
+
+[LibraryClasses.common.DXE_DRIVER]
+ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
+
+[LibraryClasses.common.DXE_SMM_DRIVER]
+ SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
+ ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf
+ MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
+ LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
+ SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
+ PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
+
+ SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf
+
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
+ Tcg2PhysicalPresenceLib|SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
+
+[LibraryClasses.common.SMM_CORE]
+ HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+ MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf
+ SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
+ ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf
+ SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
+ PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
+!if $(TARGET) == DEBUG
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+!endif
+
+[LibraryClasses.common.DXE_RUNTIME_DRIVER]
+ ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
+
+[LibraryClasses.common.UEFI_DRIVER]
+ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
+
+[LibraryClasses.common.UEFI_APPLICATION]
+ ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+ FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
+ SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiInclude.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiInclude.dsc
new file mode 100644
index 0000000000..e2c07aeb3f
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiInclude.dsc
@@ -0,0 +1,58 @@
+## @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.
+#
+##
+
+ #
+ # Generic EDKII Driver
+ #
+
+ #
+ # FSP wrapper SEC Core
+ #
+ UefiCpuPkg/SecCore/SecCore.inf {
+ <LibraryClasses>
+ #PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
+ }
+
+ MdeModulePkg/Core/Pei/PeiMain.inf
+
+ MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
+ <LibraryClasses>
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ }
+ MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+ MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
+
+ UefiCpuPkg/CpuIoPei/CpuIoPei.inf
+
+ MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
+
+ MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
+
+ MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PcatSingleSegmentPciCfg2Pei.inf
+
+ MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {
+ <LibraryClasses>
+ NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
+ }
+
+!if gPlatformModuleTokenSpaceGuid.PcdTpm2Enable == TRUE
+ SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
+ SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {
+ <LibraryClasses>
+ NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf
+ NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
+ }
+!endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
new file mode 100644
index 0000000000..2ad6983cb6
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
@@ -0,0 +1,56 @@
+## @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.
+#
+##
+
+ #
+ # Generic EDKII Lib
+ #
+
+ #
+ # PEI phase common
+ #
+
+[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
+ S3BootScriptLib|MdePkg/Library/BaseS3BootScriptLibNull/BaseS3BootScriptLibNull.inf
+ PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
+ HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
+ MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
+ ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
+ ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
+ LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
+
+ PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
+ TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
+
+[LibraryClasses.common.SEC]
+ ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+!if $(TARGET) == DEBUG
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+!endif
+
+[LibraryClasses.common.PEI_CORE]
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+!if $(TARGET) == DEBUG
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+!endif
+
+[LibraryClasses.common.PEIM]
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+
+ Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.inf
+ HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf
+ Tcg2PhysicalPresenceLib|SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.inf
diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreDxeInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreDxeInclude.fdf
new file mode 100644
index 0000000000..7aab06f7ad
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreDxeInclude.fdf
@@ -0,0 +1,111 @@
+## @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.
+#
+##
+
+INF MdeModulePkg/Core/Dxe/DxeMain.inf
+
+INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
+
+INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
+INF PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
+INF MdeModulePkg/Universal/Metronome/Metronome.inf
+INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
+INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
+INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
+
+!if gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly == FALSE
+INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
+INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
+INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
+!else
+INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
+!endif
+
+INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
+
+INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
+INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
+INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+
+INF UefiCpuPkg/CpuDxe/CpuDxe.inf
+
+INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
+INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
+
+INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
+INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
+
+INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
+INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
+INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
+
+INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
+INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
+INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
+INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
+INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
+
+INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
+INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
+INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
+INF FatBinPkg/EnhancedFatDxe/Fat.inf
+
+INF MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf
+INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
+
+INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
+INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+
+INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
+
+INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+
+INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
+INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
+INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
+
+INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf
+INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
+
+!if gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly == FALSE
+INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
+INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
+INF MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
+INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
+INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
+INF MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf
+!endif
+
+!if gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly == FALSE
+INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
+INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
+INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf
+INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
+!endif
+
+!if gPlatformModuleTokenSpaceGuid.PcdUefiSecureBootEnable == TRUE
+INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+!endif
+
+!if gPlatformModuleTokenSpaceGuid.PcdTpm2Enable == TRUE
+INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
+INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
+INF SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
+!endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiBfvInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiBfvInclude.fdf
new file mode 100644
index 0000000000..ef9463228a
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiBfvInclude.fdf
@@ -0,0 +1,18 @@
+## @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.
+#
+##
+
+INF UefiCpuPkg/SecCore/SecCore.inf
+INF MdeModulePkg/Core/Pei/PeiMain.inf
+
diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiPostMemInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiPostMemInclude.fdf
new file mode 100644
index 0000000000..013c10146b
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiPostMemInclude.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/MinPlatformPkg/Include/Fdf/CorePeiPreMemInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiPreMemInclude.fdf
new file mode 100644
index 0000000000..3acdcc5269
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CorePeiPreMemInclude.fdf
@@ -0,0 +1,32 @@
+## @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.
+#
+##
+
+INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
+INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
+
+INF UefiCpuPkg/CpuIoPei/CpuIoPei.inf
+
+INF MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PcatSingleSegmentPciCfg2Pei.inf
+INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
+INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
+
+INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+
+!if gPlatformModuleTokenSpaceGuid.PcdTpm2Enable == TRUE
+INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
+INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
+!endif
+
diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf
new file mode 100644
index 0000000000..e341829526
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/RuleInclude.fdf
@@ -0,0 +1,303 @@
+## @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.
+#
+##
+
+[Rule.Common.SEC]
+ FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ PE32 PE32 Align = 16 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ RAW BIN Align = 16 |.com
+ }
+
+[Rule.Common.SEC.BINARY]
+ FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ PE32 PE32 Align = 16 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ RAW BIN Align = 16 |.com
+ }
+
+[Rule.Common.PEI_CORE]
+ FILE PEI_CORE = $(NAMED_GUID) {
+ PE32 PE32 Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.PEIM]
+ FILE PEIM = $(NAMED_GUID) {
+ PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.PEIM.BINARY]
+ FILE PEIM = $(NAMED_GUID) {
+ PEI_DEPEX PEI_DEPEX Optional |.depex
+ PE32 PE32 Align = Auto |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.USER_DEFINED.APINIT]
+
+ FILE RAW = $(NAMED_GUID) Fixed Align=4K {
+ RAW SEC_BIN |.com
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.USER_DEFINED.LEGACY16]
+ FILE FREEFORM = $(NAMED_GUID) {
+ RAW BIN |.com
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_CORE]
+ FILE DXE_CORE = $(NAMED_GUID) {
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_DRIVER.BINARY]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional |.depex
+ PE32 PE32 |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.UEFI_DRIVER]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.UEFI_DRIVER.BINARY]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional |.depex
+ PE32 PE32 |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_DRIVER]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_DRIVER.BINARY]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional |.depex
+ PE32 PE32 |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_DRIVER.DRIVER_ACPITABLE]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ RAW ACPI Optional |.acpi
+ RAW ASL Optional |.aml
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_RUNTIME_DRIVER]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ RAW ACPI Optional |.acpi
+ RAW ASL Optional |.aml
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_RUNTIME_DRIVER.BINARY]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional |.depex
+ PE32 PE32 |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_SMM_DRIVER]
+ FILE SMM = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_SMM_DRIVER.BINARY]
+ FILE SMM = $(NAMED_GUID) {
+ SMM_DEPEX SMM_DEPEX Optional |.depex
+ PE32 PE32 |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.DXE_SMM_DRIVER.DRIVER_ACPITABLE]
+ FILE SMM = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ RAW ACPI Optional |.acpi
+ RAW ASL Optional |.aml
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.SMM_CORE]
+ FILE SMM_CORE = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.UEFI_APPLICATION]
+ FILE APPLICATION = $(NAMED_GUID) {
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.UEFI_APPLICATION.BINARY]
+ FILE APPLICATION = $(NAMED_GUID) {
+ PE32 PE32 |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.UEFI_APPLICATION.UI]
+ FILE APPLICATION = $(NAMED_GUID) {
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="Enter Setup"
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.USER_DEFINED]
+ FILE FREEFORM = $(NAMED_GUID) {
+ UI STRING="$(MODULE_NAME)" Optional
+ RAW BIN |.bin
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.USER_DEFINED.ACPITABLE]
+ FILE FREEFORM = $(NAMED_GUID) {
+ RAW ACPI Optional |.acpi
+ RAW ASL Optional |.aml
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+#
+# FFS layout for R8 component type
+#
+[Rule.Common.PE32_PEIM]
+ FILE PEIM = $(NAMED_GUID) {
+ PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.BS_DRIVER]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.RT_DRIVER]
+ FILE DRIVER = $(NAMED_GUID) {
+ DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.APPLICATION]
+ FILE APPLICATION = $(NAMED_GUID) {
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.ACPITABLE]
+ FILE FREEFORM = $(NAMED_GUID) {
+ RAW ACPI Optional |.acpi
+ RAW ASL Optional |.aml
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.PE32_PEIM.Align32K]
+ FILE PEIM = $(NAMED_GUID) Align=32K {
+ PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.PE32_PEIM.Align64K]
+ FILE PEIM = $(NAMED_GUID) Align=64K {
+ PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ PE32 PE32 Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+
+[Rule.Common.PE32_PEIM.LzmaCompress]
+ FILE PEIM = $(NAMED_GUID) {
+ PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF {
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+ }
+
+[Rule.Common.PEIM.LzmaCompress]
+ FILE PEIM = $(NAMED_GUID) {
+ PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
+ GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF {
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+ }
+
+[Rule.Common.PEIM.LzmaCompressBinary]
+ FILE PEIM = $(NAMED_GUID) {
+ PEI_DEPEX PEI_DEPEX Optional |.depex
+ COMPRESS PI_STD {
+ PE32 PE32 |.efi
+ UI STRING="$(MODULE_NAME)" Optional
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
+ }
+ }
+
diff --git a/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h b/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h
new file mode 100644
index 0000000000..04589cf040
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Guid/SmramMemoryReserve.h
@@ -0,0 +1,60 @@
+/** @file
+ Definition of GUIDed HOB for reserving SMRAM regions.
+
+ This file defines:
+ * the GUID used to identify the GUID HOB for reserving SMRAM regions.
+ * the data structure of SMRAM descriptor to describe SMRAM candidate regions
+ * values of state of SMRAM candidate regions
+ * the GUID specific data structure of HOB for reserving SMRAM regions.
+ This GUIDed HOB can be used to convey the existence of the T-SEG reservation and H-SEG usage
+
+Copyright (c) 2007 - 2010, 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 that 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.
+
+ @par Revision Reference:
+ GUIDs defined in SmmCis spec version 0.9.
+
+**/
+
+#ifndef _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_
+#define _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_
+
+#define EFI_SMM_PEI_SMRAM_MEMORY_RESERVE \
+ { \
+ 0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d } \
+ }
+
+/**
+* GUID specific data structure of HOB for reserving SMRAM regions.
+*
+* Inconsistent with specification here:
+* EFI_HOB_SMRAM_DESCRIPTOR_BLOCK has been changed to EFI_SMRAM_HOB_DESCRIPTOR_BLOCK.
+* This inconsistency is kept in code in order for backward compatibility.
+**/
+typedef struct {
+ ///
+ /// Designates the number of possible regions in the system
+ /// that can be usable for SMRAM.
+ ///
+ /// Inconsistent with specification here:
+ /// In Framework SMM CIS 0.91 specification, it defines the field type as UINTN.
+ /// However, HOBs are supposed to be CPU neutral, so UINT32 should be used instead.
+ ///
+ UINT32 NumberOfSmmReservedRegions;
+ ///
+ /// Used throughout this protocol to describe the candidate
+ /// regions for SMRAM that are supported by this platform.
+ ///
+ EFI_SMRAM_DESCRIPTOR Descriptor[1];
+} EFI_SMRAM_HOB_DESCRIPTOR_BLOCK;
+
+extern EFI_GUID gEfiSmmPeiSmramMemoryReserveGuid;
+
+#endif
+
diff --git a/Platform/Intel/MinPlatformPkg/Include/HstiIbvFeatureBit.h b/Platform/Intel/MinPlatformPkg/Include/HstiIbvFeatureBit.h
new file mode 100644
index 0000000000..e833b36559
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/HstiIbvFeatureBit.h
@@ -0,0 +1,60 @@
+/** @file
+ This file contains various definitions for IBV HSTI implementation
+ including error string definitions
+
+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 that 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.
+
+**/
+
+#ifndef __HSTI_IBV_FEATURE_BIT_H__
+#define __HSTI_IBV_FEATURE_BIT_H__
+
+#define HSTI_IMPLEMENTATION_ID_PLATFORM L"Intel MinPlatform"
+
+#define HSTI_SECURITY_FEATURE_SIZE 3
+
+#define HSTI_ERROR L"Error "
+#define HSTI_PLATFORM_SECURITY_SPECIFICATION L" Platform Security Specification"
+
+#define HSTI_FIRMWARE_TRUSTED_CONTINUATION_CRYPTO_STRENGTH L" - Firmware Trust Continuation Crypto Strength - "
+#define HSTI_NO_TEST_KEY_VERIFICATION L" - No Test Key Verification - "
+#define HSTI_FIRMWARE_VERSION_ROLLBACK_PROTECTION L" - Firmware Version Rollback Protection - "
+#define HSTI_SECUREBOOT_BYPASS_CHECKING L" - SecureBoot Bypass Checking - "
+#define HSTI_EXTERNAL_DEVICE_DMA_PROTECTION L" - External Device DMA Protection - "
+#define HSTI_MOR_SUPPORT L" - MOR Support - "
+
+#define HSTI_BYTE2_FIRMWARE_TRUSTED_CONTINUATION_CRYPTO_STRENGTH BIT0
+#define HSTI_BYTE2_FIRMWARE_TRUSTED_CONTINUATION_CRYPTO_STRENGTH_ERROR_CODE_1 L"0x00100001"
+#define HSTI_BYTE2_FIRMWARE_TRUSTED_CONTINUATION_CRYPTO_STRENGTH_ERROR_STRING_1 L"SHA1\r\n"
+
+#define HSTI_BYTE2_NO_TEST_KEY_VERIFICATION BIT1
+#define HSTI_BYTE2_NO_TEST_KEY_VERIFICATION_ERROR_CODE_1 L"0x00110001"
+#define HSTI_BYTE2_NO_TEST_KEY_VERIFICATION_ERROR_STRING_1 L"fail\r\n"
+
+#define HSTI_BYTE2_FIRMWARE_VERSION_ROLLBACK_PROTECTION BIT2
+#define HSTI_BYTE2_FIRMWARE_VERSION_ROLLBACK_PROTECTION_ERROR_CODE_1 L"0x00120001"
+#define HSTI_BYTE2_FIRMWARE_VERSION_ROLLBACK_PROTECTION_ERROR_STRING_1 L"fail\r\n"
+
+#define HSTI_BYTE2_SECUREBOOT_BYPASS_CHECKING BIT3
+#define HSTI_BYTE2_SECUREBOOT_BYPASS_CHECKING_ERROR_CODE_1 L"0x00130001"
+#define HSTI_BYTE2_SECUREBOOT_BYPASS_CHECKING_ERROR_STRING_1 L"fail\r\n"
+
+
+#define HSTI_BYTE2_EXTERNAL_DEVICE_DMA_PROTECTION BIT4
+#define HSTI_BYTE2_EXTERNAL_DEVICE_DMA_PROTECTION_ERROR_CODE_1 L"0x00140001"
+#define HSTI_BYTE2_EXTERNAL_DEVICE_DMA_PROTECTION_ERROR_STRING_1 L"unsupported\r\n"
+
+
+#define HSTI_BYTE2_MOR_SUPPORT BIT5
+#define HSTI_BYTE2_MOR_SUPPORT_ERROR_CODE_1 L"0x00150001"
+#define HSTI_BYTE2_MOR_SUPPORT_ERROR_STRING_1 L"unsupported\r\n"
+
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h
new file mode 100644
index 0000000000..dc76e33557
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/AslUpdateLib.h
@@ -0,0 +1,146 @@
+/** @file
+ ASL dynamic update library definitions.
+ This library provides dymanic update to various ASL structures.
+ There may be different libraries for different environments (PEI, BS, RT, SMM).
+ Make sure you meet the requirements for the library (protocol dependencies, use
+ restrictions, etc).
+
+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 that 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.
+
+**/
+
+#ifndef _ASL_UPDATE_LIB_H_
+#define _ASL_UPDATE_LIB_H_
+
+//
+// Include files
+//
+#include <IndustryStandard/Acpi.h>
+#include <Protocol/AcpiTable.h>
+#include <Protocol/AcpiSystemDescriptionTable.h>
+
+//
+// AML parsing definitions
+//
+#define AML_RESRC_TEMP_END_TAG 0x0079
+
+//
+// ASL PSS package structure layout
+//
+#pragma pack (1)
+typedef struct {
+ UINT8 NameOp; // 12h ;First opcode is a NameOp.
+ UINT8 PackageLead; // 20h ;First opcode is a NameOp.
+ UINT8 NumEntries; // 06h ;First opcode is a NameOp.
+ UINT8 DwordPrefix1; // 0Ch
+ UINT32 CoreFrequency; // 00h
+ UINT8 DwordPrefix2; // 0Ch
+ UINT32 Power; // 00h
+ UINT8 DwordPrefix3; // 0Ch
+ UINT32 TransLatency; // 00h
+ UINT8 DwordPrefix4; // 0Ch
+ UINT32 BmLatency; // 00h
+ UINT8 DwordPrefix5; // 0Ch
+ UINT32 Control; // 00h
+ UINT8 DwordPrefix6; // 0Ch
+ UINT32 Status; // 00h
+} PSS_PACKAGE_LAYOUT;
+#pragma pack()
+
+/**
+ Initialize the ASL update library state.
+ This must be called prior to invoking other library functions.
+
+
+ @retval EFI_SUCCESS The function completed successfully.
+**/
+EFI_STATUS
+InitializeAslUpdateLib (
+ VOID
+ );
+
+/**
+ This procedure will update immediate value assigned to a Name
+
+ @param[in] AslSignature The signature of Operation Region that we want to update.
+ @param[in] Buffer source of data to be written over original aml
+ @param[in] Length length of data to be overwritten
+
+ @retval EFI_SUCCESS The function completed successfully.
+**/
+EFI_STATUS
+UpdateNameAslCode(
+ IN UINT32 AslSignature,
+ IN VOID *Buffer,
+ IN UINTN Length
+ );
+
+/**
+ This function uses the ACPI support protocol to locate an ACPI table using the .
+ It is really only useful for finding tables that only have a single instance,
+ e.g. FADT, FACS, MADT, etc. It is not good for locating SSDT, etc.
+ Matches are determined by finding the table with ACPI table that has
+ a matching signature and version.
+
+ @param[in] Signature Pointer to an ASCII string containing the Signature to match
+ @param[in, out] Table Updated with a pointer to the table
+ @param[in, out] Handle AcpiSupport protocol table handle for the table found
+ @param[in, out] Version On input, the version of the table desired,
+ on output, the versions the table belongs to
+ @see AcpiSupport protocol for details
+
+ @retval EFI_SUCCESS The function completed successfully.
+**/
+EFI_STATUS
+LocateAcpiTableBySignature (
+ IN UINT32 Signature,
+ IN OUT EFI_ACPI_DESCRIPTION_HEADER **Table,
+ IN OUT UINTN *Handle
+ );
+
+/**
+ This function uses the ACPI support protocol to locate an ACPI SSDT table.
+ The table is located by searching for a matching OEM Table ID field.
+ Partial match searches are supported via the TableIdSize parameter.
+
+ @param[in] TableId Pointer to an ASCII string containing the OEM Table ID from the ACPI table header
+ @param[in] TableIdSize Length of the TableId to match. Table ID are 8 bytes long, this function
+ will consider it a match if the first TableIdSize bytes match
+ @param[in, out] Table Updated with a pointer to the table
+ @param[in, out] Handle AcpiSupport protocol table handle for the table found
+ @param[in, out] Version See AcpiSupport protocol, GetAcpiTable function for use
+
+ @retval EFI_SUCCESS The function completed successfully.
+**/
+EFI_STATUS
+LocateAcpiTableByOemTableId (
+ IN UINT8 *TableId,
+ IN UINT8 TableIdSize,
+ IN OUT EFI_ACPI_DESCRIPTION_HEADER **Table,
+ IN OUT UINTN *Handle
+ );
+
+/**
+ This function calculates and updates an UINT8 checksum.
+
+ @param[in] Buffer Pointer to buffer to checksum
+ @param[in] Size Number of bytes to checksum
+ @param[in] ChecksumOffset Offset to place the checksum result in
+
+ @retval EFI_SUCCESS The function completed successfully.
+**/
+EFI_STATUS
+AcpiChecksum (
+ IN VOID *Buffer,
+ IN UINTN Size,
+ IN UINTN ChecksumOffset
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiEnableLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiEnableLib.h
new file mode 100644
index 0000000000..48de84cfed
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiEnableLib.h
@@ -0,0 +1,33 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _BOARD_ACPI_ENABLE_LIB_H_
+#define _BOARD_ACPI_ENABLE_LIB_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/Acpi.h>
+#include <Protocol/AcpiSystemDescriptionTable.h>
+
+EFI_STATUS
+EFIAPI
+BoardEnableAcpi (
+ IN BOOLEAN EnableSci
+ );
+
+EFI_STATUS
+EFIAPI
+BoardDisableAcpi (
+ IN BOOLEAN DisableSci
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiTableLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiTableLib.h
new file mode 100644
index 0000000000..d001393654
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/BoardAcpiTableLib.h
@@ -0,0 +1,28 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _BOARD_ACPI_TABLE_LIB_H_
+#define _BOARD_ACPI_TABLE_LIB_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/Acpi.h>
+#include <Protocol/AcpiSystemDescriptionTable.h>
+
+EFI_STATUS
+EFIAPI
+BoardUpdateAcpiTable (
+ IN OUT EFI_ACPI_COMMON_HEADER *Table,
+ IN OUT EFI_ACPI_TABLE_VERSION *Version
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/BoardInitLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/BoardInitLib.h
new file mode 100644
index 0000000000..db366e387a
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/BoardInitLib.h
@@ -0,0 +1,92 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _BOARD_INIT_LIB_H_
+#define _BOARD_INIT_LIB_H_
+
+#include <PiPei.h>
+#include <Uefi.h>
+
+EFI_STATUS
+EFIAPI
+BoardDetect (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardDebugInit (
+ VOID
+ );
+
+EFI_BOOT_MODE
+EFIAPI
+BoardBootModeDetect (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitBeforeMemoryInit (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitAfterMemoryInit (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitBeforeTempRamExit (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitAfterTempRamExit (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitBeforeSiliconInit (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitAfterSiliconInit (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitAfterPciEnumeration (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitReadyToBoot (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardInitEndOfFirmware (
+ VOID
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h
new file mode 100644
index 0000000000..40330e0113
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyInitLib.h
@@ -0,0 +1,30 @@
+/** @file
+ Function prototype of FspPolicyInitLib.
+
+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 that 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.
+
+**/
+
+#ifndef _FSP_POLICY_INIT_LIB_H_
+#define _FSP_POLICY_INIT_LIB_H_
+
+VOID
+EFIAPI
+FspmPolicyInit (
+ IN OUT VOID *FspmUpd
+ );
+
+VOID
+EFIAPI
+FspsPolicyInit (
+ IN OUT VOID *FspsUpd
+ );
+
+#endif // _FSP_POLICY_INIT_LIB_H_
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h
new file mode 100644
index 0000000000..977c4b2052
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/FspPolicyUpdateLib.h
@@ -0,0 +1,30 @@
+/** @file
+ Function prototype of FspPolicyUpdateLib.
+
+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 that 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.
+
+**/
+
+#ifndef _FSP_POLICY_UPDATE_LIB_H_
+#define _FSP_POLICY_UPDATE_LIB_H_
+
+VOID
+EFIAPI
+FspmPolicyUpdate (
+ IN OUT VOID *FspmUpd
+ );
+
+VOID
+EFIAPI
+FspsPolicyUpdate (
+ IN OUT VOID *FspsUpd
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/HobVariableLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/HobVariableLib.h
new file mode 100644
index 0000000000..8b5e1dc858
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/HobVariableLib.h
@@ -0,0 +1,111 @@
+/**@file
+
+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 that 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.
+
+**/
+
+#ifndef _HOB_VARIABLE_LIB_H_
+#define _HOB_VARIABLE_LIB_H_
+
+/**
+ This function finds the default data and create GUID hob for it.
+
+ @retval EFI_SUCCESS The matched default data is found.
+ @retval EFI_NOT_FOUND The matched default data is not found.
+ @retval EFI_OUT_OF_RESOURCES No enough resource to create HOB.
+
+**/
+EFI_STATUS
+EFIAPI
+CreateVariableHob (
+ VOID
+ );
+
+/**
+ This function finds the matched default data and create GUID hob for it.
+
+ @param StoreId Specifies the type of defaults to retrieve.
+ @param SkuId Specifies the platform board of defaults to retrieve.
+
+ @retval EFI_SUCCESS The matched default data is found.
+ @retval EFI_NOT_FOUND The matched default data is not found.
+ @retval EFI_OUT_OF_RESOURCES No enough resource to create HOB.
+
+**/
+EFI_STATUS
+EFIAPI
+CreateDefaultVariableHob (
+ IN UINT16 StoreId,
+ IN UINT16 SkuId
+ );
+
+/**
+ Get variable from default variable HOB.
+
+ @param[in] VariableName A Null-terminated string that is the name of the vendor's
+ variable.
+ @param[in] VendorGuid A unique identifier for the vendor.
+ @param[out] Attributes If not NULL, a pointer to the memory location to return the
+ attributes bitmask for the variable.
+ @param[in, out] DataSize On input, the size in bytes of the return Data buffer.
+ On output the size of data returned in Data.
+ @param[out] Data The buffer to return the contents of the variable.
+
+ @retval EFI_SUCCESS The function completed successfully.
+ @retval EFI_NOT_FOUND The variable was not found.
+ @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
+ @retval EFI_INVALID_PARAMETER VariableName is NULL.
+ @retval EFI_INVALID_PARAMETER VendorGuid is NULL.
+ @retval EFI_INVALID_PARAMETER DataSize is NULL.
+ @retval EFI_INVALID_PARAMETER The DataSize is not too small and Data is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+GetVariableFromHob (
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ OUT UINT32 *Attributes, OPTIONAL
+ IN OUT UINTN *DataSize,
+ OUT VOID *Data
+ );
+
+/**
+ Set variable to default variable HOB.
+
+ @param[in] VariableName A Null-terminated string that is the name of the vendor's
+ variable.
+ @param[in] VendorGuid A unique identifier for the vendor.
+ @param[in] Attributes If not NULL, a pointer to the memory location to set the
+ attributes bitmask for the variable.
+ @param[in] DataSize On input, the size in bytes of the return Data buffer.
+ On output the size of data returned in Data.
+ @param[in] Data The buffer to return the contents of the variable.
+
+ @retval EFI_SUCCESS The function completed successfully.
+ @retval EFI_NOT_FOUND The variable was not found.
+ @retval EFI_INVALID_PARAMETER VariableName is NULL.
+ @retval EFI_INVALID_PARAMETER VendorGuid is NULL.
+ @retval EFI_INVALID_PARAMETER Attributes is not NULL, but attributes value is 0.
+ @retval EFI_INVALID_PARAMETER DataSize is not equal to the variable data size.
+ @retval EFI_INVALID_PARAMETER The DataSize is equal to the variable data size, but Data is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+SetVariableToHob (
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ IN UINT32 *Attributes, OPTIONAL
+ IN UINTN DataSize,
+ IN VOID *Data
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardAcpiSupportLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardAcpiSupportLib.h
new file mode 100644
index 0000000000..15087428e8
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardAcpiSupportLib.h
@@ -0,0 +1,60 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _MULTI_BOARD_ACPI_SUPPORT_LIB_H_
+#define _MULTI_BOARD_ACPI_SUPPORT_LIB_H_
+
+#include <Library/BoardAcpiTableLib.h>
+#include <Library/BoardAcpiEnableLib.h>
+
+typedef
+EFI_STATUS
+(EFIAPI *BOARD_ENABLE_ACPI) (
+ IN BOOLEAN EnableSci
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *BOARD_DISABLE_ACPI) (
+ IN BOOLEAN DisableSci
+ );
+
+typedef struct {
+ BOARD_ENABLE_ACPI BoardEnableAcpi;
+ BOARD_DISABLE_ACPI BoardDisableAcpi;
+} BOARD_ACPI_ENABLE_FUNC;
+
+typedef
+EFI_STATUS
+(EFIAPI *BOARD_UPDATE_ACPI_TABLE) (
+ IN OUT EFI_ACPI_COMMON_HEADER *Table,
+ IN OUT EFI_ACPI_TABLE_VERSION *Version
+ );
+
+typedef struct {
+ BOARD_UPDATE_ACPI_TABLE BoardUpdateAcpiTable;
+} BOARD_ACPI_TABLE_FUNC;
+
+EFI_STATUS
+EFIAPI
+RegisterBoardAcpiEnableFunc (
+ IN BOARD_ACPI_ENABLE_FUNC *BoardAcpiEnableFunc
+ );
+
+EFI_STATUS
+EFIAPI
+RegisterBoardAcpiTableFunc (
+ IN BOARD_ACPI_TABLE_FUNC *BoardAcpiTableFunc
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardInitSupportLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardInitSupportLib.h
new file mode 100644
index 0000000000..c4c36216fe
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/MultiBoardInitSupportLib.h
@@ -0,0 +1,85 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _MULTI_BOARD_INIT_SUPPORT_LIB_H_
+#define _MULTI_BOARD_INIT_SUPPORT_LIB_H_
+
+#include <Library/BoardInitLib.h>
+
+typedef
+EFI_STATUS
+(EFIAPI *BOARD_DETECT) (
+ VOID
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *BOARD_INIT) (
+ VOID
+ );
+
+typedef
+EFI_BOOT_MODE
+(EFIAPI *BOARD_BOOT_MODE_DETECT) (
+ VOID
+ );
+
+typedef struct {
+ BOARD_DETECT BoardDetect;
+} BOARD_DETECT_FUNC;
+
+typedef struct {
+ BOARD_INIT BoardDebugInit;
+ BOARD_BOOT_MODE_DETECT BoardBootModeDetect;
+ BOARD_INIT BoardInitBeforeMemoryInit;
+ BOARD_INIT BoardInitAfterMemoryInit;
+ BOARD_INIT BoardInitBeforeTempRamExit;
+ BOARD_INIT BoardInitAfterTempRamExit;
+} BOARD_PRE_MEM_INIT_FUNC;
+
+typedef struct {
+ BOARD_INIT BoardInitBeforeSiliconInit;
+ BOARD_INIT BoardInitAfterSiliconInit;
+} BOARD_POST_MEM_INIT_FUNC;
+
+typedef struct {
+ BOARD_INIT BoardInitAfterPciEnumeration;
+ BOARD_INIT BoardInitReadyToBoot;
+ BOARD_INIT BoardInitEndOfFirmware;
+} BOARD_NOTIFICATION_INIT_FUNC;
+
+EFI_STATUS
+EFIAPI
+RegisterBoardDetect (
+ IN BOARD_DETECT_FUNC *BoardDetect
+ );
+
+EFI_STATUS
+EFIAPI
+RegisterBoardPreMemInit (
+ IN BOARD_PRE_MEM_INIT_FUNC *BoardPreMemInit
+ );
+
+EFI_STATUS
+EFIAPI
+RegisterBoardPostMemInit (
+ IN BOARD_POST_MEM_INIT_FUNC *BoardPostMemInit
+ );
+
+EFI_STATUS
+EFIAPI
+RegisterBoardNotificationInit (
+ IN BOARD_NOTIFICATION_INIT_FUNC *BoardNotificationInit
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/PeiLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/PeiLib.h
new file mode 100644
index 0000000000..8889f97d59
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/PeiLib.h
@@ -0,0 +1,85 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _PEI_LIB_H_
+#define _PEI_LIB_H_
+
+#include <PiPei.h>
+
+/**
+ Returns the status whether get the variable success. The function retrieves
+ variable through the ReadOnlyVariable2 PPI GetVariable().
+
+ If the *Size is 0, the returned buffer is allocated using AllocatePool().
+ The caller is responsible for freeing this buffer with FreePool().
+
+ If the *Size is non-0, this function just uses caller allocated *Value.
+
+ @param[in] Name The pointer to a Null-terminated Unicode string.
+ @param[in] Guid The pointer to an EFI_GUID structure
+ @param[out] Value The buffer point saved the variable info.
+ @param[out] Size The buffer size of the variable.
+
+ @return EFI_OUT_OF_RESOURCES Allocate buffer failed.
+ @return EFI_SUCCESS Find the specified variable.
+ @return Others Errors Return errors from call to gRT->GetVariable.
+
+**/
+EFI_STATUS
+EFIAPI
+PeiGetVariable (
+ IN CONST CHAR16 *Name,
+ IN CONST EFI_GUID *Guid,
+ OUT VOID **Value,
+ OUT UINTN *Size
+ );
+
+/**
+ Finds the file in any FV and gets file Address and Size
+
+ @param[in] NameGuid File GUID
+ @param[out] Address Pointer to the File Address
+ @param[out] Size Pointer to File Size
+
+ @retval EFI_SUCCESS Successfull in reading the file from any FV
+**/
+EFI_STATUS
+EFIAPI
+PeiGetFfsFromAnyFv (
+ IN CONST EFI_GUID *NameGuid,
+ OUT VOID **Address,
+ OUT UINTN *Size
+ );
+
+/**
+ Finds the section in any FV and gets section Address and Size
+
+ @param[in] NameGuid File GUID
+ @param[in] SectionType The SectionType of Section to be found
+ @param[in] SectionInstance The Instance of Section to be found
+ @param[out] Address Pointer to the section Address
+ @param[out] Size Pointer to section Size
+
+ @retval EFI_SUCCESS Successfull in reading the section from any FV
+**/
+EFI_STATUS
+EFIAPI
+PeiGetSectionFromAnyFv (
+ IN CONST EFI_GUID *NameGuid,
+ IN EFI_SECTION_TYPE SectionType,
+ IN UINTN SectionInstance,
+ OUT VOID **Address,
+ OUT UINTN *Size
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/SecBoardInitLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/SecBoardInitLib.h
new file mode 100644
index 0000000000..9142b14335
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/SecBoardInitLib.h
@@ -0,0 +1,38 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _SEC_BOARD_INIT_LIB_H_
+#define _SEC_BOARD_INIT_LIB_H_
+
+#include <PiPei.h>
+#include <Uefi.h>
+
+/**
+ This is stackless function in 32bit.
+
+ return address - ESP.
+ All other registers can be used.
+**/
+VOID
+EFIAPI
+BoardBeforeTempRamInit (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+BoardAfterTempRamInit (
+ VOID
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/SpiFlashCommonLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/SpiFlashCommonLib.h
new file mode 100644
index 0000000000..12dfaeb440
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/SpiFlashCommonLib.h
@@ -0,0 +1,104 @@
+/** @file
+ The header file includes the common header files, defines
+ internal structure and functions used by SpiFlashCommonLib.
+
+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 that 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.
+
+**/
+
+#ifndef __SPI_FLASH_COMMON_LIB_H__
+#define __SPI_FLASH_COMMON_LIB_H__
+
+#include <Uefi.h>
+#include <Library/BaseLib.h>
+#include <Library/PcdLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+#define SECTOR_SIZE_4KB 0x1000 // Common 4kBytes sector size
+/**
+ Enable block protection on the Serial Flash device.
+
+ @retval EFI_SUCCESS Opertion is successful.
+ @retval EFI_DEVICE_ERROR If there is any device errors.
+
+**/
+EFI_STATUS
+EFIAPI
+SpiFlashLock (
+ VOID
+ );
+
+/**
+ Read NumBytes bytes of data from the address specified by
+ PAddress into Buffer.
+
+ @param[in] Address The starting physical address of the read.
+ @param[in,out] NumBytes On input, the number of bytes to read. On output, the number
+ of bytes actually read.
+ @param[out] Buffer The destination data buffer for the read.
+
+ @retval EFI_SUCCESS Opertion is successful.
+ @retval EFI_DEVICE_ERROR If there is any device errors.
+
+**/
+EFI_STATUS
+EFIAPI
+SpiFlashRead (
+ IN UINTN Address,
+ IN OUT UINT32 *NumBytes,
+ OUT UINT8 *Buffer
+ );
+
+/**
+ Write NumBytes bytes of data from Buffer to the address specified by
+ PAddresss.
+
+ @param[in] Address The starting physical address of the write.
+ @param[in,out] NumBytes On input, the number of bytes to write. On output,
+ the actual number of bytes written.
+ @param[in] Buffer The source data buffer for the write.
+
+ @retval EFI_SUCCESS Opertion is successful.
+ @retval EFI_DEVICE_ERROR If there is any device errors.
+
+**/
+EFI_STATUS
+EFIAPI
+SpiFlashWrite (
+ IN UINTN Address,
+ IN OUT UINT32 *NumBytes,
+ IN UINT8 *Buffer
+ );
+
+/**
+ Erase the block starting at Address.
+
+ @param[in] Address The starting physical address of the block to be erased.
+ This library assume that caller garantee that the PAddress
+ is at the starting address of this block.
+ @param[in] NumBytes On input, the number of bytes of the logical block to be erased.
+ On output, the actual number of bytes erased.
+
+ @retval EFI_SUCCESS. Opertion is successful.
+ @retval EFI_DEVICE_ERROR If there is any device errors.
+
+**/
+EFI_STATUS
+EFIAPI
+SpiFlashBlockErase (
+ IN UINTN Address,
+ IN UINTN *NumBytes
+ );
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/TestPointCheckLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/TestPointCheckLib.h
new file mode 100644
index 0000000000..7caea0a53e
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/TestPointCheckLib.h
@@ -0,0 +1,219 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _TEST_POINT_CHECK_LIB_H_
+#define _TEST_POINT_CHECK_LIB_H_
+
+#include <PiPei.h>
+#include <Uefi.h>
+
+//
+// Below is Test Point Hook Point.
+//
+
+EFI_STATUS
+EFIAPI
+TestPointTempMemoryInitDone (
+ IN VOID *TempRamStart,
+ IN VOID *TempRamEnd
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointDebugInitDone (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointMemoryDiscovered (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointEndOfPei (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointPciEnumerationDone (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointEndOfDxe (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointDxeSmmReadyToLock (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointReadyToBoot (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointExitBootServices (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointSmmEndOfDxe (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointSmmReadyToLock (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointSmmReadyToBoot (
+ VOID
+ );
+
+EFI_STATUS
+EFIAPI
+TestPointSmmExitBootServices (
+ VOID
+ );
+
+//
+// Below is detail definition for MinPlatform implementation
+//
+
+#define TEST_POINT_IMPLEMENTATION_ID_PLATFORM L"Intel MinPlatform TestPoint"
+
+#define TEST_POINT_FEATURE_SIZE 4
+
+#define TEST_POINT_ERROR L"Error "
+#define TEST_POINT_PLATFORM_TEST_POINT L" Platform TestPoint"
+
+// Byte 0 - SEC
+#define TEST_POINT_TEMP_MEMORY_INIT_DONE L" - Temp Memory Init Done - "
+
+#define TEST_POINT_BYTE0_TEMP_INIT_DONE BIT0
+#define TEST_POINT_BYTE0_TEMP_MEMORY_INIT_DONE_ERROR_CODE_1 L"0x00000001"
+#define TEST_POINT_BYTE0_TEMP_MEMORY_INIT_DONE_ERROR_STRING_1 L"Invalid Temp Ram\r\n"
+
+// Byte 1 - PEI
+#define TEST_POINT_DEBUG_INIT_DONE L" - Debug Init Done - "
+#define TEST_POINT_MEMORY_DISCOVERED L" - Memory Discovered - "
+#define TEST_POINT_END_OF_PEI L" - End Of PEI - "
+
+#define TEST_POINT_BYTE1_DEBUG_INIT_DONE BIT0
+#define TEST_POINT_BYTE1_MEMORY_DISCOVERED BIT1
+#define TEST_POINT_BYTE1_MEMORY_DISCOVERED_ERROR_CODE_1 L"0x01010001"
+#define TEST_POINT_BYTE1_MEMORY_DISCOVERED_ERROR_STRING_1 L"Invalid Memory Resource\r\n"
+#define TEST_POINT_BYTE1_MEMORY_DISCOVERED_ERROR_CODE_2 L"0x01010002"
+#define TEST_POINT_BYTE1_MEMORY_DISCOVERED_ERROR_STRING_2 L"Invalid MTRR Setting\r\n"
+#define TEST_POINT_BYTE1_MEMORY_DISCOVERED_ERROR_CODE_3 L"0x01010002"
+#define TEST_POINT_BYTE1_MEMORY_DISCOVERED_ERROR_STRING_3 L"Invalid SMRAM Resource\r\n"
+#define TEST_POINT_BYTE1_END_OF_PEI BIT2
+#define TEST_POINT_BYTE1_END_OF_PEI_ERROR_CODE_1 L"0x01020001"
+#define TEST_POINT_BYTE1_END_OF_PEI_ERROR_STRING_1 L"Invalid System Resource\r\n"
+#define TEST_POINT_BYTE1_END_OF_PEI_ERROR_CODE_2 L"0x01020002"
+#define TEST_POINT_BYTE1_END_OF_PEI_ERROR_STRING_2 L"Invalid MTRR Setting\r\n"
+#define TEST_POINT_BYTE1_END_OF_PEI_ERROR_CODE_3 L"0x01010003"
+#define TEST_POINT_BYTE1_END_OF_PEI_ERROR_STRING_3 L"Invalid FV Information\r\n"
+
+// Byte 2 - DXE
+#define TEST_POINT_PCI_ENUMERATION_DONE L" - PCI Enumeration Done - "
+#define TEST_POINT_END_OF_DXE L" - End Of DXE - "
+#define TEST_POINT_DXE_SMM_READY_TO_LOCK L" - DXE SMM Ready To Lock - "
+#define TEST_POINT_READY_TO_BOOT L" - Ready To Boot - "
+#define TEST_POINT_EXIT_BOOT_SERVICES L" - Exit Boot Services - "
+
+#define TEST_POINT_BYTE2_PCI_ENUMERATION_DONE BIT0
+#define TEST_POINT_BYTE2_PCI_ENUMERATION_DONE_ERROR_CODE_1 L"0x02010001"
+#define TEST_POINT_BYTE2_PCI_ENUMERATION_DONE_ERROR_STRING_1 L"Invalid PCI Resource\r\n"
+#define TEST_POINT_BYTE2_END_OF_DXE BIT1
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_CODE_1 L"0x02020001"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_STRING_1 L"Invalid PCI OROM\r\n"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_CODE_2 L"0x02020002"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_STRING_2 L"Invalid Memory Map\r\n"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_CODE_3 L"0x02020003"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_STRING_3 L"Invalid GCD Map\r\n"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_CODE_4 L"0x02020004"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_STRING_4 L"Invalid Console Variable\r\n"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_CODE_5 L"0x02020005"
+#define TEST_POINT_BYTE2_END_OF_DXE_ERROR_STRING_5 L"Invalid Boot Variable\r\n"
+#define TEST_POINT_BYTE2_DXE_SMM_READY_TO_LOCK BIT2
+#define TEST_POINT_BYTE2_DXE_SMM_READY_TO_LOCK_ERROR_CODE_1 L"0x02040001"
+#define TEST_POINT_BYTE2_DXE_SMM_READY_TO_LOCK_ERROR_STRING_1 L"Invalid SMRAM Information\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT BIT3
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_1 L"0x02080001"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_1 L"Invalid Device\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_2 L"0x02080002"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_2 L"Invalid Memory Type Information\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_3 L"0x02080003"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_3 L"Invalid UEFI Variable\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_4 L"0x02080004"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_4 L"Invalid Memory Attribute Table\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_5 L"0x02080005"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_5 L"Invalid ACPI Table\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_6 L"0x02080006"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_6 L"Invalid WSMT Table\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_7 L"0x02080007"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_7 L"Invalid DMAR Table\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_8 L"0x02080008"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_8 L"Invalid HSTI\r\n"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_CODE_9 L"0x02080009"
+#define TEST_POINT_BYTE2_READY_TO_BOOT_ERROR_STRING_9 L"Invalid ESRT\r\n"
+#define TEST_POINT_BYTE2_EXIT_BOOT_SERVICES BIT4
+
+// Byte 3 - SMM
+#define TEST_POINT_SMM_END_OF_DXE L" - SMM End Of DXE - "
+#define TEST_POINT_SMM_READY_TO_LOCK L" - SMM Ready To Lock - "
+#define TEST_POINT_SMM_READY_TO_BOOT L" - SMM Ready To Boot - "
+#define TEST_POINT_SMM_EXIT_BOOT_SERVICES L" - SMM Exit Boot Services - "
+
+#define TEST_POINT_BYTE3_SMM_END_OF_DXE BIT0
+#define TEST_POINT_BYTE3_SMM_END_OF_DXE_ERROR_CODE_1 L"0x03010001"
+#define TEST_POINT_BYTE3_SMM_END_OF_DXE_ERROR_STRING_1 L"Invalid SMM Image\r\n"
+#define TEST_POINT_BYTE3_SMM_READY_TO_LOCK BIT1
+#define TEST_POINT_BYTE2_SMM_READY_TO_LOCK_ERROR_CODE_1 L"0x03020001"
+#define TEST_POINT_BYTE2_SMM_READY_TO_LOCK_ERROR_STRING_1 L"Invalid SMM Memory Attribute Table\r\n"
+#define TEST_POINT_BYTE2_SMM_READY_TO_LOCK_ERROR_CODE_2 L"0x03020002"
+#define TEST_POINT_BYTE2_SMM_READY_TO_LOCK_ERROR_STRING_2 L"Invalid SMRR\r\n"
+#define TEST_POINT_BYTE3_SMM_READY_TO_BOOT BIT2
+#define TEST_POINT_BYTE3_SMM_EXIT_BOOT_SERVICES BIT3
+
+#pragma pack (1)
+
+typedef struct {
+ UINT32 Version;
+ UINT32 Role;
+ CHAR16 ImplementationID[256];
+ UINT32 FeaturesSize;
+ UINT8 FeaturesRequired[TEST_POINT_FEATURE_SIZE];
+ UINT8 FeaturesImplemented[TEST_POINT_FEATURE_SIZE];
+ UINT8 FeaturesVerified[TEST_POINT_FEATURE_SIZE];
+ CHAR16 End;
+} ADAPTER_INFO_PLATFORM_TEST_POINT_STRUCT;
+
+#pragma pack ()
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/TestPointLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/TestPointLib.h
new file mode 100644
index 0000000000..49d5f84cb0
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/TestPointLib.h
@@ -0,0 +1,225 @@
+/** @file
+
+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 that 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.
+
+**/
+
+#ifndef _TEST_POINT_LIB_H_
+#define _TEST_POINT_LIB_H_
+
+#include <PiPei.h>
+#include <Uefi.h>
+
+//
+// Below is Test Point report definition.
+//
+
+//
+// We reuse HSTI stype definition.
+// ADAPTER_INFO_PLATFORM_TEST_POINT is similar to ADAPTER_INFO_PLATFORM_SECURITY.
+//
+
+#define PLATFORM_TEST_POINT_VERSION 0x00000001
+
+#define PLATFORM_TEST_POINT_ROLE_PLATFORM_REFERENCE 0x00000001
+#define PLATFORM_TEST_POINT_ROLE_PLATFORM_IBV 0x00000002
+#define PLATFORM_TEST_POINT_ROLE_IMPLEMENTOR_OEM 0x00000003
+#define PLATFORM_TEST_POINT_ROLE_IMPLEMENTOR_ODM 0x00000004
+
+typedef struct {
+ UINT32 Version;
+ UINT32 Role;
+ CHAR16 ImplementationID[256];
+ UINT32 FeaturesSize;
+//UINT8 FeaturesRequired[];
+//UINT8 FeaturesImplemented[];
+//UINT8 FeaturesVerified[];
+//CHAR16 ErrorString[];
+} ADAPTER_INFO_PLATFORM_TEST_POINT;
+
+//
+// Below is test point report library
+//
+
+/**
+ Publish TestPoint table in AIP protocol.
+
+ One system should have only one PLATFORM_TEST_POINT_ROLE_PLATFORM_REFERENCE.
+
+ If the Role is NOT PLATFORM_TEST_POINT_ROLE_PLATFORM_REFERENCE,
+ FeaturesRequired field will be ignored.
+
+ @param TestPoint TestPoint data
+ @param TestPointSize TestPoint size
+
+ @retval EFI_SUCCESS The TestPoint data is published in AIP protocol.
+ @retval EFI_ALREADY_STARTED There is already TestPoint table with Role and ImplementationID published in system.
+ @retval EFI_VOLUME_CORRUPTED The input TestPoint data is invalid.
+ @retval EFI_OUT_OF_RESOURCES There is not enough system resource to publish TestPoint data in AIP protocol.
+**/
+EFI_STATUS
+EFIAPI
+TestPointLibSetTable (
+ IN VOID *TestPoint,
+ IN UINTN TestPointSize
+ );
+
+/**
+ Search TestPoint table in AIP protocol, and return the data.
+ This API will return the TestPoint table with indicated Role and ImplementationID,
+ NULL ImplementationID means to find the first TestPoint table with indicated Role.
+
+ @param Role Role of TestPoint data.
+ @param ImplementationID ImplementationID of TestPoint data.
+ NULL means find the first one match Role.
+ @param TestPoint TestPoint data. This buffer is allocated by callee, and it
+ is the responsibility of the caller to free it after
+ using it.
+ @param TestPointSize TestPoint size
+
+ @retval EFI_SUCCESS The TestPoint data in AIP protocol is returned.
+ @retval EFI_NOT_FOUND There is not TestPoint table with the Role and ImplementationID published in system.
+**/
+EFI_STATUS
+EFIAPI
+TestPointLibGetTable (
+ IN UINT32 Role,
+ IN CHAR16 *ImplementationID OPTIONAL,
+ OUT VOID **TestPoint,
+ OUT UINTN *TestPointSize
+ );
+
+/**
+ Set FeaturesVerified in published TestPoint table.
+ This API will update the TestPoint table with indicated Role and ImplementationID,
+ NULL ImplementationID means to find the first TestPoint table with indicated Role.
+
+ @param Role Role of TestPoint data.
+ @param ImplementationID ImplementationID of TestPoint data.
+ NULL means find the first one match Role.
+ @param ByteIndex Byte index of FeaturesVerified of TestPoint data.
+ @param BitMask Bit mask of FeaturesVerified of TestPoint data.
+
+ @retval EFI_SUCCESS The FeaturesVerified of TestPoint data updated in AIP protocol.
+ @retval EFI_NOT_STARTED There is not TestPoint table with the Role and ImplementationID published in system.
+ @retval EFI_UNSUPPORTED The ByteIndex is invalid.
+**/
+EFI_STATUS
+EFIAPI
+TestPointLibSetFeaturesVerified (
+ IN UINT32 Role,
+ IN CHAR16 *ImplementationID, OPTIONAL
+ IN UINT32 ByteIndex,
+ IN UINT8 BitMask
+ );
+
+/**
+ Clear FeaturesVerified in published TestPoint table.
+ This API will update the TestPoint table with indicated Role and ImplementationID,
+ NULL ImplementationID means to find the first TestPoint table with indicated Role.
+
+ @param Role Role of TestPoint data.
+ @param ImplementationID ImplementationID of TestPoint data.
+ NULL means find the first one match Role.
+ @param ByteIndex Byte index of FeaturesVerified of TestPoint data.
+ @param BitMask Bit mask of FeaturesVerified of TestPoint data.
+
+ @retval EFI_SUCCESS The FeaturesVerified of TestPoint data updated in AIP protocol.
+ @retval EFI_NOT_STARTED There is not TestPoint table with the Role and ImplementationID published in system.
+ @retval EFI_UNSUPPORTED The ByteIndex is invalid.
+**/
+EFI_STATUS
+EFIAPI
+TestPointLibClearFeaturesVerified (
+ IN UINT32 Role,
+ IN CHAR16 *ImplementationID, OPTIONAL
+ IN UINT32 ByteIndex,
+ IN UINT8 BitMask
+ );
+
+/**
+ Append ErrorString in published TestPoint table.
+ This API will update the TestPoint table with indicated Role and ImplementationID,
+ NULL ImplementationID means to find the first TestPoint table with indicated Role.
+
+ @param Role Role of TestPoint data.
+ @param ImplementationID ImplementationID of TestPoint data.
+ NULL means find the first one match Role.
+ @param ErrorString ErrorString of TestPoint data.
+
+ @retval EFI_SUCCESS The ErrorString of TestPoint data is updated in AIP protocol.
+ @retval EFI_NOT_STARTED There is not TestPoint table with the Role and ImplementationID published in system.
+ @retval EFI_OUT_OF_RESOURCES There is not enough system resource to update ErrorString.
+**/
+EFI_STATUS
+EFIAPI
+TestPointLibAppendErrorString (
+ IN UINT32 Role,
+ IN CHAR16 *ImplementationID, OPTIONAL
+ IN CHAR16 *ErrorString
+ );
+
+/**
+ Set a new ErrorString in published TestPoint table.
+ This API will update the TestPoint table with indicated Role and ImplementationID,
+ NULL ImplementationID means to find the first TestPoint table with indicated Role.
+
+ @param Role Role of TestPoint data.
+ @param ImplementationID ImplementationID of TestPoint data.
+ NULL means find the first one match Role.
+ @param ErrorString ErrorString of TestPoint data.
+
+ @retval EFI_SUCCESS The ErrorString of TestPoint data is updated in AIP protocol.
+ @retval EFI_NOT_STARTED There is not TestPoint table with the Role and ImplementationID published in system.
+ @retval EFI_OUT_OF_RESOURCES There is not enough system resource to update ErrorString.
+**/
+EFI_STATUS
+EFIAPI
+TestPointLibSetErrorString (
+ IN UINT32 Role,
+ IN CHAR16 *ImplementationID, OPTIONAL
+ IN CHAR16 *ErrorString
+ );
+
+//
+// TEST POINT SMM Communication command
+//
+#define SMI_HANDLER_TEST_POINT_COMMAND_GET_INFO 0x1
+#define SMI_HANDLER_TEST_POINT_COMMAND_GET_DATA_BY_OFFSET 0x2
+
+typedef struct {
+ UINT32 Command;
+ UINT32 DataLength;
+ UINT64 ReturnStatus;
+} SMI_HANDLER_TEST_POINT_PARAMETER_HEADER;
+
+typedef struct {
+ SMI_HANDLER_TEST_POINT_PARAMETER_HEADER Header;
+ UINT64 DataSize;
+} SMI_HANDLER_TEST_POINT_PARAMETER_GET_INFO;
+
+typedef struct {
+ SMI_HANDLER_TEST_POINT_PARAMETER_HEADER Header;
+ //
+ // On input, data buffer size.
+ // On output, actual data buffer size copied.
+ //
+ UINT64 DataSize;
+ PHYSICAL_ADDRESS DataBuffer;
+ //
+ // On input, data buffer offset to copy.
+ // On output, next time data buffer offset to copy.
+ //
+ UINT64 DataOffset;
+} SMI_HANDLER_TEST_POINT_PARAMETER_GET_DATA_BY_OFFSET;
+
+extern EFI_GUID gAdapterInfoPlatformTestPointGuid;
+
+#endif