2 Principle source module for Clanton Peak platform config PEIM driver.
4 Copyright (c) 2013 Intel Corporation.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Library/IntelQNCLib.h>
12 #include <Library/PlatformHelperLib.h>
13 #include <Library/QNCAccessLib.h>
23 RegVal
= PcdGet32 (PcdLegacyProtectedBIOSRange0Pei
);
25 PlatformWriteFirstFreeSpiProtect (
31 RegVal
= PcdGet32 (PcdLegacyProtectedBIOSRange1Pei
);
33 PlatformWriteFirstFreeSpiProtect (
39 RegVal
= PcdGet32 (PcdLegacyProtectedBIOSRange2Pei
);
41 PlatformWriteFirstFreeSpiProtect (
49 // Make legacy SPI READ/WRITE enabled if not a secure build
51 LpcPciCfg32And (R_QNC_LPC_BIOS_CNTL
, ~B_QNC_LPC_BIOS_CNTL_BIOSWE
);
54 /** PlatformConfigPei driver entry point.
56 Platform config in PEI stage.
58 @param[in] FfsHeader Pointer to Firmware File System file header.
59 @param[in] PeiServices General purpose services available to every PEIM.
61 @retval EFI_SUCCESS Platform config success.
65 PlatformConfigPeiInit (
66 IN EFI_PEI_FILE_HANDLE FileHandle
,
67 IN CONST EFI_PEI_SERVICES
**PeiServices
71 // Do SOC Init Pre memory init.
76 // Protect areas specified by PCDs.