2 Principle source module for Clanton Peak platform config PEIM driver.
4 Copyright (c) 2013 Intel Corporation.
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/IntelQNCLib.h>
18 #include <Library/PlatformHelperLib.h>
19 #include <Library/QNCAccessLib.h>
29 RegVal
= PcdGet32 (PcdLegacyProtectedBIOSRange0Pei
);
31 PlatformWriteFirstFreeSpiProtect (
37 RegVal
= PcdGet32 (PcdLegacyProtectedBIOSRange1Pei
);
39 PlatformWriteFirstFreeSpiProtect (
45 RegVal
= PcdGet32 (PcdLegacyProtectedBIOSRange2Pei
);
47 PlatformWriteFirstFreeSpiProtect (
55 // Make legacy SPI READ/WRITE enabled if not a secure build
57 LpcPciCfg32And (R_QNC_LPC_BIOS_CNTL
, ~B_QNC_LPC_BIOS_CNTL_BIOSWE
);
60 /** PlatformConfigPei driver entry point.
62 Platform config in PEI stage.
64 @param[in] FfsHeader Pointer to Firmware File System file header.
65 @param[in] PeiServices General purpose services available to every PEIM.
67 @retval EFI_SUCCESS Platform config success.
71 PlatformConfigPeiInit (
72 IN EFI_PEI_FILE_HANDLE FileHandle
,
73 IN CONST EFI_PEI_SERVICES
**PeiServices
77 // Do SOC Init Pre memory init.
82 // Protect areas specified by PCDs.