summaryrefslogtreecommitdiff
path: root/Silicon
diff options
context:
space:
mode:
authorzwei4 <david.wei@intel.com>2017-01-09 14:59:23 +0800
committerGuo Mang <mang.guo@intel.com>2017-01-12 17:25:58 +0800
commitd0d640c6fcd9647fa6fe2a8a09bcc65558a0884a (patch)
treea9f6cc7c11bbf7b1eaf34dafab3c508e54dafb03 /Silicon
parent21eb63bbdd278d149720fb25bff15c22df0c254d (diff)
downloadedk2-platforms-d0d640c6fcd9647fa6fe2a8a09bcc65558a0884a.tar.xz
Remove platform policy
Remove silicon platform policy which is not used by any silicon code. Signed-off-by: zwei4 <david.wei@intel.com> Reviewed-by: Mang Guo <mang.guo@intel.com> Cc: Mike Wu <mike.wu@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Mang Guo <mang.guo@intel.com> Cc: Shifei Lu <shifeix.a.lu@intel.com>
Diffstat (limited to 'Silicon')
-rw-r--r--Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.c148
-rw-r--r--Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.inf40
-rw-r--r--Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLibrary.h37
-rw-r--r--Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/SiPrintPolicy.c44
4 files changed, 0 insertions, 269 deletions
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.c b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.c
deleted file mode 100644
index 2d66cb5385..0000000000
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/** @file
- This file is PeiSiPolicyLib library creates default settings of RC
- Policy and installs RC Policy PPI.
-
- Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "PeiSiPolicyLibrary.h"
-
-/**
- SiCreatePolicyDefaults creates the default setting of Silicon Policy.
- It allocates and zero out buffer, and fills in the Intel default settings.
-
- @param[out] SiPolicyPpi The pointer to get Silicon Policy PPI instance
-
- @retval EFI_SUCCESS The policy default is initialized.
- @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer.
-
-**/
-EFI_STATUS
-EFIAPI
-SiCreatePolicyDefaults (
- OUT SI_POLICY_PPI **SiPolicyPpi
- )
-{
- SI_POLICY_PPI *SiPolicy;
-
- SiPolicy = (SI_POLICY_PPI *) AllocateZeroPool (sizeof (SI_POLICY_PPI));
- if (SiPolicy == NULL) {
- ASSERT (FALSE);
- return EFI_OUT_OF_RESOURCES;
- }
-
- //
- // General intialization
- //
- SiPolicy->Revision = SI_POLICY_REVISION;
-
- //
- // PlatformData configuration
- //
- //
- // FviSmbiosType is the SMBIOS OEM type (0x80 to 0xFF) defined in SMBIOS Type 14 - Group
- // Associations structure - item type. FVI structure uses it as SMBIOS OEM type to provide
- // version information. The default value is type 221.
- //
- SiPolicy->FviSmbiosType = 0xDD;
-
- //
- // Temporary Bus range for silicon initialization.
- //
- SiPolicy->TempPciBusMin = 2;
- SiPolicy->TempPciBusMax = 6;
-
- //
- // Temporary Memory Base Address for PCI devices to be used to initialize MMIO registers.
- // Minimum size is 2MB bytes.
- //
- SiPolicy->TempMemBaseAddr = TEMP_MEM_BASE_ADDRESS;
- SiPolicy->TempMemSize = TEMP_MEM_SIZE;
-
- //
- // Temporary IO Base Address for PCI devices to be used to initialize IO registers.
- // And size of temporary IO space.
- //
- SiPolicy->TempIoBaseAddr = TEMP_IO_BASE_ADDRESS;
- SiPolicy->TempIoSize = TEMP_IO_SIZE;
-
- *SiPolicyPpi = SiPolicy;
-
- return EFI_SUCCESS;
-}
-
-
-/**
- SiInstallPolicyPpi installs SiPolicyPpi.
- While installed, RC assumes the Policy is ready and finalized. So please update and override
- any setting before calling this function.
-
- @param[in] SiPolicyPpi The pointer to Silicon Policy PPI instance.
-
- @retval EFI_SUCCESS The policy is installed.
- @retval EFI_OUT_OF_RESOURCES Insufficient resources to create buffer.
-
-**/
-EFI_STATUS
-EFIAPI
-SiInstallPolicyPpi (
- IN SI_POLICY_PPI *SiPolicyPpi
- )
-{
- EFI_STATUS Status;
- EFI_PEI_PPI_DESCRIPTOR *SiPolicyPpiDesc;
- EFI_PEI_PPI_DESCRIPTOR *OldSiPolicyPpiDesc;
-
- SiPolicyPpiDesc = (EFI_PEI_PPI_DESCRIPTOR *) AllocateZeroPool (sizeof (EFI_PEI_PPI_DESCRIPTOR));
- if (SiPolicyPpiDesc == NULL) {
- ASSERT (FALSE);
- return EFI_OUT_OF_RESOURCES;
- }
-
- SiPolicyPpiDesc->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
- SiPolicyPpiDesc->Guid = &gSiPolicyPpiGuid;
- SiPolicyPpiDesc->Ppi = SiPolicyPpi;
-
- //
- // Print whole SI_POLICY_PPI and serial out.
- //
- SiPrintPolicyPpi (SiPolicyPpi);
-
- Status = PeiServicesLocatePpi (
- &gSiPolicyPpiGuid,
- 0,
- &OldSiPolicyPpiDesc,
- NULL
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "Locate Old gSiPolicyPpiGuid fail in Post-Memory\n"));
- Status = PeiServicesInstallPpi (SiPolicyPpiDesc);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Install gSiPolicyPpiGuid fail in Post-Memory\n"));
- }
- ASSERT_EFI_ERROR (Status);
- } else {
- //
- // ReInstall Sc Spi PPI
- //
- DEBUG ((DEBUG_INFO, "Re-Install gSiPolicyPpiGuid in Post-Memory, OldSiPolicyPpiDesc is %x, New is %x\n", OldSiPolicyPpiDesc, SiPolicyPpiDesc));
- Status = PeiServicesReInstallPpi (OldSiPolicyPpiDesc, SiPolicyPpiDesc);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Re-Install gSiPolicyPpiGuid fail in Post-Memory\n"));
- }
- ASSERT_EFI_ERROR (Status);
- }
- ASSERT_EFI_ERROR (Status);
-
- return Status;
-}
-
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.inf b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.inf
deleted file mode 100644
index 3650843333..0000000000
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLib.inf
+++ /dev/null
@@ -1,40 +0,0 @@
-## @file
-# PeiSiPolicyLib library.
-#
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
-#
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php.
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = PeiSiPolicyLib
- FILE_GUID = DF39567A-30C3-4913-8A8B-D4585B74E4E0
- MODULE_TYPE = PEIM
- VERSION_STRING = 1.0
- LIBRARY_CLASS = PeiSiPolicyLib
-
-[Sources]
- PeiSiPolicyLib.c
- SiPrintPolicy.c
-
-[Packages]
- MdePkg/MdePkg.dec
- BroxtonSiPkg/BroxtonSiPkg.dec
-
-[LibraryClasses]
- DebugLib
- IoLib
- PeiServicesLib
- BaseMemoryLib
- MemoryAllocationLib
-
-[Ppis]
- gSiPolicyPpiGuid ## PRODUCES
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLibrary.h b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLibrary.h
deleted file mode 100644
index af9861c42a..0000000000
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/PeiSiPolicyLibrary.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/** @file
- Header file for the PeiSiPolicyLib library.
-
- Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _PEI_SI_POLICY_LIBRARY_H_
-#define _PEI_SI_POLICY_LIBRARY_H_
-
-#include <Library/DebugLib.h>
-#include <Library/IoLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/PeiServicesLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Ppi/SiPolicyPpi.h>
-#include <Library/SiPolicyLib.h>
-
-#define TEMP_MEM_BASE_ADDRESS 0xFE600000
-#define TEMP_IO_BASE_ADDRESS 0xD000
-
-//
-// IO/MMIO resource limits
-//
-#define TEMP_MEM_SIZE 0x200000
-#define TEMP_IO_SIZE 0x10
-
-#endif // _PEI_SI_POLICY_LIBRARY_H_
-
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/SiPrintPolicy.c b/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/SiPrintPolicy.c
deleted file mode 100644
index f7c747940d..0000000000
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/Library/PeiSiPolicyLib/SiPrintPolicy.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/** @file
- This file is PeiSiPolicyLib library creates default settings of RC
- Policy and installs RC Policy PPI.
-
- Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "PeiSiPolicyLibrary.h"
-
-/**
- Print whole SI_POLICY_PPI and serial out.
-
- @param[in] SiPolicyPpi The RC Policy PPI instance.
-
-**/
-VOID
-EFIAPI
-SiPrintPolicyPpi (
- IN SI_POLICY_PPI *SiPolicyPpi
- )
-{
-#ifdef EFI_DEBUG
- DEBUG ((DEBUG_INFO, "------------------------ Silicon Print Policy Start ------------------------\n"));
- DEBUG ((DEBUG_INFO, " Revision= %x\n", SiPolicyPpi->Revision));
- DEBUG ((DEBUG_INFO, " EcPresent= %x\n", SiPolicyPpi->EcPresent));
- DEBUG ((DEBUG_INFO, " TempPciBusMin= %x\n", SiPolicyPpi->TempPciBusMin));
- DEBUG ((DEBUG_INFO, " TempPciBusMax= %x\n", SiPolicyPpi->TempPciBusMax));
- DEBUG ((DEBUG_INFO, " TempMemBaseAddr= %x\n", SiPolicyPpi->TempMemBaseAddr));
- DEBUG ((DEBUG_INFO, " TempMemSize= %x\n", SiPolicyPpi->TempMemSize));
- DEBUG ((DEBUG_INFO, " TempIoBaseAddr= %x\n", SiPolicyPpi->TempIoBaseAddr));
- DEBUG ((DEBUG_INFO, " TempIoSize= %x\n", SiPolicyPpi->TempIoSize));
- DEBUG ((DEBUG_INFO, "------------------------ Silicon Print Policy End --------------------------\n"));
-#endif // EFI_DEBUG
-}
-