Bläddra i källkod

Vlv2TbltDevicePkg: Reduce Intel Framework dependencies

* Use BaseSerialPortLib16550 from MdeModulePkg.
* Remove unused DxeSmmDriverEntryPoint library instance mapping
  from the IntelFrameworkPkg.
* Remove all references to PS/2 Keyboard/Mouse that are not
  available on MinnowMax.
* Remove VgaClassDxe module from IntelFrameworkModulePkg that is
  not used.
* Remove DatahubStatusCodeHandlerDxe module from the
  IntelFrameworkModulePkg that is not used.
* Remove LegacyRegionDxe module from the IntelFrameworkModulePkg
  The Legacy Region Protocol produced by this module is not used.
* Remove VLV2 specific Metronome module that uses the CPU I/O
  Protocol defined in the IntelFrameworkPkg.  Instead, use the
  Metronome module from the MdeModulePkg that produces the
  Metronome Arch Protocol from a TimerLib instance.
* Remove use of MpCpu.inf from DSC/FDF file.
* Update DSC/FDF/source files to assume MINNOW2_FSP_BUILD is FALSE.
* Update DSC/FDF/source files to assume FTPM_ENABLE is FALSE.
* Remove TXT binary
* Use PcAtChisetPkg HpetDxe module instead of the VLV2 specific
  SmartTimer module that has an IntelFramework dependency.
* Remove SEC_ENABLE define and dependent modules.
* Remove IdeBusDxe module from DSC files.  IdeBusDxe is listed
  in DSC file, but not the FDF file, so it is not used.  This
  removes an IntelFrameworkModulkePkg dependency.
* Remove commented out SDIO and PiSmmCommunicationPei modules
* Remove unused Intel Framework S3Lib
* Remove use of PCD from the IntelFrameworkModulePkg
  PcdEbdaReservedMemorySize.
* Remove EdkCompatibilityPkg related [BuildOptions] sections
* Remove unused DEFINES from DSC/FDF
* Remove unused references to Ppi/Cache.h from Vlv2SocBinPkg.dec
* Remove unused references to gPeiCachePpiGuid from Vlv2SocBinPkg.dec
* Remove unused references to gEfiHtBistHobGuid from Vlv2SocBinPkg.dec
* Remove unused references to gEfiCpuTokenSpaceGuid PCDs from
  Vlv2SocBinPkg.dec
* Remove unused IntelPchLegacyInterrupt module
* Remove CpuIoDxe module from IntelFrameworkModulePkg
* Remove duplicate declaration of gEfiAcpiSupportProtocolGuid
  from Vlv2Tblt2DevicePkg
* Remove duplicate declaration of PcdShellFile from Vlv2Tblt2DevicePkg
* Remove unused gEfiAcpiTableProtocolGuid from AcpiPlatform.inf
* Add E7006X3 UNDI module to FDF files
* Remove gEfiSimpleNetworkProtocolGuid dependency.
  If gEfiSimpleNetworkProtocolGuid is not produced, still
  allow all SMBIOS records to be produced.  The MAC address
  from Simple Network Protocol is being used as a system
  serial number.  If Simple Network Protocol is not available,
  then default to a serial number of 0.
* Remove unused dependency on IntelFspWrapperPkg
* Remove Intel Framework S3 support.
* Remove use of the gEfiSmmPeiSmramMemoryReserveGuid GUIDed HOB.
* Remove production of unused gEfiFindFvPpiGuid.
* Update IA32 only builds to use a unique BUILD_OUTPUT directory

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-By: Zailiang Sun <zailiang.sun@intel.com>
Michael D Kinney 5 år sedan
förälder
incheckning
b1d2bf7eea
50 ändrade filer med 598 tillägg och 3264 borttagningar
  1. 17 16
      Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
  2. 2 6
      Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h
  3. 0 5
      Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
  4. 0 33
      Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat
  5. 2 9
      Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h
  6. 2 10
      Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf
  7. 3 4
      Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.h
  8. 2 7
      Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.inf
  9. 0 6
      Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
  10. 11 36
      Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.h
  11. 2 7
      Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf
  12. 2 6
      Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf
  13. 6 11
      Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.h
  14. 2 6
      Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf
  15. 2 6
      Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Configuration.h
  16. 2 522
      Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
  17. 3 512
      Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h
  18. 4 16
      Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf
  19. 3 9
      Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf
  20. 2 6
      Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryCallback.c
  21. 3 206
      Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c
  22. 3 18
      Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h
  23. 10 19
      Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf
  24. 3 8
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h
  25. 2 6
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/MemoryCallback.c
  26. 2 14
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c
  27. 3 8
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf
  28. 1 15
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec
  29. 82 172
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf
  30. 2 19
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
  31. 65 169
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
  32. 102 338
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
  33. 102 339
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
  34. 102 340
      Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
  35. 5 21
      Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h
  36. 2 12
      Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
  37. 2 41
      Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c
  38. 2 81
      Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c
  39. 2 15
      Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf
  40. 2 51
      Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/S3Save.c
  41. 2 5
      Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h
  42. 2 4
      Platform/Intel/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf
  43. 3 5
      Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
  44. 2 40
      Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Function.c
  45. 4 6
      Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
  46. 4 11
      Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf
  47. 3 8
      Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c
  48. 3 24
      Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.h
  49. 3 5
      Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf
  50. 8 31
      Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat

+ 17 - 16
Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c

@@ -638,7 +638,6 @@ OnReadyToBoot (
   EFI_STATUS                  Status;
   EFI_ACPI_TABLE_VERSION      TableVersion;
   EFI_ACPI_SUPPORT_PROTOCOL   *AcpiSupport;
-  EFI_ACPI_S3_SAVE_PROTOCOL   *AcpiS3Save;
   SYSTEM_CONFIGURATION        SetupVarBuffer;
   UINTN                       VariableSize;
   EFI_PLATFORM_CPU_INFO       *PlatformCpuInfoPtr = NULL;
@@ -722,15 +721,6 @@ OnReadyToBoot (
                           TableVersion
                           );
   ASSERT_EFI_ERROR (Status);
-
-  //
-  // S3 script save.
-  //
-  Status = gBS->LocateProtocol (&gEfiAcpiS3SaveProtocolGuid, NULL, (VOID **) &AcpiS3Save);
-  if (!EFI_ERROR (Status)) {
-    AcpiS3Save->S3Save (AcpiS3Save, NULL);
-  }
-
 }
 
 VOID
@@ -1261,12 +1251,23 @@ AcpiPlatformEntryPoint (
     }
   }
 
-  Status = EfiCreateEventReadyToBootEx (
-             TPL_NOTIFY,
-             OnReadyToBoot,
-             NULL,
-             &Event
-             );
+  //
+  // Publish ACPI 1.0 or 2.0 Tables.
+  //
+//  Status = AcpiSupport->PublishTables (
+//                          AcpiSupport,
+//                          TableVersion
+//                          );
+//  ASSERT_EFI_ERROR (Status);
+
+//  Status = EfiCreateEventReadyToBootEx (
+//             TPL_NOTIFY,
+//             OnReadyToBoot,
+//             NULL,
+//             &Event
+//             );
+  Event = NULL;
+  OnReadyToBoot (Event, NULL);
 
   //
   // Finished.

+ 2 - 6
Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h

@@ -1,11 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -26,7 +23,6 @@ Abstract:
 //
 // Statements that include other header files.
 //
-#include <FrameworkDxe.h>
 #include <PiDxe.h>
 #include <Base.h>
 #include <Library/UefiLib.h>

+ 0 - 5
Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf

@@ -37,7 +37,6 @@
   IntelFrameworkPkg/IntelFrameworkPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
 
 [LibraryClasses]
@@ -63,13 +62,9 @@
   gEfiVlv2VariableGuid
 
 [Protocols]
-  gEfiAcpiTableProtocolGuid                     # PROTOCOL ALWAYS_CONSUMED
   gEnhancedSpeedstepProtocolGuid
   gEfiPlatformCpuProtocolGuid
   gEfiAcpiSupportProtocolGuid
-  gEfiAcpiS3SaveProtocolGuid
-  gEfiCpuIoProtocolGuid
-  gEfiPs2PolicyProtocolGuid
   gEfiFirmwareVolume2ProtocolGuid
   gEfiMpServiceProtocolGuid
   gEfiGlobalNvsAreaProtocolGuid

+ 0 - 33
Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.bat

@@ -114,7 +114,6 @@ if /i "%~1"=="/yL" (
     goto OptLoop
 )
 
-
 :: Require 2 input parameters
 if "%~2"=="" goto Usage
 
@@ -122,10 +121,6 @@ if "%~2"=="" goto Usage
 set Platform_Type=%~1
 set Build_Target=%~2
 
-if "%~3"=="" (
-    set "IFWI_Suffix= "
-) else set "IFWI_Suffix=/S %~3"
-
 :: Build BIOS
 echo ======================================================================
 echo Build_IFWI:  Calling BIOS build Script...
@@ -139,34 +134,6 @@ if %ERRORLEVEL% NEQ 0 (
 )
 echo.
 echo Finished Building BIOS.
-@REM Set BIOS_ID environment variable here.
-call %WORKSPACE%\Conf\BiosId.bat
-echo BIOS_ID=%BIOS_ID%
-
-:: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environment variables
-find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
-for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j
-del /f/q ver_strings >nul
-set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
-
-:: Start Integration process
-echo ======================================================================
-echo Build_IFWI:  Calling IFWI Stitching Script...
-pushd %PLATFORM_PATH%\%PLATFORM_PACKAGE%\Stitch
-
-  :: IFWIStitch.bat [/nG] [/nM] [/nB] [/B BIOS.rom] [/C StitchConfig] [/S IFWISuffix]
-  call IFWIStitch.bat %Stitch_Flags% /B %BIOS_Name% %IFWI_Suffix%
-   
- @echo off
-popd
-if %ERRORLEVEL% NEQ 0 (
-    echo echo  -- Error Stitching %BIOS_Nam% & echo.
-    set exitCode=1
-)
-echo.
-echo Build_IFWI is finished.
-echo The final IFWI file is located in %ROOT_DIR%\Vlv2TbltDevicePkg\Stitch\
-echo ======================================================================
 goto Exit
 
 :Usage

+ 2 - 9
Platform/Intel/Vlv2TbltDevicePkg/Include/Library/EfiRegTableLib.h

@@ -1,11 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -31,10 +28,6 @@ Abstract:
 #include <Library/BaseLib.h>
 #include <Library/DebugLib.h>
 #include <Library/UefiLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Protocol/CpuIo.h>
-#include <Protocol/BootScriptSave.h>
-#include <Framework/BootScript.h>
 #include <Protocol/PciRootBridgeIo.h>
 
 

+ 2 - 10
Platform/Intel/Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf

@@ -2,12 +2,9 @@
 #
 #/*++
 #
-# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
-#                                                                                  

+# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
+#
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-
-#                                                                                  

-
 #
 #  Module Name:
 #
@@ -40,8 +37,3 @@
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-
-[LibraryClasses]
-

+ 3 - 4
Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.h

@@ -3,11 +3,11 @@
 
   This file includes package header files, library classes.
 
-  Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

+  Copyright (c) 2013 - 2019, Intel Corporation. All rights reserved.<BR>
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-                                                                                   

+
 **/
 
 #ifndef _MULTIPLATFORM_LIB_H_
@@ -52,7 +52,6 @@
 #include <Ppi/Speaker.h>
 #include <Guid/FirmwareFileSystem.h>
 #include <Guid/MemoryTypeInformation.h>
-#include <Ppi/Cache.h>
 #include <Ppi/Reset.h>
 #include <Ppi/EndOfPeiPhase.h>
 #include <Ppi/MemoryDiscovered.h>

+ 2 - 7
Platform/Intel/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.inf

@@ -1,11 +1,8 @@
 #
 #
-# Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
-#                                                                                  
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#                                                                                  
-#
+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
 #
+# SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #  Module Name:
 #
@@ -59,13 +56,11 @@
   Vlv2TbltDevicePkg/PlatformPkg.dec
   IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  Vlv2SocBinPkg/Vlv2SocBinPkg.dec
 
 [LibraryClasses]
   DebugLib
   HobLib
   IoLib
-#  PeiKscLib
 
 [Ppis]
   gEfiPeiReadOnlyVariable2PpiGuid

+ 0 - 6
Platform/Intel/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c

@@ -1789,9 +1789,6 @@ PlatformBdsPolicyBehavior (
     #ifdef TPM_ENABLED
     TcgPhysicalPresenceLibProcessRequest();
     #endif
-    #ifdef FTPM_ENABLE
-    Tcg2PhysicalPresenceLibProcessRequest(NULL);
-    #endif
 
     if (EsrtManagement != NULL) {
       EsrtManagement->LockEsrtRepository();
@@ -1997,9 +1994,6 @@ FULL_CONFIGURATION:
     }
    #ifdef TPM_ENABLED
    TcgPhysicalPresenceLibProcessRequest();
-   #endif
-   #ifdef FTPM_ENABLE
-   Tcg2PhysicalPresenceLibProcessRequest(NULL);
    #endif
 
     if (EsrtManagement != NULL) {

+ 11 - 36
Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.h

@@ -1,10 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
-                                                                                   

+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -24,41 +22,18 @@ Abstract:
 //
 // Statements that include other files.
 //
-#include "PiPei.h"
-
-#include "Pi/PiBootMode.h"
-
-#include "Ppi/StatusCode.h"
-#include "Ppi/MemoryDiscovered.h"
-#include "Ppi/FvLoadFile.h"
-
-#include "Library/HobLib.h"
-#include "Library/DebugLib.h"
-#include "Library/IoLib.h"
-#include "Library/SerialPortLib.h"
-#include "Protocol/StatusCode.h"
-
-
-#ifndef _STATUS_CODE_ENABLER_H_
-#define _STATUS_CODE_ENABLER_H_
+#include <PiPei.h>
 
-#ifdef EFI_DEBUG
-
-#define EFI_STATUS_CODE_ENABLER_HOB_GUID \
-  { \
-    0x5ffc6cf3, 0x71ad, 0x46f5, 0xbd, 0x8b, 0x7e, 0x8f, 0xfe, 0x19, 0x7, 0xd7 \
-  }
-
-extern EFI_GUID gEfiSerialStatusCodeEnablerHobGuid;
-
-typedef struct _EFI_STATUS_CODE_INFO {
-  BOOLEAN    StatusCodeDisable;
-} EFI_STATUS_CODE_INFO;
-
-#endif
-#endif
+#include <Pi/PiBootMode.h>
 
+#include <Ppi/StatusCode.h>
+#include <Ppi/MemoryDiscovered.h>
 
+#include <Library/HobLib.h>
+#include <Library/DebugLib.h>
+#include <Library/IoLib.h>
+#include <Library/SerialPortLib.h>
+#include <Protocol/StatusCode.h>
 
 //
 // Platform specific function Declarations.  These must be implemented in a

+ 2 - 7
Platform/Intel/Vlv2TbltDevicePkg/MonoStatusCode/MonoStatusCode.inf

@@ -1,9 +1,8 @@
 #
 #
-# Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
-#                                                                                  
+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
+#
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-#                                                                                  
 #
 #  Module Name:
 #
@@ -34,10 +33,8 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  Vlv2SocBinPkg/Vlv2SocBinPkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
 
 [LibraryClasses]
   PeimEntryPoint
@@ -52,7 +49,6 @@
 [Ppis]
   gEfiPeiMemoryDiscoveredPpiGuid
   gEfiPeiStatusCodePpiGuid
-  gEfiPeiFvFileLoaderPpiGuid
 
 [Protocols]
   gEfiStatusCodeRuntimeProtocolGuid
@@ -62,7 +58,6 @@
 
 [Guids]
   gEfiPlatformCpuInfoGuid
-  gEfiHtBistHobGuid
   gEfiStatusCodeDataTypeStringGuid              ## CONSUMES
 
 [Depex]

+ 2 - 6
Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf

@@ -1,11 +1,8 @@
 #/*++
 #
-# Copyright (c)  2003  - 2018, Intel Corporation. All rights reserved
-#                                                                                  

+# Copyright (c)  2003  - 2019, Intel Corporation. All rights reserved
+#
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-
-#                                                                                  

-
 #
 #  Module Name:
 #
@@ -46,7 +43,6 @@
   MdeModulePkg/MdeModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
 
 [LibraryClasses]
   HobLib

+ 6 - 11
Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.h

@@ -1,11 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
   PlatformCpuInfoDxe.h
@@ -18,12 +15,10 @@ Abstract:
 #ifndef _PLATFORM_CPU_INFO_DRIVER_H_
 #define _PLATFORM_CPU_INFO_DRIVER_H_
 
-#include "PiDxe.h"
-#include "Library/HobLib.h"
-#include "Guid/GlobalVariable.h"
-#include "Guid/AcpiVariableCompatibility.h"
-#include "Guid/PlatformCpuInfo.h"
-#include "Library/UefiRuntimeServicesTableLib.h"
+#include <PiDxe.h>
+#include <Library/HobLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Guid/PlatformCpuInfo.h>
 #include <Guid/Vlv2Variable.h>
 
 #endif

+ 2 - 6
Platform/Intel/Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf

@@ -1,10 +1,8 @@
 #/*++
 #
-# Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
-#                                                                                  
+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
+#
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-#                                                                                  
-
 #
 #  Module Name:
 #
@@ -36,9 +34,7 @@
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
-  Vlv2SocBinPkg/Vlv2SocBinPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
 
 [LibraryClasses]
   HobLib

+ 2 - 6
Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Configuration.h

@@ -1,10 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
-                                                                                   

+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -89,8 +87,6 @@ Abstract:
 #define VAR_EQ_CONFIG_MODE_DECIMAL_NAME L"67"
 #define VAR_EQ_CPU_EE_NAME              0x0045  // E
 #define VAR_EQ_CPU_EE_DECIMAL_NAME  L"69"
-#define VAR_EQ_FLOPPY_MODE_NAME         0x0046  // F
-#define VAR_EQ_FLOPPY_MODE_DECIMAL_NAME L"70"
 #define VAR_EQ_HT_MODE_NAME             0x0048  // H
 #define VAR_EQ_HT_MODE_DECIMAL_NAME     L"72"
 #define VAR_EQ_AHCI_MODE_NAME           0x0049  // I

+ 2 - 522
Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/Platform.c

@@ -1,13 +1,9 @@
 /** @file
 
-  Copyright (c) 2004  - 2015, Intel Corporation. All rights reserved.<BR>
-                                                                                   
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-                                                                                   
-
-
 Module Name:
 
 
@@ -23,9 +19,7 @@ Abstract:
 #include "PlatformDxe.h"
 #include "Platform.h"
 #include "PchCommonDefinitions.h"
-#include <Protocol/UsbPolicy.h>
 #include <Protocol/PchPlatformPolicy.h>
-#include <Protocol/TpmMp.h>
 #include <Protocol/CpuIo2.h>
 #include <Library/S3BootScriptLib.h>
 #include <Guid/PciLanInfo.h>
@@ -63,10 +57,8 @@ GPIO_CONF_PAD_INIT mTB_BL_GpioInitData_SC_TRI_Exit_boot_Service[] =
 EFI_GUID mSystemHiiExportDatabase = EFI_HII_EXPORT_DATABASE_GUID;
 EFI_GUID mPlatformDriverGuid = EFI_PLATFORM_DRIVER_GUID;
 SYSTEM_CONFIGURATION  mSystemConfiguration;
-SYSTEM_PASSWORDS      mSystemPassword;
 EFI_HANDLE            mImageHandle;
 BOOLEAN               mMfgMode = FALSE;
-VOID                  *mDxePlatformStringPack;
 UINT32                mPlatformBootMode = PLATFORM_NORMAL_MODE;
 extern CHAR16 gItkDataVarName[];
 
@@ -77,8 +69,6 @@ EFI_EVENT  mReadyToBootEvent;
 
 UINT8 mSmbusRsvdAddresses[] = PLATFORM_SMBUS_RSVD_ADDRESSES;
 UINT8 mNumberSmbusAddress = sizeof( mSmbusRsvdAddresses ) / sizeof( mSmbusRsvdAddresses[0] );
-UINT32 mSubsystemVidDid;
-UINT32 mSubsystemAudioVidDid;
 
 UINTN   mPciLanCount = 0;
 VOID    *mPciLanInfo = NULL;
@@ -89,9 +79,6 @@ static EFI_SPEAKER_IF_PROTOCOL mSpeakerInterface = {
   GenerateBeepTone
 };
 
-EFI_USB_POLICY_PROTOCOL         mUsbPolicyData = {0};
-
-
 CFIO_PNP_INIT mTB_BL_GpioInitData_SC_TRI_S0ix_Exit_boot_Service[] =
 {
   {0x410 ,0x20038e10},  //vlv.gpio.gpscore.cfio_regs_pad_lpc_clkout1_pconf0
@@ -179,11 +166,6 @@ VOID
 UpdateDVMTSetup(
   );
 
-VOID
-InitPlatformUsbPolicy (
-  VOID
-  );
-
 VOID
 InitRC6Policy(
   VOID
@@ -427,14 +409,8 @@ SpiBiosProtectionFunction(
 
   BiosFlaLower0 = PcdGet32(PcdFlashMicroCodeAddress)-PcdGet32(PcdFlashAreaBaseAddress);
   BiosFlaLimit0 = PcdGet32(PcdFlashMicroCodeSize)-1;  
-  #ifdef MINNOW2_FSP_BUILD
-  BiosFlaLower1 = PcdGet32(PcdFlashFvFspBase)-PcdGet32(PcdFlashAreaBaseAddress);
-  BiosFlaLimit1 = (PcdGet32(PcdFlashFvRecoveryBase)-PcdGet32(PcdFlashFvFspBase)+PcdGet32(PcdFlashFvRecoverySize))-1;
-  #else
   BiosFlaLower1 = PcdGet32(PcdFlashFvMainBase)-PcdGet32(PcdFlashAreaBaseAddress);
   BiosFlaLimit1 = (PcdGet32(PcdFlashFvRecoveryBase)-PcdGet32(PcdFlashFvMainBase)+PcdGet32(PcdFlashFvRecoverySize))-1;
-  #endif
-
   
   mPciD31F0RegBase = MmPciAddress (0,
                          DEFAULT_PCI_BUS_NUMBER_PCH,
@@ -611,8 +587,6 @@ TristateLpcGpioS0i3Config (
 }
 
 
-EFI_BOOT_SCRIPT_SAVE_PROTOCOL *mBootScriptSave;
-
 /**
   Event Notification during exit boot service to enabel ACPI mode
 
@@ -862,8 +836,6 @@ InitializePlatform (
   //
   //  Add usb policy
   //
-  InitPlatformUsbPolicy();
-  InitSioPlatformPolicy();
   InitializeClockRouting();
   InitializeSlotInfo();
   InitTcoReset();
@@ -949,7 +921,7 @@ InitializePlatform (
                     );
   if (!EFI_ERROR (Status)) {
       Status = gBS->RegisterProtocolNotify (
-                      &gExitPmAuthProtocolGuid,
+                      &gEfiEndOfDxeEventGroupGuid,
                       RtcEvent,
                       &RtcCallbackReg
                       );
@@ -1042,58 +1014,6 @@ ReadyToBootFunction (
   VOID       *Context
   )
 {
-  EFI_STATUS                      Status;
-  EFI_ISA_ACPI_PROTOCOL           *IsaAcpi;
-  EFI_ISA_ACPI_DEVICE_ID          IsaDevice;
-  UINTN                           Size;
-  UINT16                          State;
-  EFI_TPM_MP_DRIVER_PROTOCOL      *TpmMpDriver;
-  EFI_CPU_IO_PROTOCOL             *CpuIo;
-  UINT8                           Data;
-  UINT8                           ReceiveBuffer [64];
-  UINT32                          ReceiveBufferSize;
-
-  UINT8 TpmForceClearCommand [] =              {0x00, 0xC1,
-                                                0x00, 0x00, 0x00, 0x0A,
-                                                0x00, 0x00, 0x00, 0x5D};
-  UINT8 TpmPhysicalPresenceCommand [] =        {0x00, 0xC1,
-                                                0x00, 0x00, 0x00, 0x0C,
-                                                0x40, 0x00, 0x00, 0x0A,
-                                                0x00, 0x00};
-  UINT8 TpmPhysicalDisableCommand [] =         {0x00, 0xC1,
-                                                0x00, 0x00, 0x00, 0x0A,
-                                                0x00, 0x00, 0x00, 0x70};
-  UINT8 TpmPhysicalEnableCommand [] =          {0x00, 0xC1,
-                                                0x00, 0x00, 0x00, 0x0A,
-                                                0x00, 0x00, 0x00, 0x6F};
-  UINT8 TpmPhysicalSetDeactivatedCommand [] =  {0x00, 0xC1,
-                                                0x00, 0x00, 0x00, 0x0B,
-                                                0x00, 0x00, 0x00, 0x72,
-                                                0x00};
-  UINT8 TpmSetOwnerInstallCommand [] =         {0x00, 0xC1,
-                                                0x00, 0x00, 0x00, 0x0B,
-                                                0x00, 0x00, 0x00, 0x71,
-                                                0x00};
-
-  Size = sizeof(UINT16);
-  Status = gRT->GetVariable (
-                  VAR_EQ_FLOPPY_MODE_DECIMAL_NAME,
-                  &gEfiNormalSetupGuid,
-                  NULL,
-                  &Size,
-                  &State
-                  );
-
-  //
-  // Disable Floppy Controller if needed
-  //
-  Status = gBS->LocateProtocol (&gEfiIsaAcpiProtocolGuid, NULL, (VOID **) &IsaAcpi);
-  if (!EFI_ERROR(Status) && (State == 0x00)) {
-    IsaDevice.HID = EISA_PNP_ID(0x604);
-    IsaDevice.UID = 0;
-    Status = IsaAcpi->EnableDevice(IsaAcpi, &IsaDevice, FALSE);
-  }
-
   //
   // save LAN info to a variable
   //
@@ -1111,386 +1031,6 @@ ReadyToBootFunction (
     gBS->FreePool (mPciLanInfo);
     mPciLanInfo = NULL;
   }
-  
-
-  //
-  // Handle ACPI OS TPM requests here
-  //
-  Status = gBS->LocateProtocol (
-                  &gEfiCpuIoProtocolGuid,
-                  NULL,
-                  (VOID **)&CpuIo
-                  );
-  Status = gBS->LocateProtocol (
-                  &gEfiTpmMpDriverProtocolGuid,
-                  NULL,
-                  (VOID **)&TpmMpDriver
-                  );
-  if (!EFI_ERROR (Status))
-  {
-    Data = ReadCmosBank1Byte (CpuIo, ACPI_TPM_REQUEST);
-
-    //
-    // Clear pending ACPI TPM request indicator
-    //
-    WriteCmosBank1Byte (CpuIo, ACPI_TPM_REQUEST, 0x00);
-    if (Data != 0)
-    {
-      WriteCmosBank1Byte (CpuIo, ACPI_TPM_LAST_REQUEST, Data);
-
-      //
-      // Assert Physical Presence for these commands
-      //
-      TpmPhysicalPresenceCommand [11] = 0x20;
-      ReceiveBufferSize = sizeof(ReceiveBuffer);
-      Status = TpmMpDriver->Transmit (
-                              TpmMpDriver, TpmPhysicalPresenceCommand,
-                              sizeof (TpmPhysicalPresenceCommand),
-                              ReceiveBuffer, &ReceiveBufferSize
-                              );
-      //
-      // PF PhysicalPresence = TRUE
-      //
-      TpmPhysicalPresenceCommand [11] = 0x08;
-      ReceiveBufferSize = sizeof(ReceiveBuffer);
-      Status = TpmMpDriver->Transmit (
-                              TpmMpDriver, TpmPhysicalPresenceCommand,
-                              sizeof (TpmPhysicalPresenceCommand),
-                              ReceiveBuffer,
-                              &ReceiveBufferSize
-                              );
-      if (Data == 0x01)
-      {
-        //
-        // TPM_PhysicalEnable
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver, TpmPhysicalEnableCommand,
-                                sizeof (TpmPhysicalEnableCommand),
-                                ReceiveBuffer, &ReceiveBufferSize
-                                );
-      }
-      if (Data == 0x02)
-      {
-        //
-        // TPM_PhysicalDisable
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver, TpmPhysicalDisableCommand,
-                                sizeof (TpmPhysicalDisableCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-      }
-      if (Data == 0x03)
-      {
-        //
-        // TPM_PhysicalSetDeactivated=FALSE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmPhysicalSetDeactivatedCommand [10] = 0x00;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalSetDeactivatedCommand,
-                                sizeof (TpmPhysicalSetDeactivatedCommand),
-                                ReceiveBuffer, &ReceiveBufferSize
-                                );
-        gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
-      }
-      if (Data == 0x04)
-      {
-        //
-        // TPM_PhysicalSetDeactivated=TRUE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmPhysicalSetDeactivatedCommand [10] = 0x01;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalSetDeactivatedCommand,
-                                sizeof (TpmPhysicalSetDeactivatedCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        gRT->ResetSystem (
-               EfiResetWarm,
-               EFI_SUCCESS,
-               0,
-               NULL
-               );
-      }
-      if (Data == 0x05)
-      {
-        //
-        // TPM_ForceClear
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmForceClearCommand,
-                                sizeof (TpmForceClearCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        gRT->ResetSystem (
-               EfiResetWarm,
-               EFI_SUCCESS,
-               0,
-               NULL
-               );
-      }
-      if (Data == 0x06)
-      {
-        //
-        // TPM_PhysicalEnable
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalEnableCommand,
-                                sizeof (TpmPhysicalEnableCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // TPM_PhysicalSetDeactivated=FALSE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmPhysicalSetDeactivatedCommand [10] = 0x00;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalSetDeactivatedCommand,
-                                sizeof (TpmPhysicalSetDeactivatedCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        gRT->ResetSystem (
-               EfiResetWarm,
-               EFI_SUCCESS,
-               0,
-               NULL
-               );
-      }
-      if (Data == 0x07)
-      {
-        //
-        // TPM_PhysicalSetDeactivated=TRUE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmPhysicalSetDeactivatedCommand [10] = 0x01;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalSetDeactivatedCommand,
-                                sizeof (TpmPhysicalSetDeactivatedCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // TPM_PhysicalDisable
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalDisableCommand,
-                                sizeof (TpmPhysicalDisableCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        gRT->ResetSystem (
-               EfiResetWarm,
-               EFI_SUCCESS,
-               0,
-               NULL
-               );
-      }
-      if (Data == 0x08)
-      {
-        //
-        // TPM_SetOwnerInstall=TRUE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmSetOwnerInstallCommand [10] = 0x01;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmSetOwnerInstallCommand,
-                                sizeof (TpmSetOwnerInstallCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-      }
-      if (Data == 0x09)
-      {
-        //
-        // TPM_SetOwnerInstall=FALSE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmSetOwnerInstallCommand [10] = 0x00;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmSetOwnerInstallCommand,
-                                sizeof (TpmSetOwnerInstallCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-      }
-      if (Data == 0x0A)
-      {
-        //
-        // TPM_PhysicalEnable
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalEnableCommand,
-                                sizeof (TpmPhysicalEnableCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // TPM_PhysicalSetDeactivated=FALSE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmPhysicalSetDeactivatedCommand [10] = 0x00;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalSetDeactivatedCommand,
-                                sizeof (TpmPhysicalSetDeactivatedCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // Do TPM_SetOwnerInstall=TRUE on next reboot
-        //
-
-        WriteCmosBank1Byte (CpuIo, ACPI_TPM_REQUEST, 0xF0);
-
-        gRT->ResetSystem (
-               EfiResetWarm,
-               EFI_SUCCESS,
-               0,
-               NULL
-               );
-      }
-      if (Data == 0x0B)
-      {
-        //
-        // TPM_SetOwnerInstall=FALSE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmSetOwnerInstallCommand [10] = 0x00;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmSetOwnerInstallCommand,
-                                sizeof (TpmSetOwnerInstallCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // TPM_PhysicalSetDeactivated=TRUE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmPhysicalSetDeactivatedCommand [10] = 0x01;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalSetDeactivatedCommand,
-                                sizeof (TpmPhysicalSetDeactivatedCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // TPM_PhysicalDisable
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalDisableCommand,
-                                sizeof (TpmPhysicalDisableCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        gRT->ResetSystem (
-               EfiResetWarm,
-               EFI_SUCCESS,
-               0,
-               NULL
-               );
-      }
-      if (Data == 0x0E)
-      {
-        //
-        // TPM_ForceClear
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmForceClearCommand,
-                                sizeof (TpmForceClearCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // TPM_PhysicalEnable
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalEnableCommand,
-                                sizeof (TpmPhysicalEnableCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        //
-        // TPM_PhysicalSetDeactivated=FALSE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmPhysicalSetDeactivatedCommand [10] = 0x00;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmPhysicalSetDeactivatedCommand,
-                                sizeof (TpmPhysicalSetDeactivatedCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        gRT->ResetSystem (
-               EfiResetWarm,
-               EFI_SUCCESS,
-               0,
-               NULL
-               );
-      }
-      if (Data == 0xF0)
-      {
-        //
-        // Second part of ACPI TPM request 0x0A: OEM custom TPM_SetOwnerInstall=TRUE
-        //
-        ReceiveBufferSize = sizeof(ReceiveBuffer);
-        TpmSetOwnerInstallCommand [10] = 0x01;
-        Status = TpmMpDriver->Transmit (
-                                TpmMpDriver,
-                                TpmSetOwnerInstallCommand,
-                                sizeof (TpmSetOwnerInstallCommand),
-                                ReceiveBuffer,
-                                &ReceiveBufferSize
-                                );
-        WriteCmosBank1Byte (CpuIo, ACPI_TPM_LAST_REQUEST, 0x0A);
-      }
-      //
-      // Deassert Physical Presence
-      //
-      TpmPhysicalPresenceCommand [11] = 0x10;
-      ReceiveBufferSize = sizeof(ReceiveBuffer);
-      Status = TpmMpDriver->Transmit (
-                              TpmMpDriver,
-                              TpmPhysicalPresenceCommand,
-                              sizeof (TpmPhysicalPresenceCommand),
-                              ReceiveBuffer,
-                              &ReceiveBufferSize
-                              );
-    }
-  }
-
-  return;
 }
 
 /**
@@ -1722,66 +1262,6 @@ UpdateDVMTSetup(
   }
 }
 
-VOID
-InitPlatformUsbPolicy (
-  VOID
-  )
-
-{
-  EFI_HANDLE              Handle;
-  EFI_STATUS              Status;
-
-  Handle = NULL;
-
-  mUsbPolicyData.Version                       = (UINT8)USB_POLICY_PROTOCOL_REVISION_2;
-  mUsbPolicyData.UsbMassStorageEmulationType   = mSystemConfiguration.UsbBIOSINT13DeviceEmulation;
-  if(mUsbPolicyData.UsbMassStorageEmulationType == 3) {
-    mUsbPolicyData.UsbEmulationSize = mSystemConfiguration.UsbBIOSINT13DeviceEmulationSize;
-  } else {
-    mUsbPolicyData.UsbEmulationSize = 0;
-  }
-  mUsbPolicyData.UsbZipEmulationType         = mSystemConfiguration.UsbZipEmulation;
-  mUsbPolicyData.UsbOperationMode              = HIGH_SPEED;
-
-  //
-  //  Some chipset need Period smi, 0 = LEGACY_PERIOD_UN_SUPP
-  //
-  mUsbPolicyData.USBPeriodSupport      = LEGACY_PERIOD_UN_SUPP;
-
-  //
-  //  Some platform need legacyfree, 0 = LEGACY_FREE_UN_SUPP
-  //
-  mUsbPolicyData.LegacyFreeSupport    = LEGACY_FREE_UN_SUPP;
-
-  //
-  //  Set Code base , TIANO_CODE_BASE =0x01, ICBD =0x00
-  //
-  mUsbPolicyData.CodeBase    = (UINT8)ICBD_CODE_BASE;
-
-  //
-  //  Some chispet 's LpcAcpibase are diffrent,set by platform or chipset,
-  //  default is Ich  acpibase =0x040. acpitimerreg=0x08.
-  mUsbPolicyData.LpcAcpiBase     = 0x40;
-  mUsbPolicyData.AcpiTimerReg    = 0x08;
-
-  //
-  //  Set for reduce usb post time
-  //
-  mUsbPolicyData.UsbTimeTue           = 0x00;
-  mUsbPolicyData.InternelHubExist     = 0x00;  //TigerPoint doesn't have RMH
-  mUsbPolicyData.EnumWaitPortStableStall    = 100;
-
-
-  Status = gBS->InstallProtocolInterface (
-                  &Handle,
-                  &gUsbPolicyGuid,
-                  EFI_NATIVE_INTERFACE,
-                  &mUsbPolicyData
-                  );
-  ASSERT_EFI_ERROR(Status);
-
-}
-
 UINT8
 ReadCmosBank1Byte (
   IN  EFI_CPU_IO_PROTOCOL             *CpuIo,

+ 3 - 512
Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.h

@@ -1,10 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2015, Intel Corporation. All rights reserved.<BR>
-                                                                                   
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-                                                                                   
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -42,25 +40,17 @@ Abstract:
 #include <Library/BiosIdLib.h>
 #include <Protocol/GlobalNvsArea.h>
 #include <Protocol/PciRootBridgeIo.h>
-#include <Protocol/IsaAcpi.h>
-#include <Framework/FrameworkInternalFormRepresentation.h>
-#include <Protocol/FrameworkHii.h>
-#include <Protocol/FrameworkFormCallback.h>
-#include <Protocol/CpuIo.h>
-#include <Protocol/BootScriptSave.h>
-#include <Framework/BootScript.h>
+#include <Protocol/CpuIo2.h>
 #include <Guid/GlobalVariable.h>
 #include <Guid/BoardFeatures.h>
 #include <Guid/DataHubRecords.h>
 #include <Protocol/DataHub.h>
 #include <Protocol/PciIo.h>
 #include <Protocol/Speaker.h>
-#include <Protocol/ExitPmAuth.h>
 #include <IndustryStandard/Pci22.h>
 #include <Guid/SetupVariable.h>
 #include <Guid/PlatformInfo.h>
 #include "Configuration.h"
-#define _EFI_H_    //skip efi.h
 #include "PchAccess.h"
 #include "VlvAccess.h"
 #include "BoardIdDecode.h"
@@ -86,25 +76,9 @@ Abstract:
 
 #define B_RTC_DATE_ALARM_MASK       0x3F
 
-//
-// Default CPU Alternate Duty Cycle (255=100%, 0=0%)
-//
-#define DEF_CPU_ALT_DUTY_CYCLE 0xFF
-
-#define MAX_ONBOARD_SATA_DEVICE 2
-
-#define DXE_DEVICE_ENABLED  1
-#define DXE_DEVICE_DISABLED 0
-
-#define AZALIA_MAX_LOOP_TIME  0x10000
-
 //
 // Platform driver GUID
 //
-#define EFI_PLATFORM_DRIVER_GUID \
-  { 0x056E7324, 0xA718, 0x465b, 0x9A, 0x84, 0x22, 0x8F, 0x06, 0x64, 0x2B, 0x4F }
-
-#define PASSWORD_MAX_SIZE               20
 #define PLATFORM_NORMAL_MODE          0x01
 #define PLATFORM_SAFE_MODE            0x02
 #define PLATFORM_RECOVERY_MODE        0x04
@@ -119,33 +93,10 @@ Abstract:
 #define EFI_CU_PLATFORM_DXE_STEP4                    (EFI_OEM_SPECIFIC | 0x00000015)
 #define EFI_CU_PLATFORM_DXE_INIT_DONE                (EFI_OEM_SPECIFIC | 0x00000016)
 
-
-#define EFI_SECTION_STRING                  0x1C
-#define EFI_FORWARD_DECLARATION(x) typedef struct _##x x
-#define PREFIX_BLANK                        0x04
-
 #pragma pack(1)
 
 typedef UINT64 EFI_BOARD_FEATURES;
 
-//
-//BUGBUG: should remove these EDK hii definition once Hii transtion is done
-//
-typedef UINT16  STRING_REF;
-typedef UINT16  EFI_FORM_LABEL;
-
-typedef enum {
-  EfiUserPassword,
-  EfiAdminPassword
-} EFI_PASSWORD_TYPE;
-
-typedef struct {
-  CHAR16            TempPassword[PASSWORD_MAX_SIZE];
-  CHAR16            EncodedPassword[PASSWORD_MAX_SIZE];
-  VOID              *PasswordLocation;
-  EFI_PASSWORD_TYPE PasswordType;
-} EFI_PASSWORD_DATA;
-
 typedef struct {
   CHAR8 AaNumber[7];
   UINT8 BoardId;
@@ -155,111 +106,11 @@ typedef struct {
   UINT64 AcpiOemTableId;
 } BOARD_ID_DECODE;
 
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FORM_ROUTINE) (
-  SYSTEM_CONFIGURATION *SetupBuffer
-  );
-
-typedef struct{
-  UINT16 DeviceNumber;
-  UINT16 FunctionNumber;
-}PCI_DEVICE_FUNC_INFO;
-
-typedef struct{
-  CHAR16 PortNumber[4];
-  STRING_REF SataDeviceInfoStringId;
-}SATA_DEVICE_STRING_INFO;
-
-typedef struct {
-  UINT16  Signature;
-  UINT8   Size;
-  UINT32  EntryPoint;
-  UINT8   Reserve[17];
-  UINT16  PciDataOff;
-  UINT16  ExpansionOff;
-} PNP_OPTION_ROM_HEADER;
-
-typedef struct {
-  UINT32  Signature;
-  UINT8   Revision;
-  UINT8   Length;
-  UINT16  NextHeader;
-  UINT8   Reserve;
-  UINT8   CheckSum;
-  UINT32  DeviceId;
-  UINT16  ManufactureStrOff;
-  UINT16  ProductStrOff;
-} PNP_EXPANSION_HEADER;
-
-typedef struct {
-  BOOLEAN                         Enable;
-  UINT8                           VerbTableNum;
-  UINT16                          CodecSSID;
-  EFI_PHYSICAL_ADDRESS            HDABar;
-  EFI_PHYSICAL_ADDRESS            UpperHDABar;
-  UINT8                           SDIPresent;
-  BOOLEAN                         Pme;
-  BOOLEAN                         LegacyFrontPanelAudio;
-  BOOLEAN                         HighDefinitionFrontPanelAudio;
-} EFI_AZALIA_S3;
-
-//
-//following structs are from R8. Remove them once R8->R9 transition is done
-//
-typedef struct {
-  CHAR16      *OptionString;  // Passed in string to generate a token for in a truly dynamic form creation
-  STRING_REF  StringToken;    // This is used when creating a single op-code without generating a StringToken (have one already)
-  UINT16      Value;
-  UINT8       Flags;
-  UINT16      Key;
-} IFR_OPTION;
-
-
-
-typedef struct {
-  UINT8   Number;
-  UINT32  HorizontalResolution;
-  UINT32  VerticalResolution;
-} PANEL_RESOLUTION;
-
 #pragma pack()
 
 //
 // Prototypes
 //
-EFI_STATUS
-EFIAPI
-EfiMain (
-  IN EFI_HANDLE         ImageHandle,
-  IN EFI_SYSTEM_TABLE   *SystemTable
-  );
-
-EFI_STATUS
-ProcessEventLog (
-  );
-
-EFI_STATUS
-FindDataRecords (
-  );
-
-EFI_STATUS
-ProcessPasswords(
-  );
-
-VOID
-MemorySetup(
-  );
-
-
-UINTN
-EfiValueToString (
-  IN  OUT CHAR16  *Buffer,
-  IN  INT64       Value,
-  IN  UINTN       Flags,
-  IN  UINTN       Width
-  );
-
 VOID
 EFIAPI
 ReadyToBootFunction (
@@ -267,60 +118,6 @@ ReadyToBootFunction (
   VOID       *Context
   );
 
-VOID
-InstallHiiDataAndGetSettings(
-  IN EFI_HII_STRING_PACK            *StringPack,
-      //
-  ... // 0 or more of => IN EFI_HII_IFR_PACK *IfrPack,
-      // Terminate list with NULL
-      //
-  );
-
-EFI_STATUS
-ReadOrInitSetupVariable(
-  IN UINTN         RequiredVariableSize,
-  IN UINTN         RequiredPasswordSize,
-  IN VOID          *DefaultData,
-  IN VOID          *MfgDefaultData,
-  OUT VOID         *SetupVariableData,
-  OUT VOID         *SystemPassword
-  );
-
-VOID
-EfiLogicalOrMem(
-  IN VOID   *Destination,
-  IN VOID   *Source,
-  IN UINTN  Length
-  );
-
-EFI_STATUS
-GetStringFromToken (
-  IN      EFI_GUID                  *ProducerGuid,
-  IN      STRING_REF                Token,
-  OUT     CHAR16                    **String
-  );
-
-UINT32
-ConvertBase2ToRaw (
-  IN  EFI_EXP_BASE2_DATA             *Data);
-
-UINT32
-ConvertBase10ToRaw (
-  IN  EFI_EXP_BASE10_DATA             *Data);
-
-CHAR16 *
-GetStringById (
-  IN  STRING_REF   Id,
-  EFI_HII_HANDLE   StringPackHandle
-  );
-
-VOID
-EFIAPI
-SetupDataFilter (
-  IN EFI_EVENT    Event,
-  IN VOID*        Context
-  );
-
 VOID
 EFIAPI
 IdeDataFilter (
@@ -328,20 +125,6 @@ IdeDataFilter (
   IN VOID*        Context
   );
 
-VOID
-EFIAPI
-UpdateAhciRaidDiskInfo (
-  IN EFI_EVENT    Event,
-  IN VOID*        Context
-  );
-
-VOID
-EFIAPI
-EventLogFilter (
-  IN EFI_EVENT    Event,
-  IN VOID*        Context
-  );
-
 VOID
 SwapEntries (
   IN  CHAR8 *Data
@@ -353,45 +136,12 @@ AsciiToUnicode (
   IN    CHAR16    *UnicodeString
   );
 
-UINT16
-ConfigModeStateGet();
-
-VOID
-SetSkus();
-
-VOID
-CPUSetupItems();
-
-EFI_STATUS
-SecurityDriverCallback (
-  IN EFI_FORM_CALLBACK_PROTOCOL       *This,
-  IN UINT16                           KeyValue,
-  IN EFI_IFR_DATA_ARRAY               *Data,
-  OUT EFI_HII_CALLBACK_PACKET         **Packet
-  );
-
-VOID
-SetPasswordState (
-  );
-
-VOID
-EncodePassword (
-  IN  CHAR16                      *Password
-  );
-
 VOID
 EFIAPI
 PciBusEvent (
   IN EFI_EVENT    Event,
   IN VOID*        Context
   );
-VOID
-AsfInitialize(
-  );
-
-VOID
-InitializeAsf (
-  );
 
 UINT8
 ReadCmosBank1Byte (
@@ -410,204 +160,6 @@ VOID
 InitializeBoardId (
   );
 
-EFI_STATUS
-InstallBootCallbackRoutine(
-  );
-
-EFI_STATUS
-InstallConfigurationCallbackRoutine(
-  );
-
-EFI_STATUS
-InstallPerformanceCallbackRoutine(
-  );
-
-EFI_STATUS
-InstallSecurityCallbackRoutine (
-  );
-
-EFI_STATUS
-InstallMainCallbackRoutine (
-  );
-
-EFI_STATUS
-MemoryConfigurationUpdate (
-  UINT16                *Key,
-  EFI_FORM_LABEL        *Label,
-  UINT16                *OpcodeCount,
-  UINT8                 **OpcodeData,
-  EFI_FORM_ROUTINE      *Routine
-  );
-
-EFI_STATUS
-MemoryConfigurationCallbackRoutine (
-  SYSTEM_CONFIGURATION  *SetupBuffer
-  );
-
-EFI_STATUS
-MemoryConfigurationCalculateSpeed(
-  SYSTEM_CONFIGURATION  *SetupBuffer
-  );
-
-VOID
-UpdateMemoryString(
-  IN  STRING_REF                  TokenToUpdate,
-  IN  CHAR16                      *NewString
-  );
-
-VOID
-InitFeaturePolicy (
-  IN EFI_PLATFORM_INFO_HOB      *PlatformInfo
-  );
-
-VOID
-InitializeSetupVarHide (
-  );
-
-VOID
-PreparePCIePCISlotInformation(
-  VOID
-  );
-
-
-EFI_STATUS
-BootConfigurationUpdate (
-  IN  OUT SYSTEM_CONFIGURATION  *SystemConfiguration
-  );
-
-EFI_STATUS
-InitializeBootConfiguration(
-  VOID
-  );
-
-UINT16
-GetStringSize(
-  IN      CHAR16 *ThisString
-  );
-
-UINT16
-GetDriveCount (
-  IN      STRING_REF *BootMap
-  );
-
-CHAR16 *
-GetBootString (
-  IN      STRING_REF    Id,
-      OUT UINTN        *Length
-  );
-
-EFI_STATUS
-BootCfgCreateTwoOptionOneOf(
-  IN      UINT16                QuestionId,
-  IN      EFI_FORM_LABEL        Label,
-  IN      STRING_REF            OptionPrompt,
-  IN      STRING_REF            OptionHelp,
-  IN      STRING_REF            OptionOneString,
-  IN      STRING_REF            OptionTwoString,
-  IN      UINT8                 OptionOneFlags,
-  IN      UINT8                 OptionTwoFlags,
-  IN      UINT16                KeyValueOne,
-  IN      UINT16                KeyValueTwo
-  );
-
-EFI_STATUS
-ReplaceOpcodeWithText(
-  IN      STRING_REF            OptionPrompt,
-  IN      STRING_REF            OptionHelp,
-  IN      STRING_REF            OptionOneString,
-  IN      EFI_FORM_LABEL        Label
-  );
-
-EFI_STATUS
-CreateDriveBootOrderOpcode(
-  IN      VOID                 *Data,
-  IN      STRING_REF           *BootMap,
-  IN      EFI_FORM_LABEL        Label,
-  IN      UINT16                QuestionId,
-  IN      STRING_REF            OptionOneString,
-  IN      STRING_REF            OptionTwoString
-  );
-
-VOID
-SetHyperBootCfgFlags(
-  IN  OUT SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-VOID
-GetHyperBootCfgFlags(
-  IN  OUT SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-VOID
-PrepareBootCfgForHyperBoot(
-  IN  OUT SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-BOOLEAN
-BootCfgChanged(
-  IN      SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-EFI_STATUS
-InsertOpcodeAtIndex(
-  IN      SYSTEM_CONFIGURATION *SystemConfiguration,
-  IN  OUT IFR_OPTION           *OptionList,
-  IN      IFR_OPTION            IfrOption,
-  IN      UINT16                OptionCount
-  );
-
-VOID
-ConfigureBootOrderStrings(
-  IN      SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-VOID
-InitializeAllBootStrings(
-  VOID
-  );
-
-VOID
-SaveUsbCfgSettings(
-  IN  OUT SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-VOID
-RestoreUsbCfgSettings(
-  IN  OUT SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-EFI_STATUS
-UpdateBootDevicePriority(
-  IN  OUT SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-EFI_STATUS
-DisableHyperBoot(
-  IN  OUT SYSTEM_CONFIGURATION *SystemConfiguration
-  );
-
-BOOLEAN
-CheckForUserPassword(
-  VOID
-  );
-
-EFI_STATUS
-EFIAPI
-HyperBootPasswordCallback(
-  IN  OUT VOID*  Data
-  );
-
-EFI_STATUS
-EFIAPI
-HyperBootF9Callback (
-  IN VOID*  Data
-  );
-
-EFI_STATUS
-InstallHiiEvents(
-  VOID
-  );
-
 EFI_STATUS
 EFIAPI
 ProgramToneFrequency (
@@ -637,73 +189,13 @@ AdjustDefaultRtcTimeCallback (
   IN VOID             *Context
   );
 
-typedef struct _GOP_DISPLAY_BRIGHTNESS_PROTOCOL GOP_DISPLAY_BRIGHTNESS_PROTOCOL;
-
-typedef
-EFI_STATUS
-(EFIAPI *GET_MAXIMUM_BRIGHTNESS_LEVEL) (
-  IN  GOP_DISPLAY_BRIGHTNESS_PROTOCOL *This,
-  OUT UINT32 *MaxBrightnessLevel
-  );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *GET_CURRENT_BRIGHTNESS_LEVEL) (
-  IN  GOP_DISPLAY_BRIGHTNESS_PROTOCOL *This,
-  OUT UINT32 *MaxBrightnessLevel
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *SET_BRIGHTNESS_LEVEL) (
-  IN  GOP_DISPLAY_BRIGHTNESS_PROTOCOL *This,
-  IN  UINT32  BrightnessLevel
-  );
-
-struct _GOP_DISPLAY_BRIGHTNESS_PROTOCOL {
-  UINT32  Revision;
-  GET_MAXIMUM_BRIGHTNESS_LEVEL GetMaxBrightnessLevel;
-  GET_CURRENT_BRIGHTNESS_LEVEL GetCurrentBrightnessLevel;
-  SET_BRIGHTNESS_LEVEL SetBrightnessLevel;
-};
-
 //
 // Global externs
 //
-extern UINT8 MaintenanceBin[];
-extern UINT8 MainBin[];
-extern UINT8 ConfigurationBin[];
-extern UINT8 MemoryConfigurationBin[];
-extern UINT8 PerformanceBin[];
-extern UINT8 SecurityBin[];
-extern UINT8 BootBin[];
-extern UINT8 PowerBin[];
-extern UINT8 SystemSetupBin[];
-
-extern VOID                 *mDxePlatformStringPack;
-extern EFI_HII_PROTOCOL     *mHii;
 extern SYSTEM_CONFIGURATION mSystemConfiguration;
-extern FRAMEWORK_EFI_HII_HANDLE       mMaintenanceHiiHandle;
-extern FRAMEWORK_EFI_HII_HANDLE       mMainHiiHandle;
-extern FRAMEWORK_EFI_HII_HANDLE       mConfigurationHiiHandle;
-extern FRAMEWORK_EFI_HII_HANDLE       mPerformanceHiiHandle;
-extern FRAMEWORK_EFI_HII_HANDLE       mPowerHiiHandle;
-extern FRAMEWORK_EFI_HII_HANDLE       mBootHiiHandle;
-extern FRAMEWORK_EFI_HII_HANDLE       mSecurityHiiHandle;
-
-extern SYSTEM_PASSWORDS     mSystemPassword;
-extern EFI_PASSWORD_DATA    mAdminPassword;
-extern EFI_PASSWORD_DATA    mUserPassword;
 
 extern EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *mPciRootBridgeIo;
 
-//
-//extern EFI_REG_TABLE mSubsystemIdRegs[];
-//
-extern UINT32 mSubsystemVidDid;
-extern UINT32 mSubsystemAudioVidDid;
-
 extern UINT8 mBoardIdIndex;
 extern BOOLEAN mFoundAANum;
 extern EFI_BOARD_FEATURES mBoardFeatures;
@@ -718,5 +210,4 @@ extern BOOLEAN mMfgMode;
 extern UINT32 mPlatformBootMode;
 extern CHAR8 BoardAaNumber[];
 
-extern EFI_GUID gEfiGlobalNvsAreaProtocolGuid;
 #endif

+ 4 - 16
Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf

@@ -1,6 +1,6 @@
 ## @file
 #
-#  Copyright (c)  1999  - 2016, Intel Corporation. All rights reserved
+#  Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -50,13 +50,10 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
   SecurityPkg/SecurityPkg.dec
   CryptoPkg/CryptoPkg.dec
-  IntelFspWrapperPkg/IntelFspWrapperPkg.dec
 
 [LibraryClasses]
   BaseLib
@@ -91,24 +88,18 @@
   gEfiEventExitBootServicesGuid
   gEfiVlv2VariableGuid
   gEfiSecureBootEnableDisableGuid
+  gEfiEndOfDxeEventGroupGuid
 
 [Protocols]
   gEfiPciRootBridgeIoProtocolGuid    # CONSUMES  ## GUID
   gEfiVariableArchProtocolGuid
   gEfiVariableWriteArchProtocolGuid
   gEfiHiiConfigAccessProtocolGuid
-  gEfiBootScriptSaveProtocolGuid
-  gEfiCpuIoProtocolGuid
+  gEfiCpuIo2ProtocolGuid
   gEfiDevicePathProtocolGuid
   gEfiDiskInfoProtocolGuid
-  gEfiPs2PolicyProtocolGuid
-  gEfiIsaAcpiProtocolGuid
-  gEfiDataHubProtocolGuid
   gEfiPciIoProtocolGuid
   gDxePchPlatformPolicyProtocolGuid
-  gEfiTpmMpDriverProtocolGuid
-  gEfiLpcWpce791PolicyProtocolGuid
-  gUsbPolicyGuid
   gEfiSpeakerInterfaceProtocolGuid
   gDxeVlvPlatformPolicyGuid
   gEfiSmbiosSlotPopulationGuid
@@ -121,7 +112,6 @@
   gEfiGlobalNvsAreaProtocolGuid
   gEfiCpuIo2ProtocolGuid
   gIgdOpRegionProtocolGuid
-  gExitPmAuthProtocolGuid
   gEdkiiVariableLockProtocolGuid
 
 [Pcd.common]
@@ -134,15 +124,13 @@
   gPlatformModuleTokenSpaceGuid.PcdFlashFvMainBase
   gPlatformModuleTokenSpaceGuid.PcdFlashFvRecoveryBase
   gPlatformModuleTokenSpaceGuid.PcdFlashFvRecoverySize
-  gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase
 
 
 [Depex]
   gEfiPciRootBridgeIoProtocolGuid     AND
   gEfiVariableArchProtocolGuid        AND
   gEfiVariableWriteArchProtocolGuid   AND
-  gEfiBootScriptSaveProtocolGuid      AND
-  gEfiCpuIoProtocolGuid               AND
+  gEfiCpuIo2ProtocolGuid               AND
   gDxePchPlatformPolicyProtocolGuid   AND
   gEfiGlobalNvsAreaProtocolGuid
 

+ 3 - 9
Platform/Intel/Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf

@@ -1,15 +1,10 @@
 #
 #
-# Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
-#                                                                                  

-# SPDX-License-Identifier: BSD-2-Clause-Patent
-
-#                                                                                  

-#
+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
+#                                                                                  
# SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
-
 [Defines]
   INF_VERSION                    = 0x00010005
   BASE_NAME                      = PlatformGOPPolicy
@@ -29,14 +24,13 @@
 
 [Packages]
   MdePkg/MdePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
+
 [LibraryClasses]
   BaseLib
   DebugLib
   UefiDriverEntryPoint
   UefiRuntimeServicesTableLib
-#  DxeKscLib
 
 [Guids]
   gBmpImageGuid

+ 2 - 6
Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/MemoryCallback.c

@@ -1,10 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
-                                                                                   

+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -158,12 +156,10 @@ MemoryDiscoveredPpiNotifyCallback (
     IoWrite16 (ACPI_BASE_ADDRESS + R_PCH_ACPI_PM1_CNT, Pm1Cnt);
   }
 
-  #ifndef MINNOW2_FSP_BUILD
   //
   // Set PEI cache mode here
   //
   SetPeiCacheMode (PeiServices);
-  #endif
 
   //
   //  Pulish memory tyoe info

+ 3 - 206
Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c

@@ -1,11 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2016, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -70,10 +67,6 @@ static EFI_PEI_PPI_DESCRIPTOR       mInstallSpeakerInterfacePpi = {
 static EFI_PEI_RESET_PPI            mResetPpi = { IchReset };
 
 
-static EFI_PEI_FIND_FV_PPI mEfiFindFvPpi = {
-  (EFI_PEI_FIND_FV_FINDFV)FindFv
-};
-
 static EFI_PEI_PPI_DESCRIPTOR       mPpiList[] = {
   {
     EFI_PEI_PPI_DESCRIPTOR_PPI,
@@ -81,14 +74,9 @@ static EFI_PEI_PPI_DESCRIPTOR       mPpiList[] = {
     NULL
   },
   {
-    EFI_PEI_PPI_DESCRIPTOR_PPI,
+    (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
     &gEfiPeiResetPpiGuid,
     &mResetPpi
-  },
-  {
-    (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
-    &gEfiFindFvPpiGuid,
-    &mEfiFindFvPpi
   }
 };
 
@@ -815,158 +803,6 @@ PlatformEarlyInitEntry (
   EFI_PLATFORM_INFO_HOB       *PlatformInfo;
   EFI_PEI_HOB_POINTERS        Hob;
   EFI_PLATFORM_CPU_INFO       PlatformCpuInfo;
-  EFI_SMRAM_HOB_DESCRIPTOR_BLOCK  *DescriptorBlock;
-  EFI_SMRAM_HOB_DESCRIPTOR_BLOCK  *NewDescriptorBlock;
-  UINTN                           Index;
-  UINTN                           MaxIndex;
-  UINT64                          Base;
-  UINT64                          Size;
-  UINT64                          NewSize;
-
-  //
-  // Make sure base and size of the SMRAM region is aligned
-  //
-  Hob.Raw = GetFirstGuidHob (&gEfiSmmPeiSmramMemoryReserveGuid);
-  if (Hob.Raw != NULL) {
-    DescriptorBlock = GET_GUID_HOB_DATA (Hob.Raw);
-    DEBUG ((DEBUG_INFO, "SMM PEI SMRAM Memory Reserved HOB\n"));
-    for (Index = 0; Index < DescriptorBlock->NumberOfSmmReservedRegions; Index++) {
-      DEBUG((DEBUG_INFO, "  SMRAM Descriptor[%02x]: Start=%016lx  Size=%016lx  State=%02x\n",
-        Index,
-        DescriptorBlock->Descriptor[Index].PhysicalStart,
-        DescriptorBlock->Descriptor[Index].PhysicalSize,
-        DescriptorBlock->Descriptor[Index].RegionState
-        ));
-    }
-
-    //
-    // Find the largest usable range of SMRAM between 1MB and 4GB
-    //
-    for (Index = 0, MaxIndex = 0, Size = 0; Index < DescriptorBlock->NumberOfSmmReservedRegions; Index++) {
-      //
-      // Skip any SMRAM region that is already allocated, needs testing, or needs ECC initialization
-      //
-      if ((DescriptorBlock->Descriptor[Index].RegionState & (EFI_ALLOCATED | EFI_NEEDS_TESTING | EFI_NEEDS_ECC_INITIALIZATION)) != 0) {
-        continue;
-      }
-      //
-      // Skip any SMRAM region below 1MB
-      //
-      if (DescriptorBlock->Descriptor[Index].CpuStart < BASE_1MB) {
-        continue;
-      }
-      //
-      // Skip any SMRAM region that is above 4GB or crosses the 4GB boundary
-      //
-      if ((DescriptorBlock->Descriptor[Index].CpuStart + DescriptorBlock->Descriptor[Index].PhysicalSize) >= BASE_4GB) {
-        continue;
-      }
-      //
-      // Cache the largest SMRAM region index
-      //
-      if (DescriptorBlock->Descriptor[Index].PhysicalSize >= DescriptorBlock->Descriptor[MaxIndex].PhysicalSize) {
-        MaxIndex = Index;
-      }
-    }
-
-    //
-    // Find the extent of the contiguous SMRAM region that surrounds the largest usable SMRAM range
-    //
-    Base = DescriptorBlock->Descriptor[MaxIndex].CpuStart;
-    Size = DescriptorBlock->Descriptor[MaxIndex].PhysicalSize;
-    for (Index = 0; Index < DescriptorBlock->NumberOfSmmReservedRegions; Index++) {
-      if (DescriptorBlock->Descriptor[Index].CpuStart < Base &&
-          Base == (DescriptorBlock->Descriptor[Index].CpuStart + DescriptorBlock->Descriptor[Index].PhysicalSize)) {
-        Base  = DescriptorBlock->Descriptor[Index].CpuStart;
-        Size += DescriptorBlock->Descriptor[Index].PhysicalSize;
-      } else if ((Base + Size) == DescriptorBlock->Descriptor[Index].CpuStart) {
-        Size += DescriptorBlock->Descriptor[Index].PhysicalSize;
-      }
-    }
-
-    //
-    // Round SMRAM region up to nearest power of 2 that is at least 4KB
-    //
-    NewSize = MAX (LShiftU64 (1, HighBitSet64 (Size - 1) + 1), SIZE_4KB);
-    if ((Base & ~(NewSize - 1)) != Base) {
-      //
-      // SMRAM region Base Address has smaller alignment than SMRAM region Size
-      // This is not compatible with SMRR settings
-      //
-      DEBUG((DEBUG_ERROR, "ERROR: SMRAM Region Size has larger alignment than SMRAM Region Base\n"));
-      DEBUG((DEBUG_ERROR, "  SMRAM Region Base=%016lx  Size=%016lx\n", Base, NewSize));
-      ASSERT (FALSE);
-    } else if (Size != NewSize) {
-      //
-      // See if the size difference can be added to an adjacent descriptor that is already allocated
-      //
-      for (Index = 0; Index < DescriptorBlock->NumberOfSmmReservedRegions; Index++) {
-        if ((DescriptorBlock->Descriptor[Index].CpuStart + DescriptorBlock->Descriptor[Index].PhysicalSize) == (Base + Size)) {
-          if (((DescriptorBlock->Descriptor[Index].RegionState) & EFI_ALLOCATED) != 0) {
-            DescriptorBlock->Descriptor[Index].PhysicalSize += (NewSize - Size);
-            Size = NewSize;
-            break;
-          }
-        }
-      }
-
-      if (Size != NewSize) {
-        //
-        // Add an allocated descriptor to the SMM PEI SMRAM Memory Reserved HOB to accomodate the larger size.
-        //
-        Index = DescriptorBlock->NumberOfSmmReservedRegions;
-        NewDescriptorBlock = (EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *)BuildGuidHob (
-          &gEfiSmmPeiSmramMemoryReserveGuid,
-          sizeof (EFI_SMRAM_HOB_DESCRIPTOR_BLOCK) + ((Index + 1) * sizeof (EFI_SMRAM_DESCRIPTOR))
-          );
-        ASSERT (NewDescriptorBlock != NULL);
-
-        //
-        // Copy old EFI_SMRAM_HOB_DESCRIPTOR_BLOCK to new allocated region
-        //
-        CopyMem (
-          NewDescriptorBlock,
-          DescriptorBlock,
-          sizeof (EFI_SMRAM_HOB_DESCRIPTOR_BLOCK) + (Index * sizeof (EFI_SMRAM_DESCRIPTOR))
-          );
-
-        //
-        // Make sure last descriptor in NewDescriptorBlock contains last descriptor from DescriptorBlock
-        //
-        CopyMem (
-          &NewDescriptorBlock->Descriptor[Index],
-          &NewDescriptorBlock->Descriptor[Index - 1],
-          sizeof (EFI_SMRAM_DESCRIPTOR)
-          );
-
-        //
-        // Fill next to last descriptor with an allocated descriptor that aligns the total size of SMRAM
-        //
-        NewDescriptorBlock->Descriptor[Index - 1].CpuStart      = Base + Size;
-        NewDescriptorBlock->Descriptor[Index - 1].PhysicalStart = Base + Size;
-        NewDescriptorBlock->Descriptor[Index - 1].PhysicalSize  = NewSize - Size;
-        NewDescriptorBlock->Descriptor[Index - 1].RegionState   = DescriptorBlock->Descriptor[MaxIndex].RegionState | EFI_ALLOCATED;
-        NewDescriptorBlock->NumberOfSmmReservedRegions++;
-
-        //
-        // Invalidate the original gEfiSmmPeiSmramMemoryReserveGuid HOB
-        //
-        ZeroMem (&Hob.Guid->Name, sizeof (&Hob.Guid->Name));
-      }
-
-      Hob.Raw = GetFirstGuidHob (&gEfiSmmPeiSmramMemoryReserveGuid);
-      DescriptorBlock = GET_GUID_HOB_DATA (Hob.Raw);
-      DEBUG ((DEBUG_INFO, "SMM PEI SMRAM Memory Reserved HOB - Updated\n"));
-      for (Index = 0; Index < DescriptorBlock->NumberOfSmmReservedRegions; Index++) {
-        DEBUG((DEBUG_INFO, "  SMRAM Descriptor[%02x]: Start=%016lx  Size=%016lx  State=%02x\n",
-          Index,
-          DescriptorBlock->Descriptor[Index].PhysicalStart,
-          DescriptorBlock->Descriptor[Index].PhysicalSize,
-          DescriptorBlock->Descriptor[Index].RegionState
-          ));
-      }
-    }
-  }
 
   //
   // Initialize SmbusPolicy PPI
@@ -1118,45 +954,6 @@ PlatformEarlyInitEntry (
   return Status;
 }
 
-/**
-
-  Return the mainblockcompact Fv.
-
-  @param FvNumber    Our enumeration of the firmware volumes we care about.
-
-  @param FvAddress  Base Address of the memory containing the firmware volume
-
-  @retval EFI_SUCCESS
-  @retval EFI_NOT_FOUND
-
-**/
-EFI_STATUS
-EFIAPI
-FindFv (
-  IN EFI_PEI_FIND_FV_PPI          *This,
-  IN CONST EFI_PEI_SERVICES             **PeiServices,
-  IN OUT UINT8                    *FvNumber,
-  OUT EFI_FIRMWARE_VOLUME_HEADER  **FVAddress
-  )
-{
-	//
-  // At present, we only have one Fv to search
-  //
-  if (*FvNumber == 0) {
-    *FvNumber = 1;
-    *FVAddress = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FixedPcdGet32 (PcdFlashFvMainBase);
-    return EFI_SUCCESS;
-  }
-  else if (*FvNumber == 1) {
-    *FvNumber = 2;
-    *FVAddress = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FixedPcdGet32 (PcdFlashFvRecovery2Base);
-    return EFI_SUCCESS;
-  }
-  else { // Not the one Fv we care about
-    return EFI_NOT_FOUND;
-  }
-}
-
 EFI_STATUS
 EFIAPI
 CpuOnlyReset (

+ 3 - 18
Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.h

@@ -1,10 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2016, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
-                                                                                   

+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -30,7 +28,7 @@ Abstract:
 #define _EFI_PLATFORM_EARLY_INIT_H_
 
 #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x
-#include <FrameworkPei.h>
+#include <PiPei.h>
 #include "PlatformBaseAddresses.h"
 #include "PchAccess.h"
 #include "VlvAccess.h"
@@ -43,7 +41,6 @@ Abstract:
 #include <Guid/PlatformInfo.h>
 #include <Guid/SetupVariable.h>
 #include <Ppi/AtaController.h>
-#include <Ppi/FindFv.h>
 #include <Ppi/BootInRecoveryMode.h>
 #include <Ppi/ReadOnlyVariable2.h>
 #include <Ppi/Capsule.h>
@@ -60,7 +57,6 @@ Abstract:
 
 #include <IndustryStandard/Pci22.h>
 #include <Ppi/Speaker.h>
-#include <Guid/FirmwareFileSystem.h>
 #include <Guid/MemoryTypeInformation.h>
 #include <Ppi/Cache.h>
 #include <Ppi/Smbus.h>
@@ -73,12 +69,10 @@ Abstract:
 #include <Guid/GlobalVariable.h>
 #include <Ppi/RecoveryModule.h>
 #include <Ppi/DeviceRecoveryModule.h>
-#include <Guid/Capsule.h>
 #include <Guid/RecoveryDevice.h>
 #include <Ppi/MasterBootMode.h>
 #include <Guid/PlatformCpuInfo.h>
 #include <Guid/OsSelection.h>
-#include <Guid/SmramMemoryReserve.h>
 #include <Register/Msr.h>
 
 #define SMC_LAN_ON       0x46
@@ -1379,15 +1373,6 @@ CheckIfJumperSetForRecovery(
   VOID
   );
 
-EFI_STATUS
-EFIAPI    
-FindFv (
-  IN EFI_PEI_FIND_FV_PPI              *This,
-  IN CONST EFI_PEI_SERVICES             **PeiServices,
-  IN OUT UINT8                    *FvNumber,
-  OUT EFI_FIRMWARE_VOLUME_HEADER  **FVAddress
-  );
-
 BOOLEAN
 IsA16Inverted (
   );

+ 10 - 19
Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf

@@ -1,10 +1,8 @@
 #
 #
-# Copyright (c)  1999  - 2016, Intel Corporation. All rights reserved
-#                                                                                  
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#                                                                                  
+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
 #
+# SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #  Module Name:
 #
@@ -17,13 +15,13 @@
 #--*/
 
 [defines]
-INF_VERSION 				   = 0x00010005
-BASE_NAME					   = PlatformEarlyInit
-FILE_GUID					   = 0A5EA2E1-BE0B-44a0-A775-F429C9A018A0
-MODULE_TYPE 				   = PEIM
-VERSION_STRING				   = 1.0
-PI_SPECIFICATION_VERSION	   = 0x0001000A
-ENTRY_POINT 				   = PlatformEarlyInitEntry
+INF_VERSION               = 0x00010005
+BASE_NAME                 = PlatformEarlyInit
+FILE_GUID                 = 0A5EA2E1-BE0B-44a0-A775-F429C9A018A0
+MODULE_TYPE               = PEIM
+VERSION_STRING            = 1.0
+PI_SPECIFICATION_VERSION  = 0x0001000A
+ENTRY_POINT               = PlatformEarlyInitEntry
 
 [sources.common]
   BootMode.c
@@ -44,19 +42,15 @@ ENTRY_POINT 				   = PlatformEarlyInitEntry
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
   Vlv2SocBinPkg/Vlv2SocBinPkg.dec
   UefiCpuPkg/UefiCpuPkg.dec
-  Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
 
 [LibraryClasses]
   PeimEntryPoint
   DebugLib
   HobLib
   IoLib
-#  PeiKscLib
   MultiPlatformLib
   PcdLib
   PchPlatformLib
@@ -71,14 +65,12 @@ ENTRY_POINT 				   = PlatformEarlyInitEntry
   gEfiPeiResetPpiGuid
   gEfiEndOfPeiSignalPpiGuid
   gPeiSmbusPolicyPpiGuid
-  gEfiFindFvPpiGuid
   gPeiCapsulePpiGuid
   gEfiPeiBootInRecoveryModePpiGuid
   gEfiPeiRecoveryModulePpiGuid
   gEfiPeiDeviceRecoveryModulePpiGuid
   gPeiCachePpiGuid
   gEfiPeiMasterBootModePpiGuid
-  gEfiPeiSmbusPpiGuid
   gPchInitPpiGuid
   gPchUsbPolicyPpiGuid
 
@@ -96,7 +88,6 @@ ENTRY_POINT 				   = PlatformEarlyInitEntry
   gEfiNormalSetupGuid
   gEfiMemoryTypeInformationGuid
   gOsSelectionVariableGuid
-  gEfiSmmPeiSmramMemoryReserveGuid
 
 [Pcd.common]
   gPlatformModuleTokenSpaceGuid.PcdFlashFvMainBase
@@ -111,7 +102,7 @@ ENTRY_POINT 				   = PlatformEarlyInitEntry
 
 [Pcd]
   gEfiVLVTokenSpaceGuid.PcdMeasuredBootEnable
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState
+  gPlatformModuleTokenSpaceGuid.PcdBootState
 
 [Depex]
   gEfiPeiReadOnlyVariable2PpiGuid  AND gPeiCachePpiGuid

+ 3 - 8
Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/CommonHeader.h

@@ -1,10 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
-                                                                                   

+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
@@ -13,18 +11,15 @@
 
 
 
-#include <FrameworkPei.h>
+#include <PiPei.h>
 
 #include <IndustryStandard/SmBus.h>
 #include <IndustryStandard/Pci22.h>
 #include <Ppi/AtaController.h>
-#include <Guid/Capsule.h>
-#include <Ppi/Cache.h>
 #include <Ppi/MasterBootMode.h>
 #include <Guid/MemoryTypeInformation.h>
 #include <Guid/RecoveryDevice.h>
 #include <Ppi/ReadOnlyVariable2.h>
-#include <Ppi/FvLoadFile.h>
 #include <Ppi/DeviceRecoveryModule.h>
 #include <Ppi/Capsule.h>
 #include <Ppi/Reset.h>

+ 2 - 6
Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/MemoryCallback.c

@@ -1,11 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
   This file includes a memory call back function notified when MRC is done,
   following action is performed in this file,
@@ -21,7 +18,6 @@
 
 #include "CommonHeader.h"
 #include "Platform.h"
-#include <Ppi/Cache.h>
 #include <Library/BaseCryptLib.h>
 #include <Library/PciLib.h>
 #include "VlvAccess.h"

+ 2 - 14
Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c

@@ -1,11 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -816,15 +813,6 @@ PeiInitPlatform (
     sizeof (EFI_PLATFORM_INFO_HOB)
     );
 
-
-#ifdef FTPM_ENABLE
-  Status = FtpmPolicyInit(PeiServices, &SystemConfiguration);
-  if (EFI_ERROR (Status)) {
-    DEBUG((EFI_D_ERROR, "fTPM init failed.\n"));
-  }
-#endif
-
-
   //
   // Set the new boot mode for MRC
   //

+ 3 - 8
Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf

@@ -1,9 +1,9 @@
 #
 #
-# Copyright (c)  1999  - 2018, Intel Corporation. All rights reserved
-#                                                                                  
+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
+#
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-#                                                                                  
+#
 #
 # This PEIM includes 3 parts, pre memory initialization, MRC
 #  wrapper and post memory initialization.
@@ -63,9 +63,7 @@
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  Vlv2SocBinPkg/Vlv2SocBinPkg.dec
   UefiCpuPkg/UefiCpuPkg.dec
   CryptoPkg/CryptoPkg.dec
 
@@ -89,14 +87,11 @@
   gEfiPeiReadOnlyVariable2PpiGuid
   gEfiPeiResetPpiGuid
   gEfiEndOfPeiSignalPpiGuid
-  gEfiFindFvPpiGuid
   gPeiCapsulePpiGuid
   gEfiPeiBootInRecoveryModePpiGuid
   gEfiPeiRecoveryModulePpiGuid
   gEfiPeiDeviceRecoveryModulePpiGuid
-  gPeiCachePpiGuid
   gEfiPeiMasterBootModePpiGuid
-  gEfiPeiSmbusPpiGuid
   gPeiMfgMemoryTestPpiGuid
   gPeiSha256HashPpiGuid
   gVlvMmioPolicyPpiGuid

+ 1 - 15
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec

@@ -2,14 +2,9 @@
 # Platform Package
 #
 # This package provides platform specific modules.
-# Copyright (c) 2009  - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009  - 2019, Intel Corporation. All rights reserved.<BR>
 #
-
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-
-#
-
-#
 #
 #**/
 
@@ -66,9 +61,6 @@
   gEfiActiveBiosProtocolGuid              = { 0xebbe2d1b, 0x1647, 0x4bda, { 0xab, 0x9a, 0x78, 0x63, 0xe3, 0x96, 0xd4, 0x1a } }
   gEfiPlatformCpuProtocolGuid             = { 0xbd26cdc9, 0xa092, 0x462a, { 0x87, 0x7a, 0x5a, 0xb6, 0xad, 0xce, 0x48, 0x12 } }
   gDxePchPlatformPolicyProtocolGuid       = { 0x4b0165a9, 0x61d6, 0x4e23, { 0xa0, 0xb5, 0x3e, 0xc7, 0x9c, 0x2e, 0x30, 0xd5 } }
-  gEfiTpmMpDriverProtocolGuid             = { 0xde161cfe, 0x1e60, 0x42a1, { 0x8c, 0xc3, 0xee, 0x7e, 0xf0, 0x73, 0x52, 0x12 } }
-  gEfiLpcWpce791PolicyProtocolGuid        = { 0xab2bee2f, 0xc1a6, 0x4399, { 0x85, 0x3d, 0xc0, 0x7c, 0x77, 0x4f, 0xfd, 0x0d } }
-  gUsbPolicyGuid                          = { 0xf617b358, 0x12cf, 0x414a, { 0xa0, 0x69, 0x60, 0x67, 0x7b, 0xda, 0x13, 0xb4 } }
   gEfiSpeakerInterfaceProtocolGuid        = { 0x400b4476, 0x3081, 0x11d6, { 0x87, 0xed, 0x00, 0x06, 0x29, 0x45, 0xc3, 0xb9 } }
   gDxeVlvPlatformPolicyGuid               = { 0x5bab88ba, 0xe0e2, 0x4674, { 0xb6, 0xad, 0xb8, 0x12, 0xf6, 0x88, 0x1c, 0xd6 } }
   gEfiSmbiosSlotPopulationGuid            = { 0xef7bf7d6, 0xf8ff, 0x4a76, { 0x82, 0x47, 0xc0, 0xd0, 0xd1, 0xcc, 0x49, 0xc0 } }
@@ -80,9 +72,6 @@
   gEfiPlatformIdeInitProtocolGuid         = { 0x377c66a3, 0x8fe7, 0x4ee8, { 0x85, 0xb8, 0xf1, 0xa2, 0x82, 0x56, 0x9e, 0x3b } }
   gEfiPciPlatformProtocolGuid             = { 0x07d75280, 0x27d4, 0x4d69, { 0x90, 0xd0, 0x56, 0x43, 0xe2, 0x38, 0xb3, 0x41 } }
   gEnhancedSpeedstepProtocolGuid          = { 0x91a1ddcf, 0x5374, 0x4939, { 0x89, 0x51, 0xd7, 0x29, 0x3f, 0x1a, 0x78, 0x6f } }
-  gEfiAcpiSupportProtocolGuid             = { 0xdbff9d55, 0x89b7, 0x46da, { 0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } }
-  gEfiAcpiS3SaveProtocolGuid              = { 0x125f2de1, 0xfb85, 0x440c, { 0xa5, 0x4c, 0x4d, 0x99, 0x35, 0x8a, 0x8d, 0x38 } }
-  gEfiCpuIoProtocolGuid                   = { 0xB0732526, 0x38C8, 0x4b40, { 0x88, 0x77, 0x61, 0xC7, 0xB0, 0x6A, 0xAC, 0x45 } }
   gPlatformGOPPolicyGuid                  = { 0xec2e931b, 0x3281, 0x48a5, { 0x81, 0x07, 0xdf, 0x8a, 0x8b, 0xed, 0x3c, 0x5d } }
   gEfiGopDisplayBrightnessProtocolGuid    = { 0x6ff23f1d, 0x877c, 0x4b1b, { 0x93, 0xfc, 0xf1, 0x42, 0xb2, 0xee, 0xa6, 0xa7 } }
   gEfiUsbKeyboardConnectGuid              = { 0xad9c4381, 0x1ede, 0x430c, { 0x8d, 0x42, 0x23, 0x76, 0x7c, 0x46, 0x5d, 0x52 } }
@@ -130,9 +119,6 @@
 
   gEfiPchTokenSpaceGuid.PcdPchAcpiIoPortBaseAddress|0x400|UINT16|0x0000000B
 
-   ## FFS filename to find the shell application.
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0xB7, 0xD6, 0x7A, 0xC5, 0x15, 0x05, 0xA8, 0x40, 0x9D, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4E, 0x37 }|VOID*|0x40000004
-
   gEfiIchTokenSpaceGuid.PcdPeiIchUhciControllerIoPortBaseAddress|0x4000|UINT16|0x30000017
   gEfiIchTokenSpaceGuid.PcdPeiIchEhciControllerMemoryBaseAddress|0xFC000000|UINT32|0x30000019
 

+ 82 - 172
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf

@@ -9,45 +9,34 @@
 #**/
 
 [Defines]
-DEFINE FLASH_BASE       = 0xFFC00000     #The base address of the 4Mb FLASH Device.
-DEFINE FLASH_SIZE       = 0x00400000     #The flash size in bytes of the 4Mb FLASH Device.
+DEFINE FLASH_BASE       = 0xFF800000     #The base address of the 4Mb FLASH Device.
+DEFINE FLASH_SIZE       = 0x00800000     #The flash size in bytes of the 4Mb FLASH Device.
 DEFINE FLASH_BLOCK_SIZE = 0x1000        #The block size in bytes of the 4Mb FLASH Device.
-DEFINE FLASH_NUM_BLOCKS = 0x400           #The number of blocks in 4Mb FLASH Device.
+DEFINE FLASH_NUM_BLOCKS = 0x800           #The number of blocks in 4Mb FLASH Device.
 DEFINE FLASH_AREA_BASE_ADDRESS                                = 0xFF800000
 DEFINE FLASH_AREA_SIZE                                        = 0x00800000
 
-DEFINE FLASH_REGION_VLVMICROCODE_OFFSET                       = 0x00000000
+DEFINE FLASH_REGION_VLVMICROCODE_OFFSET                       = 0x00400000
 DEFINE FLASH_REGION_VLVMICROCODE_SIZE                         = 0x00040000
 DEFINE FLASH_REGION_VLVMICROCODE_BASE                         = 0xFFC00000
 
-DEFINE FLASH_REGION_VPD_OFFSET                                = 0x00040000
+DEFINE FLASH_REGION_VPD_OFFSET                                = 0x00440000
 DEFINE FLASH_REGION_VPD_SIZE                                  = 0x0003E000
 
-DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET = 0x0007E000
+DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_OFFSET = 0x0047E000
 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE   = 0x00002000
 
 
-DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET   = 0x00080000
+DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET   = 0x00480000
 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE     = 0x00040000
 
-!if $(MINNOW2_FSP_BUILD) == TRUE
-DEFINE FLASH_REGION_FSPBIN_OFFSET                             = 0x000C0000
-DEFINE FLASH_REGION_FSPBIN_SIZE                               = 0x00048000
-DEFINE FLASH_REGION_FSPBIN_BASE                               = 0xFFCC0000
-
-DEFINE FLASH_REGION_AZALIABIN_OFFSET                          = 0x00108000
-DEFINE FLASH_REGION_AZALIABIN_SIZE                            = 0x00008000
-DEFINE FLASH_REGION_AZALIABIN_BASE                            = 0xFFD08000
-
-!endif
-
-DEFINE FLASH_REGION_FVMAIN_OFFSET                             = 0x00110000
+DEFINE FLASH_REGION_FVMAIN_OFFSET                             = 0x00510000
 DEFINE FLASH_REGION_FVMAIN_SIZE                               = 0x00210000
 
-DEFINE FLASH_REGION_FV_RECOVERY2_OFFSET                       = 0x00320000
+DEFINE FLASH_REGION_FV_RECOVERY2_OFFSET                       = 0x00720000
 DEFINE FLASH_REGION_FV_RECOVERY2_SIZE                         = 0x00070000
 
-DEFINE FLASH_REGION_FV_RECOVERY_OFFSET                        = 0x00390000
+DEFINE FLASH_REGION_FV_RECOVERY_OFFSET                        = 0x00790000
 DEFINE FLASH_REGION_FV_RECOVERY_SIZE                          = 0x00070000
 
 ################################################################################
@@ -79,17 +68,6 @@ SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize                   = $(FLASH_A
 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress = $(FLASH_REGION_VLVMICROCODE_BASE) + 0x60
 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize = $(FLASH_REGION_VLVMICROCODE_SIZE) - 0x60
 
-!if $(MINNOW2_FSP_BUILD) == TRUE
-# put below PCD value setting into dsc file
-#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress                = $(FLASH_REGION_VLVMICROCODE_BASE)
-#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize             = $(FLASH_REGION_VLVMICROCODE_SIZE)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset                    = 0x60
-#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress                   = $(FLASH_AREA_BASE_ADDRESS)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize                      = $(FLASH_AREA_SIZE)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase                          = $(FLASH_REGION_FSPBIN_BASE)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspSize                          = $(FLASH_REGION_FSPBIN_SIZE)
-
-!endif
 ################################################################################
 #
 # Following are lists of FD Region layout which correspond to the locations of different
@@ -106,6 +84,13 @@ SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize = $(FLASH_REGION_VL
 # Fv Size can be adjusted; FVMAIN_COMPACT can be reduced to 0x120000, and FV_RECOVERY can be enlarged to 0x80000
 #
 ################################################################################
+
+  #
+  # IFWI Header
+  #
+0x0000|0x1000
+FILE=Vlv2TbltDevicePkg/Stitch/IFWIHeader/IFWI_HEADER.bin
+
   #
   # CPU Microcodes
   #
@@ -173,18 +158,6 @@ DATA = {
 $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET)|$(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE)
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
 
-!if $(MINNOW2_FSP_BUILD) == TRUE
-
-  $(FLASH_REGION_FSPBIN_OFFSET)|$(FLASH_REGION_FSPBIN_SIZE)
-  gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase|gFspWrapperTokenSpaceGuid.PcdFlashFvFspSize
-  FILE = Vlv2SocBinPkg/FspBinary/FvFsp.bin
-
-
-  $(FLASH_REGION_AZALIABIN_OFFSET)|$(FLASH_REGION_AZALIABIN_SIZE)
-  FILE = Vlv2TbltDevicePkg/FspAzaliaConfigData/AzaliaConfig.bin
-
-!endif
-
   #
   # Main Block
   #
@@ -258,7 +231,7 @@ READ_STATUS        = TRUE
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
-INF  RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf
+INF  RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf
 INF  MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
 INF  MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf
 INF  MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf
@@ -299,28 +272,22 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
 
 
 
-INF $(PLATFORM_PACKAGE)/PlatformInitPei/PlatformInitPei.inf
+INF Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf
 
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArpDisabled.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAccess.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmControl.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArpDisabled.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAccess.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmControl.inf
 INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MpS3.inf
-!endif
+INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf
 
-# INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PiSmmCommunicationPei.inf
 !if $(TPM_ENABLED) == TRUE
 INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
 INF SecurityPkg/Tcg/TcgPei/TcgPei.inf
 INF SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf
 !endif
-!if $(FTPM_ENABLE) == TRUE
-INF  SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf #use PCD config
-!endif
 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
 
 !if $(ACPI50_ENABLE) == TRUE
@@ -359,31 +326,15 @@ READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270091
 
-
-!if $(MINNOW2_FSP_BUILD) == TRUE
-INF IntelFspWrapperPkg/FspWrapperSecCore/FspWrapperSecCore.inf
-!else
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf
-!endif
-
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf
 INF MdeModulePkg/Core/Pei/PeiMain.inf
-!if $(MINNOW2_FSP_BUILD) == TRUE
-INF Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.inf
-INF IntelFspWrapperPkg/FspInitPei/FspInitPei.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf
 INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
 INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
 
-INF $(PLATFORM_PACKAGE)/PlatformPei/PlatformPei.inf
-
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf
-!endif
+INF Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf
 
-!if $(FTPM_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.inf
-!endif
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf
 
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
   INF  SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf
@@ -397,12 +348,10 @@ INF  MdeModulePkg/Universal/CapsulePei/CapsuleX64.inf
 !endif
 !endif
 
-!if $(MINNOW2_FSP_BUILD) == FALSE
 !if $(PCIESC_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyInitPeim.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyInitPeim.inf
 !endif
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.inf
 
 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
 
@@ -440,10 +389,6 @@ FILE FREEFORM = C3E36D09-8294-4b97-A857-D5288FE33E28 {
   # EDK II Related Platform codes
   #
 
-  !if $(MINNOW2_FSP_BUILD) == TRUE
-  INF IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.inf
-  !endif
-
 INF MdeModulePkg/Core/Dxe/DxeMain.inf
 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
 !if $(ACPI50_ENABLE) == TRUE
@@ -452,14 +397,14 @@ INF  MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerform
 !endif
 
 
-INF IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf
 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
 INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
 INF UefiCpuPkg/CpuDxe/CpuDxe.inf
-INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
+INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf
+INF MdeModulePkg/Universal/Metronome/Metronome.inf
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
 !if $(ARCH) == IA32
 INF USE=IA32 MdeModulePkg/Logo/Logo.inf
@@ -469,13 +414,12 @@ INF USE=X64 MdeModulePkg/Logo/Logo.inf
 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
-INF IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
 
 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
-INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbSmm.inf
+INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf
 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm.inf
 !if $(SECURE_BOOT_ENABLE)
 INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
 !endif
@@ -485,89 +429,62 @@ INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
 INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbRuntimeDxe.inf
+INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf
 
 
-INF $(PLATFORM_PACKAGE)/PlatformSetupDxe/PlatformSetupDxe.inf
+INF Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
 
 !if $(DATAHUB_ENABLE) == TRUE
 INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
 !endif
-INF IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.inf
 INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf
 
   #
   # EDK II Related Silicon codes
   #
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3SupportDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3SupportDxe.inf
 
-!if $(USE_HPET_TIMER) == TRUE
 INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
-!else
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmartTimer.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmControl.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmControl.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/IntelPchLegacyInterrupt.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchReset.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchReset.inf
 
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 !if $(PCIESC_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSmm.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSmm.inf
 !endif
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRuntime.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPolicyInitDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWriteProtect.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PciHostBridge.inf
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDxe.inf
-!else
-INF IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf
-INF Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf
-!endif
-!if $(MINNOW2_FSP_BUILD) == FALSE
-  !if $(SEC_ENABLE) == TRUE
-  INF  RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/HeciDrv.inf
-  INF  RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SeCPolicyInitDxe.inf
-  !endif
-!endif
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRuntime.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPolicyInitDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWriteProtect.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PciHostBridge.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDxe.inf
 !if $(TPM_ENABLED) == TRUE
 INF SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf
 INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
 INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
 !endif
-!if $(FTPM_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/Tpm2DeviceSeCPei.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Tpm2DeviceSeCDxe.inf
-INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
-INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/FtpmSmm.inf
-!endif
 
 #
 # EDK II Related Platform codes
 #
-INF $(PLATFORM_PACKAGE)/PlatformSmm/PlatformSmm.inf
-INF $(PLATFORM_PACKAGE)/PlatformInfoDxe/PlatformInfoDxe.inf
-INF $(PLATFORM_PACKAGE)/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf
-INF $(PLATFORM_PACKAGE)/PlatformDxe/PlatformDxe.inf
-INF $(PLATFORM_PACKAGE)/PciPlatform/PciPlatform.inf
-INF $(PLATFORM_PACKAGE)/SaveMemoryConfig/SaveMemoryConfig.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PlatformCpuPolicy.inf
-INF $(PLATFORM_PACKAGE)/PpmPolicy/PpmPolicy.inf
-INF $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf
+INF Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf
+INF Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf
+INF Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf
+INF Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf
+INF Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf
+INF Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PlatformCpuPolicy.inf
+INF Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf
 !if $(GOP_DRIVER_ENABLE) == TRUE
- INF $(PLATFORM_PACKAGE)/PlatformGopPolicy/PlatformGopPolicy.inf
+ INF Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf
  FILE DRIVER = FF0C8745-3270-4439-B74F-3E45F8C77064 {
   SECTION DXE_DEPEX_EXP = {gPlatformGOPPolicyGuid}
   SECTION PE32 = Vlv2SocBinPkg/GOP/7.2.1011/RELEASE_VS2008x86/$(DXE_ARCHITECTURE)/IntelGopDriver.efi
@@ -575,7 +492,7 @@ INF $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf
 }
 !endif
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf
   #
   # SMM
   #
@@ -586,25 +503,22 @@ INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
 INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
 INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
 INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
-INF $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.inf
 
-#
-# Remove the following two SMM binary modules that prevent platform from booting to UEFI Shell
-#
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PowerManagement2.inf
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/DigitalThermalSensor.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PowerManagement2.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/DigitalThermalSensor.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/GraphicDxeInitSmm.inf
 
   #
   # ACPI
   #
 INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
-INF $(PLATFORM_PACKAGE)/BootScriptSaveDxe/BootScriptSaveDxe.inf
+INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
 INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
 INF RuleOverride = ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf
 
-INF RuleOverride = ACPITABLE $(PLATFORM_RC_PACKAGE)/AcpiTablesPCAT/AcpiTables.inf
+INF RuleOverride = ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf
 
-INF $(PLATFORM_PACKAGE)/AcpiPlatform/AcpiPlatform.inf
+INF Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
 
 INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
 
@@ -613,26 +527,17 @@ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourc
   #
 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf
 
 
 #
 # ISA
 #
-INF $(PLATFORM_PACKAGE)/Wpce791/Wpce791.inf
-INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
-INF IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf
+INF Vlv2TbltDevicePkg/PcuSio/PcuSio.inf
 !if $(SOURCE_DEBUG_ENABLE) != TRUE
 INF  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
 !endif
-#INF IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
-#INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
 
-#
-# SDIO
-#
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MmcHost.inf
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MmcMediaDevice.inf
 #
 # IDE/SCSI/AHCI
 #
@@ -642,7 +547,7 @@ INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
 
 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
 !if $(SATA_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 #
 
 #
@@ -659,7 +564,6 @@ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
 INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
 INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
@@ -682,9 +586,9 @@ INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
   # SMBIOS
   #
 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-INF $(PLATFORM_PACKAGE)/SmBiosMiscDxe/SmBiosMiscDxe.inf
+INF Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMemory.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMemory.inf
 
 
 #
@@ -719,8 +623,14 @@ FILE FREEFORM = 878AC2CC-5343-46F2-B563-51F89DAF56BA {
 !if $(NETWORK_ENABLE) == TRUE
   FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
     SECTION PE32 = Vlv2SocBinPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/RtkUndiDxe.efi
-    SECTION UI = "UNDI"
+    SECTION UI = "RtkUndiDxe"
   }
+  !if $(DXE_ARCHITECTURE) == "X64"
+    FILE DRIVER = 7C7467E9-8BB3-4BF1-8694-6FED7D25D13E {
+      SECTION PE32 = Vlv2SocBinPkg/UNDI/I211PcieUndiDxe/$(DXE_ARCHITECTURE)/E7006X3.EFI
+      SECTION UI = "E7006X3"
+    }
+  !endif
 !endif
 
 !if $(CAPSULE_ENABLE)
@@ -908,7 +818,7 @@ READ_LOCK_STATUS   = TRUE
 
 [Rule.Common.UEFI_DRIVER.NATIVE_BINARY]
   FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX DXE_DEPEX Optional      $(WORKSPACE)/$(PLATFORM_PACKAGE)/IntelGopDepex/IntelGopDriver.depex
+    DXE_DEPEX DXE_DEPEX Optional      $(WORKSPACE)/Vlv2TbltDevicePkg/IntelGopDepex/IntelGopDriver.depex
     PE32      PE32                    |.efi
     UI        STRING="$(MODULE_NAME)" Optional
     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)

+ 2 - 19
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc

@@ -1,11 +1,9 @@
 #/** @file
 # platform configuration file.
 #
-# Copyright (c) 2012  - 2016, Intel Corporation. All rights reserved.<BR>
-#                                                                                  

+# Copyright (c) 2012  - 2019, Intel Corporation. All rights reserved.<BR>
+#
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-
-#                                                                                  

 #
 #**/
 
@@ -13,12 +11,6 @@
 # TRUE is ENABLE. FASLE is DISABLE.
 #
 
-#
-# FSP selection
-#
-DEFINE MINNOW2_FSP_BUILD = FALSE
-
-
 DEFINE SCSI_ENABLE = TRUE
 
 
@@ -31,14 +23,6 @@ DEFINE CLKGEN_CONFIG_EXTRA_ENABLE=TRUE
 # Feature selection
 #
 
-#
-# Select system timer which is used to produce Timer Arch Protocol:
-# TRUE  - HPET timer is used.
-# FALSE - 8254 timer is used.
-#
-DEFINE USE_HPET_TIMER = TRUE
-
-
 #
 # Feature selection
 #
@@ -65,7 +49,6 @@ DEFINE MICOCODE_CAPSULE_ENABLE = TRUE
 
 DEFINE GOP_DRIVER_ENABLE = TRUE
 DEFINE DATAHUB_ENABLE = TRUE
-DEFINE DATAHUB_STATUS_CODE_ENABLE = TRUE
 DEFINE USB_ENABLE = TRUE
 
 DEFINE ISA_SERIAL_STATUS_CODE_ENABLE = TRUE

+ 65 - 169
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf

@@ -30,17 +30,6 @@ DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE   = 0x00002000
 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET   = 0x00080000
 DEFINE FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE     = 0x00040000
 
-!if $(MINNOW2_FSP_BUILD) == TRUE
-DEFINE FLASH_REGION_FSPBIN_OFFSET                             = 0x000C0000
-DEFINE FLASH_REGION_FSPBIN_SIZE                               = 0x00048000
-DEFINE FLASH_REGION_FSPBIN_BASE                               = 0xFFCC0000
-
-DEFINE FLASH_REGION_AZALIABIN_OFFSET                          = 0x00108000
-DEFINE FLASH_REGION_AZALIABIN_SIZE                            = 0x00008000
-DEFINE FLASH_REGION_AZALIABIN_BASE                            = 0xFFD08000
-
-!endif
-
 DEFINE FLASH_REGION_FVMAIN_OFFSET                             = 0x00110000
 DEFINE FLASH_REGION_FVMAIN_SIZE                               = 0x00215000
 
@@ -79,17 +68,6 @@ SET gPlatformModuleTokenSpaceGuid.PcdFlashAreaSize                   = $(FLASH_A
 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress = $(FLASH_REGION_VLVMICROCODE_BASE) + 0x60
 SET gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize = $(FLASH_REGION_VLVMICROCODE_SIZE) - 0x60
 
-!if $(MINNOW2_FSP_BUILD) == TRUE
-# put below PCD value setting into dsc file
-#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress                = $(FLASH_REGION_VLVMICROCODE_BASE)
-#SET gFspWrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize             = $(FLASH_REGION_VLVMICROCODE_SIZE)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashMicroCodeOffset                    = 0x60
-#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheAddress                   = $(FLASH_AREA_BASE_ADDRESS)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashCodeCacheSize                      = $(FLASH_AREA_SIZE)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase                          = $(FLASH_REGION_FSPBIN_BASE)
-#SET gFspWrapperTokenSpaceGuid.PcdFlashFvFspSize                          = $(FLASH_REGION_FSPBIN_SIZE)
-
-!endif
 ################################################################################
 #
 # Following are lists of FD Region layout which correspond to the locations of different
@@ -129,18 +107,6 @@ $(FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_OFFSET)|$(FLASH_REGION_NVSTORAGE
 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
 FILE = Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageFtwSpare.bin
 
-!if $(MINNOW2_FSP_BUILD) == TRUE
-
-  $(FLASH_REGION_FSPBIN_OFFSET)|$(FLASH_REGION_FSPBIN_SIZE)
-  gFspWrapperTokenSpaceGuid.PcdFlashFvFspBase|gFspWrapperTokenSpaceGuid.PcdFlashFvFspSize
-  FILE = Vlv2SocBinPkg/FspBinary/FvFsp.bin
-
-
-  $(FLASH_REGION_AZALIABIN_OFFSET)|$(FLASH_REGION_AZALIABIN_SIZE)
-  FILE = Vlv2TbltDevicePkg/FspAzaliaConfigData/AzaliaConfig.bin
-
-!endif
-
   #
   # Main Block
   #
@@ -214,7 +180,7 @@ READ_STATUS        = TRUE
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
-INF  RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf
+INF  RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchUsb.inf
 INF  MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
 INF  MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf
 INF  MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf
@@ -253,30 +219,21 @@ READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
 
-
-
-INF $(PLATFORM_PACKAGE)/PlatformInitPei/PlatformInitPei.inf
-
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArpDisabled.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAccess.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmControl.inf
+INF Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSmbusArpDisabled.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/VlvInitPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchInitPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchSpiPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmAccess.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PeiSmmControl.inf
 INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MpS3.inf
-!endif
+INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf
 
-# INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PiSmmCommunicationPei.inf
 !if $(TPM_ENABLED) == TRUE
 INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
 INF SecurityPkg/Tcg/TcgPei/TcgPei.inf
 INF SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf
 !endif
-!if $(FTPM_ENABLE) == TRUE
-INF  SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf #use PCD config
-!endif
 INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
 
 !if $(ACPI50_ENABLE) == TRUE
@@ -315,31 +272,15 @@ READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270091
 
-
-!if $(MINNOW2_FSP_BUILD) == TRUE
-INF IntelFspWrapperPkg/FspWrapperSecCore/FspWrapperSecCore.inf
-!else
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf
-!endif
-
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SecCore.inf
 INF MdeModulePkg/Core/Pei/PeiMain.inf
-!if $(MINNOW2_FSP_BUILD) == TRUE
-INF Vlv2TbltDevicePkg/FspSupport/BootModePei/BootModePei.inf
-INF IntelFspWrapperPkg/FspInitPei/FspInitPei.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/CpuPeim.inf
 INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
 INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
 
-INF $(PLATFORM_PACKAGE)/PlatformPei/PlatformPei.inf
+INF Vlv2TbltDevicePkg/PlatformPei/PlatformPei.inf
 
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf
-!endif
-
-!if $(FTPM_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.inf
-!endif
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/SeCUma.inf
 
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
   INF  SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf
@@ -353,12 +294,10 @@ INF  MdeModulePkg/Universal/CapsulePei/CapsuleX64.inf
 !endif
 !endif
 
-!if $(MINNOW2_FSP_BUILD) == FALSE
 !if $(PCIESC_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyInitPeim.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/PchEarlyInitPeim.inf
 !endif
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/IA32/MemoryInit.inf
 
 INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
 
@@ -396,10 +335,6 @@ FILE FREEFORM = C3E36D09-8294-4b97-A857-D5288FE33E28 {
   # EDK II Related Platform codes
   #
 
-  !if $(MINNOW2_FSP_BUILD) == TRUE
-  INF IntelFspWrapperPkg/FspNotifyDxe/FspNotifyDxe.inf
-  !endif
-
 INF MdeModulePkg/Core/Dxe/DxeMain.inf
 INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
 !if $(ACPI50_ENABLE) == TRUE
@@ -408,14 +343,14 @@ INF  MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerform
 !endif
 
 
-INF IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf
 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
 INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
 INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
 INF UefiCpuPkg/CpuDxe/CpuDxe.inf
-INF $(PLATFORM_PACKAGE)/Metronome/Metronome.inf
+INF UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf
+INF MdeModulePkg/Universal/Metronome/Metronome.inf
 INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
 !if $(ARCH) == IA32
 INF USE=IA32 MdeModulePkg/Logo/Logo.inf
@@ -425,13 +360,12 @@ INF USE=X64 MdeModulePkg/Logo/Logo.inf
 INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
 INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
-INF IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
 
 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
 INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
-INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbSmm.inf
+INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf
 INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiSmm.inf
 !if $(SECURE_BOOT_ENABLE)
 INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
 !endif
@@ -441,89 +375,62 @@ INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
 INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
 INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-INF $(PLATFORM_PACKAGE)/FvbRuntimeDxe/FvbRuntimeDxe.inf
+INF Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf
 
 
-INF $(PLATFORM_PACKAGE)/PlatformSetupDxe/PlatformSetupDxe.inf
+INF Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
 
 !if $(DATAHUB_ENABLE) == TRUE
 INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
 !endif
-INF IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.inf
 INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Dptf.inf
 
   #
   # EDK II Related Silicon codes
   #
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3SupportDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchS3SupportDxe.inf
 
-!if $(USE_HPET_TIMER) == TRUE
 INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
-!else
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmartTimer.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmControl.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmControl.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmbusDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/IntelPchLegacyInterrupt.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchReset.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchReset.inf
 
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
-!endif
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchInitSmm.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSmiDispatcher.inf
 !if $(PCIESC_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSmm.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPcieSmm.inf
 !endif
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRuntime.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPolicyInitDxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWriteProtect.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PciHostBridge.inf
-!if $(MINNOW2_FSP_BUILD) == FALSE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDxe.inf
-!else
-INF IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf
-INF Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf
-!endif
-!if $(MINNOW2_FSP_BUILD) == FALSE
-  !if $(SEC_ENABLE) == TRUE
-  INF  RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/HeciDrv.inf
-  INF  RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SeCPolicyInitDxe.inf
-  !endif
-!endif
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchSpiRuntime.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchPolicyInitDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PchBiosWriteProtect.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmmAccess.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PciHostBridge.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/VlvInitDxe.inf
 !if $(TPM_ENABLED) == TRUE
 INF SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf
 INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
 INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
 !endif
-!if $(FTPM_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/Tpm2DeviceSeCPei.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/Tpm2DeviceSeCDxe.inf
-INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
-INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/FtpmSmm.inf
-!endif
 
 #
 # EDK II Related Platform codes
 #
-INF $(PLATFORM_PACKAGE)/PlatformSmm/PlatformSmm.inf
-INF $(PLATFORM_PACKAGE)/PlatformInfoDxe/PlatformInfoDxe.inf
-INF $(PLATFORM_PACKAGE)/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf
-INF $(PLATFORM_PACKAGE)/PlatformDxe/PlatformDxe.inf
-INF $(PLATFORM_PACKAGE)/PciPlatform/PciPlatform.inf
-INF $(PLATFORM_PACKAGE)/SaveMemoryConfig/SaveMemoryConfig.inf
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PlatformCpuPolicy.inf
-INF $(PLATFORM_PACKAGE)/PpmPolicy/PpmPolicy.inf
-INF $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf
+INF Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf
+INF Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf
+INF Vlv2TbltDevicePkg/PlatformCpuInfoDxe/PlatformCpuInfoDxe.inf
+INF Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf
+INF Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf
+INF Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PlatformCpuPolicy.inf
+INF Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf
 !if $(GOP_DRIVER_ENABLE) == TRUE
- INF $(PLATFORM_PACKAGE)/PlatformGopPolicy/PlatformGopPolicy.inf
+ INF Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf
  FILE DRIVER = FF0C8745-3270-4439-B74F-3E45F8C77064 {
   SECTION DXE_DEPEX_EXP = {gPlatformGOPPolicyGuid}
   SECTION PE32 = Vlv2SocBinPkg/GOP/7.2.1011/RELEASE_VS2008x86/$(DXE_ARCHITECTURE)/IntelGopDriver.efi
@@ -531,7 +438,7 @@ INF $(PLATFORM_PACKAGE)/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf
 }
 !endif
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf
   #
   # SMM
   #
@@ -542,25 +449,22 @@ INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
 INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
 INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
 INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
-INF $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.inf
 
-#
-# Remove the following two SMM binary modules that prevent platform from booting to UEFI Shell
-#
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PowerManagement2.inf
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/DigitalThermalSensor.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PowerManagement2.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/DigitalThermalSensor.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/GraphicDxeInitSmm.inf
 
   #
   # ACPI
   #
 INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
-INF $(PLATFORM_PACKAGE)/BootScriptSaveDxe/BootScriptSaveDxe.inf
+INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
 INF IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
 INF RuleOverride = ACPITABLE2 Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/PowerManagement/AcpiTables/PowerManagementAcpiTables.inf
 
-INF RuleOverride = ACPITABLE $(PLATFORM_RC_PACKAGE)/AcpiTablesPCAT/AcpiTables.inf
+INF RuleOverride = ACPITABLE Vlv2DeviceRefCodePkg/AcpiTablesPCAT/AcpiTables.inf
 
-INF $(PLATFORM_PACKAGE)/AcpiPlatform/AcpiPlatform.inf
+INF Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.inf
 
 INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
 
@@ -569,26 +473,17 @@ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourc
   #
 INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/ISPDxe.inf
 
 
 #
 # ISA
 #
-INF $(PLATFORM_PACKAGE)/Wpce791/Wpce791.inf
-INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
-INF IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf
+INF Vlv2TbltDevicePkg/PcuSio/PcuSio.inf
 !if $(SOURCE_DEBUG_ENABLE) != TRUE
 INF  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
 !endif
-#INF IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
-#INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
 
-#
-# SDIO
-#
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MmcHost.inf
-#INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/MmcMediaDevice.inf
 #
 # IDE/SCSI/AHCI
 #
@@ -598,7 +493,7 @@ INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
 
 INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
 !if $(SATA_ENABLE) == TRUE
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 #
 
 #
@@ -615,7 +510,6 @@ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
 INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
 INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
 INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
 INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
 INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
@@ -638,9 +532,9 @@ INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
   # SMBIOS
   #
 INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-INF $(PLATFORM_PACKAGE)/SmBiosMiscDxe/SmBiosMiscDxe.inf
+INF Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf
 
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMemory.inf
+INF RuleOverride = BINARY Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SmbiosMemory.inf
 
 
 #
@@ -675,8 +569,14 @@ FILE FREEFORM = 878AC2CC-5343-46F2-B563-51F89DAF56BA {
 !if $(NETWORK_ENABLE) == TRUE
   FILE DRIVER = 22DE1691-D65D-456a-993E-A253DD1F308C {
     SECTION PE32 = Vlv2SocBinPkg/UNDI/RtkUndiDxe/$(DXE_ARCHITECTURE)/RtkUndiDxe.efi
-    SECTION UI = "UNDI"
+    SECTION UI = "RtkUndiDxe"
   }
+  !if $(DXE_ARCHITECTURE) == "X64"
+    FILE DRIVER = 7C7467E9-8BB3-4BF1-8694-6FED7D25D13E {
+      SECTION PE32 = Vlv2SocBinPkg/UNDI/I211PcieUndiDxe/$(DXE_ARCHITECTURE)/E7006X3.EFI
+      SECTION UI = "E7006X3"
+    }
+  !endif
 !endif
 
 !if $(CAPSULE_ENABLE)
@@ -786,11 +686,7 @@ READ_LOCK_STATUS   = TRUE
 [Rule.Common.SEC.BINARY]
   FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
     PE32  PE32    Align = 8       |.efi
-!if $(MINNOW2_FSP_BUILD) == TRUE
-    RAW   RAW                     |.raw
-!else
     RAW   BIN     Align = 16      |.com
-!endif
   }
 
 [Rule.Common.PEI_CORE]
@@ -868,7 +764,7 @@ READ_LOCK_STATUS   = TRUE
 
 [Rule.Common.UEFI_DRIVER.NATIVE_BINARY]
   FILE DRIVER = $(NAMED_GUID) {
-    DXE_DEPEX DXE_DEPEX Optional      $(WORKSPACE)/$(PLATFORM_PACKAGE)/IntelGopDepex/IntelGopDriver.depex
+    DXE_DEPEX DXE_DEPEX Optional      $(WORKSPACE)/Vlv2TbltDevicePkg/IntelGopDepex/IntelGopDriver.depex
     PE32      PE32                    |.efi
     UI        STRING="$(MODULE_NAME)" Optional
     VERSION   STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 102 - 338
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 102 - 339
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 102 - 340
Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc


+ 5 - 21
Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.h

@@ -1,18 +1,15 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #ifndef _PLAT_OVER_MNGR_H_
 #define _PLAT_OVER_MNGR_H_
 
-#include <FrameworkDxe.h>
+#include <PiDxe.h>
 
 #include <Protocol/HiiConfigAccess.h>
 #include <Protocol/HiiConfigRouting.h>
@@ -57,23 +54,10 @@
 #include <CpuType.h>
 #include <Guid/PlatformCpuInfo.h>
 #include <Protocol/SimpleTextIn.h>
-#include <Protocol/FrameworkFormBrowser.h>
-extern EFI_HII_HANDLE   mHiiHandle;
 
-UINT32
-ConvertBase10ToRaw (
-  IN  EFI_EXP_BASE10_DATA             *Data);
+typedef UINT16  STRING_REF;
 
-UINT32
-ConvertBase2ToRaw (
-  IN  EFI_EXP_BASE2_DATA             *Data);
-
-EFI_STATUS
-GetStringFromToken (
-  IN      EFI_GUID                  *ProducerGuid,
-  IN      STRING_REF                Token,
-  OUT     CHAR16                    **String
-  );
+extern EFI_HII_HANDLE   mHiiHandle;
 
 VOID
 SwapEntries (

+ 2 - 12
Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf

@@ -1,11 +1,8 @@
 #
 #
-# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
-#                                                                                  

-# SPDX-License-Identifier: BSD-2-Clause-Patent
-
-#                                                                                  

+# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
 #
+# SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #  This driver produces UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL if this protocol doesn't exist.
 #  It doesn't install again if this protocol exists.
@@ -63,7 +60,6 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec    #for PchAccess.h
   SecurityPkg/SecurityPkg.dec
@@ -94,10 +90,6 @@
   #
   # gEfiCallerIdGuid                            ## Private  ## Variable:L"PlatDriOver"
   gEfiIfrTianoGuid                              ## CONSUMES ## Guid
-  gEfiProcessorSubClassGuid
-  gEfiMiscSubClassGuid
-  gEfiCacheSubClassGuid
-  gEfiMemorySubClassGuid
   gEfiPlatformInfoGuid
   gEfiNormalSetupGuid
   gEfiSecureBootEnableDisableGuid
@@ -123,8 +115,6 @@
   gEfiDevicePathToTextProtocolGuid              ## CONSUMED
   gEdkiiFormBrowserEx2ProtocolGuid
 
-  gEfiDataHubProtocolGuid
-  gEfiLegacyBiosProtocolGuid
   gEfiSimpleNetworkProtocolGuid
 
   gEfiDiskInfoProtocolGuid                      ## CONSUMED

+ 2 - 41
Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c

@@ -1,11 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -19,7 +16,6 @@ Revision History:
 --*/
 
 #include "PlatformSetupDxe.h"
-#include <Protocol/LegacyBios.h>
 #include <Protocol/PciRootBridgeIo.h>
 #include <Protocol/SimpleNetwork.h>
 #include <Protocol/DevicePath.h>
@@ -31,7 +27,6 @@ Revision History:
 #include <Protocol/Smbios.h>
 #include <IndustryStandard/SmBios.h>
 #include <Library/IoLib.h>
-#include <Library/I2CLib.h>
 #include <Guid/GlobalVariable.h>
 
 #include "Valleyview.h"
@@ -1172,11 +1167,6 @@ UpdatePlatformInformation (
 {
   UINT32                   MicroCodeVersion;
   CHAR16                   Buffer[40];
-  UINT8                    IgdVBIOSRevH;
-  UINT8                    IgdVBIOSRevL;
-  UINT16                   EDX;
-  EFI_IA32_REGISTER_SET    RegSet;
-  EFI_LEGACY_BIOS_PROTOCOL *LegacyBios = NULL;
   EFI_STATUS               Status;
   UINT8                    CpuFlavor=0;
   EFI_PEI_HOB_POINTERS     GuidHob;
@@ -1202,35 +1192,6 @@ UpdatePlatformInformation (
     }
   }
 
-  //
-  //VBIOS version
-  //
-  Status = gBS->LocateProtocol(
-                  &gEfiLegacyBiosProtocolGuid,
-                  NULL,
-                  (void **)&LegacyBios
-                  );
-  if (!EFI_ERROR (Status)) {
-  RegSet.X.AX = 0x5f01;
-  Status = LegacyBios->Int86 (LegacyBios, 0x10, &RegSet);
-  ASSERT_EFI_ERROR(Status);
-
-  //
-  // simulate AMI int15 (ax=5f01) handler
-  // check NbInt15.asm in AMI code for asm edition
-  //
-  EDX = (UINT16)((RegSet.E.EBX >> 16) & 0xffff);
-  IgdVBIOSRevH = (UINT8)(((EDX & 0x0F00) >> 4) | (EDX & 0x000F));
-  IgdVBIOSRevL = (UINT8)(((RegSet.X.BX & 0x0F00) >> 4) | (RegSet.X.BX & 0x000F));
-
-  if (IgdVBIOSRevH==0 && IgdVBIOSRevL==0){
-    HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), L"N/A", NULL);
-  } else {
-    UnicodeSPrint (Buffer, sizeof (Buffer), L"%02X%02X", IgdVBIOSRevH,IgdVBIOSRevL);
-    HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), Buffer, NULL);
-    }
-  }
-
   Status = GetGOPDriverName(Name);
 
   if (!EFI_ERROR(Status))

+ 2 - 81
Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/Platform.c

@@ -1,10 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
-                                                                                   

+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -70,26 +68,9 @@ UINT8 mTco1Sources[] = {
   IchnNmi
 };
 
-UINTN
-DevicePathSize (
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath
-  );
-
 VOID
 S4S5ProgClock();
 
-EFI_STATUS
-InitRuntimeScriptTable (
-  IN EFI_SYSTEM_TABLE  *SystemTable
-  );
-
-VOID
-S5SleepWakeOnRtcCallBack (
-  IN  EFI_HANDLE                    DispatchHandle,
-  IN  EFI_SMM_SX_DISPATCH_CONTEXT   *DispatchContext
-  );
-
-
 VOID
 EnableS5WakeOnRtc();
 
@@ -98,12 +79,6 @@ HexToBcd(
   UINT8 HexValue
   );
 
-UINT8
-BcdToHex(
-  IN UINT8 BcdValue
-  );
-
-
 VOID
 CpuSmmSxWorkAround(
   );
@@ -779,46 +754,6 @@ DummyTco1Callback (
 {
 }
 
-UINTN
-DevicePathSize (
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath
-  )
-{
-  EFI_DEVICE_PATH_PROTOCOL     *Start;
-
-  if (DevicePath == NULL) {
-    return 0;
-  }
-
-  //
-  // Search for the end of the device path structure
-  //
-  Start = DevicePath;
-  while (!IsDevicePathEnd (DevicePath)) {
-    DevicePath = NextDevicePathNode (DevicePath);
-  }
-
-  //
-  // Compute the size and add back in the size of the end device path structure
-  //
-  return ((UINTN)DevicePath - (UINTN)Start) + sizeof(EFI_DEVICE_PATH_PROTOCOL);
-}
-
-/**
-
-  @param DispatchHandle   The handle of this callback, obtained when registering
-  @param DispatchContext  The predefined context which contained sleep type and phase
-
-**/
-VOID
-S5SleepWakeOnRtcCallBack (
-  IN  EFI_HANDLE                    DispatchHandle,
-  IN  EFI_SMM_SX_DISPATCH_CONTEXT   *DispatchContext
-  )
-{
-  EnableS5WakeOnRtc();
-}
-
 /**
 
  @retval 1. Check Alarm interrupt is not set.
@@ -981,17 +916,3 @@ HexToBcd(
   return ((UINT8)(LowByte + (HighByte << 4)));
 }
 
-UINT8
-BcdToHex(
-  IN UINT8 BcdValue
-  )
-{
-  UINTN   HighByte;
-  UINTN   LowByte;
-
-  HighByte    = (UINTN)((BcdValue >> 4) * 10);
-  LowByte     = (UINTN)(BcdValue & 0x0F);
-
-  return ((UINT8)(LowByte + HighByte));
-}
-

+ 2 - 15
Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf

@@ -1,11 +1,8 @@
 #
 #
-# Copyright (c)  1999  - 2018, Intel Corporation. All rights reserved
-#                                                                                  

-# SPDX-License-Identifier: BSD-2-Clause-Patent
-
-#                                                                                  

+# Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
 #
+# SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #  Module Name:
 #
@@ -51,16 +48,8 @@
 
 [Guids]
   gEfiSetupVariableGuid
-  gDmiDataGuid
-  gEfiAcpiVariableCompatiblityGuid
-  gEfiPciLanInfoGuid
-  gEfiPciLanInfoGuid
-
-[FeaturePcd]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
 
 [Protocols]
-  gEfiSmmBase2ProtocolGuid
   gEfiSmmIchnDispatchProtocolGuid
   gEfiGlobalNvsAreaProtocolGuid
   gEfiSmmSwDispatchProtocolGuid
@@ -75,13 +64,11 @@
   IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
 
 [Pcd.common]
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
 
 [Depex]
-  gEfiSmmBase2ProtocolGuid                 AND
   gEfiSmmAccess2ProtocolGuid               AND
   gEfiSmmPowerButtonDispatchProtocolGuid  AND
   gEfiSmmSxDispatchProtocolGuid           AND

+ 2 - 51
Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/S3Save.c

@@ -1,11 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -23,52 +20,6 @@ Revision History
 extern  UINT16                          mAcpiBaseAddr;
 EFI_PHYSICAL_ADDRESS                    mRuntimeScriptTableBase;
 
-EFI_STATUS
-InitRuntimeScriptTable (
-  IN EFI_SYSTEM_TABLE  *SystemTable
-  )
-{
-  EFI_STATUS        Status;
-  UINT32            VarAttrib;
-  UINTN             VarSize;
-  ACPI_VARIABLE_SET_COMPATIBILITY *AcpiVariableBase;
-
-  //
-  // Allocate runtime ACPI script table space. We need it to save some
-  // settings done by CSM, which runs after normal script table closed
-  //
-  Status = gBS->AllocatePages (
-                  AllocateAnyPages,
-                  EfiACPIReclaimMemory,
-                  1,
-                  &mRuntimeScriptTableBase
-                  );
-  if (EFI_ERROR(Status)) {
-    return EFI_OUT_OF_RESOURCES ;
-  }
-
-  //
-  // Save runtime script table base into global ACPI variable
-  //
-  VarAttrib = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS
-              | EFI_VARIABLE_NON_VOLATILE;
-  VarSize   = sizeof (UINTN);
-  Status = SystemTable->RuntimeServices->GetVariable (
-                          ACPI_GLOBAL_VARIABLE,
-                          &gEfiAcpiVariableCompatiblityGuid,
-                          &VarAttrib,
-                          &VarSize,
-                          &AcpiVariableBase
-                          );
-  if (EFI_ERROR(Status)) {
-    return Status;
-  }
-
-  AcpiVariableBase->RuntimeScriptTableBase = mRuntimeScriptTableBase;
-
-  return EFI_SUCCESS;
-}
-
 EFI_STATUS
 SaveRuntimeScriptTable (
   VOID

+ 2 - 5
Platform/Intel/Vlv2TbltDevicePkg/PlatformSmm/SmmPlatform.h

@@ -1,10 +1,8 @@
 /*++
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
+  Copyright (c) 2004  - 2019, Intel Corporation. All rights reserved.<BR>
 
-                                                                                   

+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -35,7 +33,6 @@ Abstract:
 #include <Protocol/PciRootBridgeIo.h>
 #include <Protocol/LoadedImage.h>
 #include "Protocol/GlobalNvsArea.h"
-#include <Guid/AcpiVariableCompatibility.h>
 #include <Guid/SetupVariable.h>
 #include <Guid/EfiVpdData.h>
 #include <Guid/PciLanInfo.h>

+ 2 - 4
Platform/Intel/Vlv2TbltDevicePkg/PpmPolicy/PpmPolicy.inf

@@ -1,9 +1,8 @@
 #/*++
 #
-#  Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
-#                                                                                  
+#  Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
+#
 # SPDX-License-Identifier: BSD-2-Clause-Patent
-#                     
 #
 #  Module Name:
 #
@@ -29,7 +28,6 @@
 [Packages]
   MdePkg/MdePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
-  Vlv2SocBinPkg/Vlv2SocBinPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
 
 [LibraryClasses]

+ 3 - 5
Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c

@@ -1,10 +1,8 @@
 /*++
 
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-                                                                                   
+Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -138,7 +136,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer)
              &MacStr
              );
   if (EFI_ERROR (Status)) {	
-    return Status;
+    MacStr = L"000000000000";
   }
   SerialNumber = MacStr;    
   SerialNumStrLen = StrLen(SerialNumber);

+ 2 - 40
Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Function.c

@@ -1,12 +1,8 @@
 /*++
 
-Copyright (c) 1999  - 2014, Intel Corporation.  All rights reserved.
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

-
+Copyright (c) 1999  - 2019, Intel Corporation.  All rights reserved.
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -36,7 +32,6 @@ Abstract:
 #include <Protocol/I2cBus.h>
 
 #include <Library/IoLib.h>
-#include <Library/I2CLib.h>
 #include <Library/CpuIA32.h>
 #include <Library/UefiRuntimeServicesTableLib.h>
 #include <Guid/PlatformInfo.h>
@@ -527,11 +522,6 @@ UpdatePlatformInformation (
 {
   UINT32                   MicroCodeVersion;
   CHAR16                   Buffer[40];
-  UINT8                    IgdVBIOSRevH;
-  UINT8                    IgdVBIOSRevL;
-  UINT16                   EDX;
-  EFI_IA32_REGISTER_SET    RegSet;
-  EFI_LEGACY_BIOS_PROTOCOL *LegacyBios = NULL;
   EFI_STATUS               Status;
   UINT8                    CpuFlavor=0;
   EFI_PEI_HOB_POINTERS     GuidHob;
@@ -561,34 +551,6 @@ UpdatePlatformInformation (
     }
   }
 
-  //
-  //VBIOS version
-  //
-  Status = gBS->LocateProtocol(
-                  &gEfiLegacyBiosProtocolGuid,
-                  NULL,
-                  (VOID **)&LegacyBios
-                  );
-
-  RegSet.X.AX = 0x5f01;
-  Status = LegacyBios->Int86 (LegacyBios, 0x10, &RegSet);
-  ASSERT_EFI_ERROR(Status);
-
-  //
-  // simulate AMI int15 (ax=5f01) handler
-  // check NbInt15.asm in AMI code for asm edition
-  //
-  EDX = (UINT16)((RegSet.E.EBX >> 16) & 0xffff);
-  IgdVBIOSRevH = (UINT8)(((EDX & 0x0F00) >> 4) | (EDX & 0x000F));
-  IgdVBIOSRevL = (UINT8)(((RegSet.X.BX & 0x0F00) >> 4) | (RegSet.X.BX & 0x000F));
-
-  if (IgdVBIOSRevH==0 && IgdVBIOSRevL==0) {
-    HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), L"N/A", NULL);
-  } else {
-    UnicodeSPrint (Buffer, sizeof (Buffer), L"%02X%02X", IgdVBIOSRevH,IgdVBIOSRevL);
-    HiiSetString(mHiiHandle, STRING_TOKEN(STR_CHIP_IGD_VBIOS_REV_VALUE), Buffer, NULL);
-  }
-
   Status = TGetGOPDriverName(Name);
 
   if(!EFI_ERROR(Status))

+ 4 - 6
Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c

@@ -1,10 +1,8 @@
 /*++
 
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
-                                                                                   
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-                                                                                   
+Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -219,8 +217,8 @@ AddSmbiosManuCallback (
              NULL,
              &MacStr
              );
-  if (EFI_ERROR (Status)) {	
-    return Status;
+  if (EFI_ERROR (Status)) {
+    MacStr = L"000000000000";
   }
   SerialNumber = MacStr; 
   SerialNumStrLen = StrLen(SerialNumber);

+ 4 - 11
Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf

@@ -2,12 +2,9 @@
 # Component name for module MiscSubclass
 #
 # FIX ME!
-# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
-#                                                                                  
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#                                                                                  
-#
+# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
 #
+# SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -87,9 +84,8 @@
   MdeModulePkg/MdeModulePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
   MdePkg/MdePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
-  NetworkPkg/NetworkPkg.dec
+  NetworkPkg/NetworkPkg.dec
 
 [LibraryClasses]
   HiiLib
@@ -107,13 +103,10 @@
   PrintLib
   CpuIA32Lib
   PchPlatformLib
-  I2cLib
   NetLib
   HobLib
   
 [Guids]
-  gEfiProcessorSubClassGuid
-  gEfiCacheSubClassGuid
   gEfiNormalSetupGuid
   gEfiPlatformInfoGuid
   gEfiVlv2VariableGuid
@@ -137,4 +130,4 @@
   gEfiVLVTokenSpaceGuid.PcdProductSerialNumber
 
 [Depex]
- gEfiSmbiosProtocolGuid AND gMemInfoProtocolGuid AND gEfiMpServiceProtocolGuid AND gEfiSimpleNetworkProtocolGuid
+  gEfiSmbiosProtocolGuid AND gMemInfoProtocolGuid AND gEfiMpServiceProtocolGuid

+ 3 - 8
Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c

@@ -1,12 +1,9 @@
 
 /*++
 
-Copyright (c)  2011  - 2018, Intel Corporation. All rights reserved
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+Copyright (c)  2011  - 2019, Intel Corporation. All rights reserved
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -35,14 +32,12 @@ Abstract:
 
 #include "IgdOpRegion.h"
 #include "VlvPlatformInit.h"
-#include <FrameworkDxe.h>
-#include <Uefi.h>
+#include <PiDxe.h>
 #include <PchRegs.h>
 
 #include <Guid/DataHubRecords.h>
 
 #include <Protocol/IgdOpRegion.h>
-#include <Protocol/FrameworkHii.h>
 #include <Protocol/FirmwareVolume2.h>
 #include <Protocol/PlatformGopPolicy.h>
 #include <Protocol/PciIo.h>

+ 3 - 24
Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.h

@@ -1,12 +1,9 @@
 
 /*++
 
-Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved
-                                                                                   

-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-                                                                                   

+Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
 
+  SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
 
@@ -36,7 +33,7 @@ Abstract:
 #include "VlvPlatformInit.h"
 #include "VlvCommonDefinitions.h"
 #include <Uefi/UefiInternalFormRepresentation.h>
-#include <FrameworkDxe.h>
+#include <PiDxe.h>
 
 //
 //
@@ -177,24 +174,6 @@ GetSVER (
   OUT UINT8 *SVER
   );
 
-/**
-  Acquire the string associated with the ProducerGuid and return it.
-
-  @param ProducerGuid  The Guid to search the HII database for
-  @param Token         The token value of the string to extract
-  @param String        The string that is extracted
-
-  @retval EFI_SUCCESS       The function completed successfully
-  @retval EFI_NOT_FOUND     The requested string was not found
-
-**/
-EFI_STATUS
-GetStringFromToken (
-  IN      EFI_GUID                  *ProducerGuid,
-  IN      STRING_REF                Token,
-  OUT     CHAR16                    **String
-  );
-
 /**
 
   Graphics OpRegion / Software SCI driver installation function.

+ 3 - 5
Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf

@@ -2,11 +2,10 @@
 #
 #/*++
 #
-#  Copyright (c)  1999  - 2018, Intel Corporation. All rights reserved
-#                                                                                  

-# SPDX-License-Identifier: BSD-2-Clause-Patent
+#  Copyright (c)  1999  - 2019, Intel Corporation. All rights reserved
+#                                                                                  
 
-#                                                                                  

+# SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #  Module Name:
 #
@@ -34,7 +33,6 @@
 
 [Packages]
   MdePkg/MdePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
   Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec
   Vlv2TbltDevicePkg/PlatformPkg.dec
 

+ 8 - 31
Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat

@@ -212,8 +212,12 @@ if defined VS140COMNTOOLS (
   goto :BldFail
 )
 
-echo Ensuring correct build directory is present for GenBiosId...
-set BUILD_PATH=%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
+echo Ensuring correct build directory is present
+if "%Arch%"=="IA32" (
+  set BUILD_PATH=%WORKSPACE%\Build\%PLATFORM_NAME%IA32\%TARGET%_%TOOL_CHAIN_TAG%
+) else (
+  set BUILD_PATH=%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
+)
 
 echo Modifing Conf files for this build...
 :: Remove lines with these tags from target.txt
@@ -240,16 +244,6 @@ move /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Conf\target.txt >nul
 :: Build BIOS
 ::**********************************************************************
 
-echo Creating BiosId...
-if not exist %BUILD_PATH%\IA32  mkdir %BUILD_PATH%\IA32
-%PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o %BUILD_PATH%\IA32\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
-if "%Arch%"=="X64" (
-   if not exist %BUILD_PATH%\X64  mkdir %BUILD_PATH%\X64
-   %PLATFORM_PACKAGE%\GenBiosId.exe -i %WORKSPACE%\Conf\BiosId.env -o %BUILD_PATH%\X64\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat
-)
-
-if %ERRORLEVEL% NEQ 0 goto BldFail
-
 echo.
 echo Invoking EDK2 build...
 call build %Build_Flags%
@@ -267,31 +261,14 @@ pushd %PLATFORM_PACKAGE%
 %PLATFORM_PACKAGE%\fce read -i %BUILD_PATH%\FV\Vlv.fd > %BUILD_PATH%\FV\HiiDefaultData.txt
 
 :: save changes to VlvXXX.fd
-%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s %BUILD_PATH%\FV\HiiDefaultData.txt -o %BUILD_PATH%\FV\Vlv%Arch%.fd
+%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s %BUILD_PATH%\FV\HiiDefaultData.txt -o %BUILD_PATH%\FV\Vlv.ROM
 popd
 
 if %ERRORLEVEL% NEQ 0 goto BldFail
 ::echo FD successfully updated with default Hii values.
 
-:: Set the Board_Id, Build_Type, Version_Major, and Version_Minor environment variables
-find /v "#" %WORKSPACE%\Conf\BiosId.env > ver_strings
-for /f "tokens=1,3" %%i in (ver_strings) do set %%i=%%j
-del /f/q ver_strings >nul
-
-set BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MINOR%.ROM
-copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd  %PLATFORM_PACKAGE%\Stitch\%BIOS_Name% >nul
-copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd  %BUILD_PATH%\FV\Vlv.ROM >nul
-
-echo.
-echo Build location:     %BUILD_PATH%
-echo BIOS ROM Created:   %BIOS_Name%
-echo.
-echo -------------------- The EDKII BIOS build has successfully completed. --------------------
-echo.
-
 @REM build capsule here
-echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv
-build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
+call build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc
 
 goto Exit
 

Vissa filer visades inte eftersom för många filer har ändrats