Vlv2TbltDevicePkg: Sync the branch changes to trunk.

Support compatible board, and fixed some bugs. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tim He <tim.he@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18149 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Tim He
2015-08-04 02:55:02 +00:00
committed by timhe
parent c5d5379937
commit 6f2ef18e80
23 changed files with 215 additions and 56 deletions

View File

@@ -482,18 +482,6 @@ SpiBiosProtectionFunction(
B_PCH_SPI_PR0_RPE|B_PCH_SPI_PR0_WPE|\
(B_PCH_SPI_PR0_PRB_MASK&(BiosFlaLower0>>12))|(B_PCH_SPI_PR0_PRL_MASK&(BiosFlaLimit0>>12)<<16));
//
//Lock down PR0
//
MmioOr16 ((UINTN) (SpiBase + R_PCH_SPI_HSFS), (UINT16) (B_PCH_SPI_HSFS_FLOCKDN));
//
// Verify if it's really locked.
//
if ((MmioRead16 (SpiBase + R_PCH_SPI_HSFS) & B_PCH_SPI_HSFS_FLOCKDN) == 0) {
DEBUG((EFI_D_ERROR, "Failed to lock down PR0.\n"));
}
//
//Set PR1
//
@@ -503,7 +491,7 @@ SpiBiosProtectionFunction(
(B_PCH_SPI_PR1_PRB_MASK&(BiosFlaLower1>>12))|(B_PCH_SPI_PR1_PRL_MASK&(BiosFlaLimit1>>12)<<16));
//
//Lock down PR1
//Lock down PRx
//
MmioOr16 ((UINTN) (SpiBase + R_PCH_SPI_HSFS), (UINT16) (B_PCH_SPI_HSFS_FLOCKDN));
@@ -511,7 +499,7 @@ SpiBiosProtectionFunction(
// Verify if it's really locked.
//
if ((MmioRead16 (SpiBase + R_PCH_SPI_HSFS) & B_PCH_SPI_HSFS_FLOCKDN) == 0) {
DEBUG((EFI_D_ERROR, "Failed to lock down PR1.\n"));
DEBUG((EFI_D_ERROR, "Failed to lock down PRx.\n"));
}
return;
@@ -576,6 +564,32 @@ InitPciDevPME (
}
}
VOID
EFIAPI
InitThermalZone (
EFI_EVENT Event,
VOID *Context
)
{
UINTN VarSize;
EFI_STATUS Status;
EFI_GLOBAL_NVS_AREA_PROTOCOL *GlobalNvsArea;
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
NORMAL_SETUP_NAME,
&gEfiNormalSetupGuid,
NULL,
&VarSize,
&mSystemConfiguration
);
Status = gBS->LocateProtocol (
&gEfiGlobalNvsAreaProtocolGuid,
NULL,
(void **)&GlobalNvsArea
);
GlobalNvsArea->Area->CriticalThermalTripPoint = mSystemConfiguration.CriticalThermalTripPoint;
GlobalNvsArea->Area->PassiveThermalTripPoint = mSystemConfiguration.PassiveThermalTripPoint;
}
#if defined SUPPORT_LVDS_DISPLAY && SUPPORT_LVDS_DISPLAY
#endif
@@ -830,7 +844,16 @@ InitializePlatform (
&mReadyToBootEvent
);
}
//
// Create a ReadyToBoot Event to run the thermalzone init process
//
Status = EfiCreateEventReadyToBootEx (
TPL_CALLBACK,
InitThermalZone,
NULL,
&mReadyToBootEvent
);
ReportStatusCodeEx (
EFI_PROGRESS_CODE,
EFI_COMPUTING_UNIT_CHIPSET | EFI_CU_PLATFORM_DXE_STEP1,