Browse Source

new policy design for open board.

Cc: Michael A Kubacki <michael.a.kubacki@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Brett Wang  <brett.wang@intel.com>
Cc: Daocheng Bu <daocheng.bu@intel.com>
Cc: Isaac W Oram <isaac.w.oram@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Michael A Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
Jiewen Yao 6 years ago
parent
commit
f5927629fc
21 changed files with 134 additions and 226 deletions
  1. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PcieDeviceTable.c
  2. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
  3. 35 9
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspPolicyUpdateLib.c
  4. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.c
  5. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.h
  6. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c
  7. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.c
  8. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.h
  9. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdatePreMem.c
  10. 2 2
      Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
  11. 6 3
      Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
  12. 1 1
      Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
  13. 1 1
      Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.c
  14. 0 0
      Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h
  15. 14 0
      Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h
  16. 1 1
      Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyUpdate.c
  17. 59 0
      Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c
  18. 15 34
      Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf
  19. 0 56
      Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/PolicyInitDxe.c
  20. 0 46
      Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/PolicyInitDxe.h
  21. 0 73
      Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/SaPolicyInitDxe.c

+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PcieDeviceTable.c → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PcieDeviceTable.c


+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiFspMiscUpdUpdateLib.c → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c


+ 35 - 9
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiFspPolicyUpdateLib.c → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspPolicyUpdateLib.c

@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/BaseMemoryLib.h>
 #include <Library/MemoryAllocationLib.h>
 #include <Library/FspWrapperApiLib.h>
-#include <Library/FspPolicyUpdateLib.h>
+#include <Library/SiliconPolicyUpdateLib.h>
 
 #include <FspEas.h>
 #include <FspmUpd.h>
@@ -115,17 +115,28 @@ InternalPrintVariableData (
 }
 
 /**
-  Performs FSPM UPD Policy update.
+  Performs silicon pre-mem policy update.
 
+  The meaning of Policy is defined by silicon code.
+  It could be the raw data, a handle, a PPI, etc.
+  
+  The input Policy must be returned by SiliconPolicyDonePreMem().
+  
+  1) In FSP path, the input Policy should be FspmUpd.
   A platform may use this API to update the FSPM UPD policy initialized
   by the silicon module or the default UPD data.
   The output of FSPM UPD data from this API is the final UPD data.
 
-  @param[in, out] FspmUpd       Pointer to FSPM UPD data.
+  2) In non-FSP path, the board may use additional way to get
+  the silicon policy data field based upon the input Policy.
+
+  @param[in, out] Policy       Pointer to policy.
+
+  @return the updated policy.
 **/
-VOID
+VOID *
 EFIAPI
-FspmPolicyUpdate (
+SiliconPolicyUpdatePreMem (
   IN OUT VOID    *FspmUpd
   )
 {
@@ -137,20 +148,33 @@ FspmPolicyUpdate (
   PeiFspMiscUpdUpdatePreMem (FspmUpdDataPtr);
 
   InternalPrintVariableData ((VOID *)FspmUpdDataPtr, sizeof(FSPM_UPD));
+
+  return FspmUpd;
 }
 
 /**
-  Performs FSPS UPD Policy update.
+  Performs silicon post-mem policy update.
 
+  The meaning of Policy is defined by silicon code.
+  It could be the raw data, a handle, a PPI, etc.
+  
+  The input Policy must be returned by SiliconPolicyDonePostMem().
+  
+  1) In FSP path, the input Policy should be FspsUpd.
   A platform may use this API to update the FSPS UPD policy initialized
   by the silicon module or the default UPD data.
   The output of FSPS UPD data from this API is the final UPD data.
 
-  @param[in, out] FspsUpd       Pointer to FSPS UPD data.
+  2) In non-FSP path, the board may use additional way to get
+  the silicon policy data field based upon the input Policy.
+
+  @param[in, out] Policy       Pointer to policy.
+
+  @return the updated policy.
 **/
-VOID
+VOID *
 EFIAPI
-FspsPolicyUpdate (
+SiliconPolicyUpdatePostMem (
   IN OUT VOID    *FspsUpd
   )
 {
@@ -161,6 +185,8 @@ FspsPolicyUpdate (
   PeiFspPchPolicyUpdate (FspsUpdDataPtr);
   
   InternalPrintVariableData ((VOID *)FspsUpdDataPtr, sizeof(FSPS_UPD));
+
+  return FspsUpd;
 }
 
 

+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiPchPolicyUpdate.c → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.c


+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiPchPolicyUpdate.h → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.h


+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c


+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiSaPolicyUpdate.c → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.c


+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiSaPolicyUpdate.h → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.h


+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiSaPolicyUpdatePreMem.c → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdatePreMem.c


+ 2 - 2
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiFspPolicyUpdateLib.inf → Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf

@@ -20,11 +20,11 @@
 ################################################################################
 [Defines]
   INF_VERSION                    = 0x00010005
-  BASE_NAME                      = PeiFspPolicyUpdateLib
+  BASE_NAME                      = SiliconPolicyUpdateLibFsp
   FILE_GUID                      = 4E83003B-49A9-459E-AAA6-1CA3C6D04FB2
   MODULE_TYPE                    = PEIM
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = FspPolicyUpdateLib
+  LIBRARY_CLASS                  = SiliconPolicyUpdateLib
 
 
 #

+ 6 - 3
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc

@@ -103,8 +103,8 @@
   FspWrapperApiTestLib|IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/PeiFspWrapperApiTestLib.inf
 
   FspWrapperPlatformLib|$(PLATFORM_PACKAGE)/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
-  FspPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf
-  FspPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/PeiFspPolicyUpdateLib/PeiFspPolicyUpdateLib.inf
+  SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFsp.inf
+  SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
 
   ConfigBlockLib|$(PLATFORM_SI_PACKAGE)/Library/BaseConfigBlockLib/BaseConfigBlockLib.inf
   SiliconInitLib|$(PLATFORM_SI_PACKAGE)/Library/SiliconInitLib/SiliconInitLib.inf
@@ -152,6 +152,9 @@
   MultiBoardAcpiSupportLib|$(PLATFORM_PACKAGE)/Acpi/Library/MultiBoardAcpiSupportLib/DxeMultiBoardAcpiSupportLib.inf
   BoardAcpiTableLib|$(PLATFORM_PACKAGE)/Acpi/Library/MultiBoardAcpiSupportLib/DxeMultiBoardAcpiSupportLib.inf
 
+  SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/DxeSiliconPolicyInitLib/DxeSiliconPolicyInitLib.inf
+  SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf
+
 #
 # Silicon Init Package
 #
@@ -214,7 +217,7 @@
 #
 !include $(PLATFORM_SI_PACKAGE)/SiPkgDxe.dsc
 
-  $(PLATFORM_BOARD_PACKAGE)/Policy/PolicyInitDxe/PolicyInitDxe.inf
+  $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf
   $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitDxe/PlatformInitDxe.inf {
     <LibraryClasses>
 !if $(TARGET) == DEBUG

+ 1 - 1
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf

@@ -477,7 +477,7 @@ APRIORI DXE {
 INF  $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitDxe/PlatformInitDxe.inf
 
 !if gPlatformModuleTokenSpaceGuid.PcdBootToShellOnly == FALSE
-INF  $(PLATFORM_BOARD_PACKAGE)/Policy/PolicyInitDxe/PolicyInitDxe.inf
+INF  $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf
 
 $(SIPKG_DXE_SMM_BIN) $(PLATFORM_SI_PACKAGE)/Pch/PchInit/Dxe/PchInitDxe.inf
 $(SIPKG_DXE_SMM_BIN) $(PLATFORM_SI_PACKAGE)/SystemAgent/SaInit/Dxe/SaInitDxe.inf

+ 1 - 1
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/GopPolicyInitDxe.c → Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.c

@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 
-#include "GopPolicyInitDxe.h"
+#include "DxeGopPolicyInit.h"
 #include <Protocol/GopPolicy.h>
 
 GLOBAL_REMOVE_IF_UNREFERENCED GOP_POLICY_PROTOCOL        mGOPPolicy;

+ 0 - 0
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/GopPolicyInitDxe.h → Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h


+ 14 - 0
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/SaPolicyInitDxe.h → Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h

@@ -53,4 +53,18 @@ SaPolicyInitDxe (
   IN EFI_HANDLE           ImageHandle
   );
 
+/**
+  Get data for platform policy from setup options.
+
+  @param[in] SaPolicy                  The pointer to get SA Policy protocol instance
+
+  @retval EFI_SUCCESS                  Operation success.
+
+**/
+EFI_STATUS
+EFIAPI
+UpdateDxeSaPolicy (
+  IN OUT  SA_POLICY_PROTOCOL    *SaPolicy
+  );
+
 #endif

+ 1 - 1
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/DxeSaPolicyUpdate.c → Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyUpdate.c

@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 
-#include "SaPolicyInitDxe.h"
+#include "DxeSaPolicyInit.h"
 
 #define SA_VTD_RMRR_USB_LENGTH  0x20000
 

+ 59 - 0
Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c

@@ -0,0 +1,59 @@
+/** @file
+
+Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include <Library/SiliconPolicyUpdateLib.h>
+#include <Library/PcdLib.h>
+#include <Library/DebugLib.h>
+
+#include "DxeSaPolicyInit.h"
+#include "DxeGopPolicyInit.h"
+
+/**
+  Performs silicon late policy update.
+
+  The meaning of Policy is defined by silicon code.
+  It could be the raw data, a handle, a Protocol, etc.
+  
+  The input Policy must be returned by SiliconPolicyDoneLate().
+  
+  In FSP or non-FSP path, the board may use additional way to get
+  the silicon policy data field based upon the input Policy.
+
+  @param[in, out] Policy       Pointer to policy.
+
+  @return the updated policy.
+**/
+VOID *
+EFIAPI
+SiliconPolicyUpdateLate (
+  IN VOID *Policy
+  )
+{
+  SA_POLICY_PROTOCOL       *SaPolicy;
+  EFI_STATUS               Status;
+
+  SaPolicy = Policy;
+  UpdateDxeSaPolicy (SaPolicy);
+
+  if (PcdGetBool(PcdIntelGopEnable)) {
+    //
+    // GOP Dxe Policy Initialization
+    //
+    Status = GopPolicyInitDxe(gImageHandle);
+    DEBUG((DEBUG_INFO, "GOP Dxe Policy Initialization done\n"));
+    ASSERT_EFI_ERROR(Status);
+  }
+
+  return Policy;
+}
+

+ 15 - 34
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/PolicyInitDxe.inf → Platform/Intel/KabylakeOpenBoardPkg/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf

@@ -1,5 +1,5 @@
-### @file
-# Module Information file for the PolicyInit DXE driver.
+## @file
+# Component information file for Silicon Update Library
 #
 # Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
 #
@@ -11,33 +11,20 @@
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #
-###
+##
 
 [Defines]
-  INF_VERSION                    = 0x00010017
-  BASE_NAME                      = KabylakeRvp3PolicyInitDxe
-  FILE_GUID                      = 490D0119-4448-440D-8F5C-F58FB53EE057
-  VERSION_STRING                 = 1.0
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = DxeSiliconUpdateLib
+  FILE_GUID                      = C523609D-E354-416B-B24F-33468D4BD21D
   MODULE_TYPE                    = DXE_DRIVER
-  ENTRY_POINT                    = PolicyInitDxeEntryPoint
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = SiliconUpdateLib
 
 [LibraryClasses]
   BaseLib
-  BaseMemoryLib
-  CpuPlatformLib
-  DebugLib
-  DxeServicesTableLib
-  IoLib
-  MemoryAllocationLib
-  DxeSaPolicyLib
-  MmPciLib
   PcdLib
-  PostCodeLib
-  UefiBootServicesTableLib
-  UefiDriverEntryPoint
-  UefiLib
-  UefiRuntimeServicesTableLib
-  ConfigBlockLib
+  DebugLib
 
 [Packages]
   MdePkg/MdePkg.dec
@@ -45,18 +32,15 @@
   MinPlatformPkg/MinPlatformPkg.dec
   KabylakeOpenBoardPkg/OpenBoardPkg.dec
 
-[Pcd]
-  gBoardModuleTokenSpaceGuid.PcdIntelGopEnable
-
 [Sources]
-  PolicyInitDxe.c
-  PolicyInitDxe.h
-  SaPolicyInitDxe.c
-  SaPolicyInitDxe.h
-  GopPolicyInitDxe.c
-  GopPolicyInitDxe.h
+  DxeSiliconPolicyUpdateLib.c
+  DxeGopPolicyInit.c
   DxeSaPolicyUpdate.c
 
+[Pcd]
+  gBoardModuleTokenSpaceGuid.PcdIntelGopEnable
+  gBoardModuleTokenSpaceGuid.PcdGraphicsVbtGuid
+
 [Protocols]
   gEfiFirmwareVolume2ProtocolGuid               ## CONSUMES
   gSaPolicyProtocolGuid                         ## CONSUMES
@@ -66,9 +50,6 @@
 [Guids]
   gMiscDxeConfigGuid
 
-[Pcd]
-  gBoardModuleTokenSpaceGuid.PcdGraphicsVbtGuid
-
 [Depex]
   gEfiVariableArchProtocolGuid
 

+ 0 - 56
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/PolicyInitDxe.c

@@ -1,56 +0,0 @@
-/** @file
-  This file is a wrapper for Platform Policy driver. Get Setup
-  Value to initialize Intel DXE Platform Policy.
-
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "PolicyInitDxe.h"
-
-/**
-  Initialize  DXE Platform Policy
-
-  @param[in] ImageHandle       Image handle of this driver.
-  @param[in] SystemTable       Global system service table.
-
-  @retval EFI_SUCCESS           Initialization complete.
-  @exception EFI_UNSUPPORTED       The chipset is unsupported by this driver.
-  @retval EFI_OUT_OF_RESOURCES  Do not have enough resources to initialize the driver.
-  @retval EFI_DEVICE_ERROR      Device error, driver exits abnormally.
-**/
-EFI_STATUS
-EFIAPI
-PolicyInitDxeEntryPoint (
-  IN EFI_HANDLE       ImageHandle,
-  IN EFI_SYSTEM_TABLE *SystemTable
-  )
-{
-  EFI_STATUS           Status;
-  
-  //
-  // SystemAgent Dxe Platform Policy Initialization
-  //
-  Status = SaPolicyInitDxe (ImageHandle);
-  DEBUG ((DEBUG_INFO, "SystemAgent Dxe Platform Policy Initialization done\n"));
-  ASSERT_EFI_ERROR (Status);
-
-  if (PcdGetBool(PcdIntelGopEnable)) {
-    //
-    // GOP Dxe Policy Initialization
-    //
-    Status = GopPolicyInitDxe(ImageHandle);
-    DEBUG((DEBUG_INFO, "GOP Dxe Policy Initialization done\n"));
-    ASSERT_EFI_ERROR(Status);
-  }
-
-  return Status;
-
-}

+ 0 - 46
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/PolicyInitDxe.h

@@ -1,46 +0,0 @@
-/** @file
-  Header file for the PolicyInitDxe Driver.
-
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-#ifndef _POLICY_INIT_DXE_H_
-#define _POLICY_INIT_DXE_H_
-
-
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/DebugLib.h>
-
-#include "SaPolicyInitDxe.h"
-#include "GopPolicyInitDxe.h"
-
-/**
-  Initialize DXE Platform Policy
-
-  @param[in] ImageHandle - Image handle of this driver.
-  @param[in] SystemTable - Global system service table.
-
-  @retval EFI_SUCCESS           Initialization complete.
-  @exception EFI_UNSUPPORTED       The chipset is unsupported by this driver.
-  @retval EFI_OUT_OF_RESOURCES  Do not have enough resources to initialize the driver.
-  @retval EFI_DEVICE_ERROR      Device error, driver exits abnormally.
-**/
-
-EFI_STATUS
-EFIAPI
-PolicyInitDxeEntryPoint (
-  IN EFI_HANDLE           ImageHandle,
-  IN EFI_SYSTEM_TABLE     *SystemTable
-  )
-;
-
-#endif

+ 0 - 73
Platform/Intel/KabylakeOpenBoardPkg/Policy/PolicyInitDxe/SaPolicyInitDxe.c

@@ -1,73 +0,0 @@
-/** @file
-  This file is SampleCode for SA DXE Policy initialization.
-
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-#include "SaPolicyInitDxe.h"
-
-//
-// Function implementations
-//
-
-/**
-  Get data for platform policy from setup options.
-
-  @param[in] SaPolicy                  The pointer to get SA Policy protocol instance
-
-  @retval EFI_SUCCESS                  Operation success.
-
-**/
-EFI_STATUS
-EFIAPI
-UpdateDxeSaPolicy (
-  IN OUT  SA_POLICY_PROTOCOL    *SaPolicy
-  );
-
-
-/**
-  Initialize SA DXE Policy
-
-  @param[in] ImageHandle          Image handle of this driver.
-
-  @retval EFI_SUCCESS             Initialization complete.
-  @exception EFI_UNSUPPORTED      The chipset is unsupported by this driver.
-  @retval EFI_OUT_OF_RESOURCES    Do not have enough resources to initialize the driver.
-  @retval EFI_DEVICE_ERROR        Device error, driver exits abnormally.
-**/
-EFI_STATUS
-EFIAPI
-SaPolicyInitDxe (
-  IN EFI_HANDLE                   ImageHandle
-  )
-{
-  EFI_STATUS               Status;
-  SA_POLICY_PROTOCOL       *SaPolicy;
-
-  //
-  // Call CreateSaDxeConfigBlocks to create & initialize platform policy structure
-  // and get all Intel default policy settings.
-  //
-  Status = CreateSaDxeConfigBlocks(&SaPolicy);
-  DEBUG((DEBUG_INFO, "SaPolicy->TableHeader.NumberOfBlocks = 0x%x\n ", SaPolicy->TableHeader.NumberOfBlocks));
-  ASSERT_EFI_ERROR(Status);
-
-    UpdateDxeSaPolicy (SaPolicy);
-
-  //
-  // Install SaInstallPolicyProtocol.
-  // While installed, RC assumes the Policy is ready and finalized. So please
-  // update and override any setting before calling this function.
-  //
-  Status = SaInstallPolicyProtocol (ImageHandle, SaPolicy);
-  ASSERT_EFI_ERROR (Status);
-
-  return Status;
-}