summaryrefslogtreecommitdiff
path: root/Vlv2TbltDevicePkg
diff options
context:
space:
mode:
authorTim He <tim.he@intel.com>2015-08-04 02:55:02 +0000
committertimhe <timhe@Edk2>2015-08-04 02:55:02 +0000
commit6f2ef18e8097c4fa11dd6ff5fdd0152c2c61ffc5 (patch)
treebcc19b4b8196f40d7fb8cb6509ab4859503b009f /Vlv2TbltDevicePkg
parentc5d5379937629f3061d08b8d9a3386a40152ca2c (diff)
downloadedk2-platforms-6f2ef18e8097c4fa11dd6ff5fdd0152c2c61ffc5.tar.xz
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
Diffstat (limited to 'Vlv2TbltDevicePkg')
-rw-r--r--Vlv2TbltDevicePkg/BiosIdD.env2
-rw-r--r--Vlv2TbltDevicePkg/BiosIdR.env2
-rw-r--r--Vlv2TbltDevicePkg/BiosIdx64D.env2
-rw-r--r--Vlv2TbltDevicePkg/BiosIdx64R.env2
-rw-r--r--Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h3
-rw-r--r--Vlv2TbltDevicePkg/Include/Library/SpiFlash.H4
-rw-r--r--Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c1
-rw-r--r--Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.c5
-rw-r--r--Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.h12
-rw-r--r--Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardOemIds/BoardOemIds.c1
-rw-r--r--Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardSsidSvid/BoardSsidSvid.c7
-rw-r--r--Vlv2TbltDevicePkg/PlatformDxe/Platform.c53
-rw-r--r--Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c1
-rw-r--r--Vlv2TbltDevicePkg/PlatformPei/Platform.c64
-rw-r--r--Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi21
-rw-r--r--Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr2
-rw-r--r--Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.unibin214412 -> 214666 bytes
-rw-r--r--Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.c2
-rw-r--r--Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c14
-rw-r--r--Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManufacturerFunction.c12
-rw-r--r--Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverEntryPoint.c17
-rw-r--r--Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c43
-rw-r--r--Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf1
23 files changed, 215 insertions, 56 deletions
diff --git a/Vlv2TbltDevicePkg/BiosIdD.env b/Vlv2TbltDevicePkg/BiosIdD.env
index 406bed27a2..8ef622e88e 100644
--- a/Vlv2TbltDevicePkg/BiosIdD.env
+++ b/Vlv2TbltDevicePkg/BiosIdD.env
@@ -26,5 +26,5 @@ OEM_ID = I32
BUILD_TYPE = D
BOARD_ID = BLAKCRB
-VERSION_MAJOR = 0080
+VERSION_MAJOR = 0083
VERSION_MINOR = 01
diff --git a/Vlv2TbltDevicePkg/BiosIdR.env b/Vlv2TbltDevicePkg/BiosIdR.env
index 092423d032..2ddafe2ea4 100644
--- a/Vlv2TbltDevicePkg/BiosIdR.env
+++ b/Vlv2TbltDevicePkg/BiosIdR.env
@@ -26,5 +26,5 @@ OEM_ID = I32
BUILD_TYPE = R
BOARD_ID = BLAKCRB
-VERSION_MAJOR = 0080
+VERSION_MAJOR = 0083
VERSION_MINOR = 01
diff --git a/Vlv2TbltDevicePkg/BiosIdx64D.env b/Vlv2TbltDevicePkg/BiosIdx64D.env
index 289441ed66..564e15f2cc 100644
--- a/Vlv2TbltDevicePkg/BiosIdx64D.env
+++ b/Vlv2TbltDevicePkg/BiosIdx64D.env
@@ -25,6 +25,6 @@ BOARD_REV = 1
OEM_ID = X64
BUILD_TYPE = D
-VERSION_MAJOR = 0080
+VERSION_MAJOR = 0083
VERSION_MINOR = 01
BOARD_ID = BBAYCRB
diff --git a/Vlv2TbltDevicePkg/BiosIdx64R.env b/Vlv2TbltDevicePkg/BiosIdx64R.env
index 92bd556ded..d72dec5409 100644
--- a/Vlv2TbltDevicePkg/BiosIdx64R.env
+++ b/Vlv2TbltDevicePkg/BiosIdx64R.env
@@ -25,6 +25,6 @@ BOARD_REV = 1
OEM_ID = X64
BUILD_TYPE = R
-VERSION_MAJOR = 0080
+VERSION_MAJOR = 0083
VERSION_MINOR = 01
BOARD_ID = BBAYCRB
diff --git a/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h b/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h
index 0a73f0d748..252535f754 100644
--- a/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h
+++ b/Vlv2TbltDevicePkg/Include/Guid/PlatformInfo.h
@@ -176,7 +176,8 @@ typedef enum {
BOARD_ID_BB_RVP = 0x20, // Bayley Bay Board
BOARD_ID_BS_RVP = 0x30, // Bakersport Board
BOARD_ID_CVH = 0x90, // Crestview Hills
- BOARD_ID_MINNOW2 = 0xA0 // Minnow2
+ BOARD_ID_MINNOW2 = 0xA0, // Minnow2
+ BOARD_ID_MINNOW2_COMPATIBLE = 0xB0 // Minnow2
} BOARD_ID_LIST;
diff --git a/Vlv2TbltDevicePkg/Include/Library/SpiFlash.H b/Vlv2TbltDevicePkg/Include/Library/SpiFlash.H
index 9d1e898fed..c86569933e 100644
--- a/Vlv2TbltDevicePkg/Include/Library/SpiFlash.H
+++ b/Vlv2TbltDevicePkg/Include/Library/SpiFlash.H
@@ -66,7 +66,7 @@ typedef enum {
#define SF_DEVICE_ID0_W25XXX 0x30
#define SF_DEVICE_ID1_W25X32 0x16
#define SF_DEVICE_ID1_W25X64 0x17
-#define SF_DEVICE_ID0_W25QXX 0x60
+#define SF_DEVICE_ID0_W25QXX 0x40
#define SF_DEVICE_ID1_W25Q16 0x15
#define SF_DEVICE_ID1_W25Q32 0x16
#define SF_DEVICE_ID1_W25Q64 0x17
@@ -152,7 +152,7 @@ typedef enum {
#define SF_VENDOR_ID_WINBOND 0xEF
#define SF_DEVICE_ID0_W25XXX 0x30
-#define SF_DEVICE_ID0_W25QXX 0x60
+
#define SF_DEVICE_ID1_W25X80 0x14
#define SF_DEVICE_ID1_W25X16 0x15
#define SF_DEVICE_ID1_W25X32 0x16
diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
index 86cd67cea8..6b5d20ba57 100644
--- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
+++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
@@ -370,6 +370,7 @@ ConfigurePlatformClocks (
switch (PlatformInfoHob->BoardId) {
case BOARD_ID_MINNOW2:
+ case BOARD_ID_MINNOW2_COMPATIBLE:
default:
switch(PlatformInfoHob->PlatformFlavor) {
case FlavorTablet:
diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.c b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.c
index 092d3f3783..d9ec3fa841 100644
--- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.c
+++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.c
@@ -150,7 +150,7 @@ MultiPlatformGpioTableInit (
switch (PlatformInfoHob->BoardId) {
case BOARD_ID_MINNOW2: // Minnow2
-
+ case BOARD_ID_MINNOW2_COMPATIBLE:
Status = (**PeiServices).LocatePpi (
PeiServices,
&gEfiPeiReadOnlyVariable2PpiGuid,
@@ -509,6 +509,7 @@ MultiPlatformGpioProgram (
//
switch (PlatformInfoHob->BoardId) {
case BOARD_ID_MINNOW2:
+ case BOARD_ID_MINNOW2_COMPATIBLE:
DEBUG ((EFI_D_INFO, "Start to config Minnow2 GPIO pins\n"));
InternalGpioConfig(GPIO_SCORE_OFFSET, sizeof(mMinnow2_GpioInitData_SC)/sizeof(mMinnow2_GpioInitData_SC[0]), (GPIO_CONF_PAD_INIT *) (UINTN) PlatformInfoHob->PlatformGpioData_SC);
InternalGpioConfig(GPIO_NCORE_OFFSET, sizeof(mMinnow2_GpioInitData_NC)/sizeof(mMinnow2_GpioInitData_NC[0]), (GPIO_CONF_PAD_INIT *) (UINTN) PlatformInfoHob->PlatformGpioData_NC);
@@ -523,7 +524,7 @@ MultiPlatformGpioProgram (
// configure the CFIO Pnp settings
//
if (PlatformInfoHob->CfioEnabled) {
- if (PlatformInfoHob->BoardId == BOARD_ID_MINNOW2){
+ if (PlatformInfoHob->BoardId == BOARD_ID_MINNOW2 || PlatformInfoHob->BoardId == BOARD_ID_MINNOW2_COMPATIBLE){
InternalGpioConfig(GPIO_SCORE_OFFSET, sizeof(mNB_BB_FAB3_GpioInitData_SC_TRI)/sizeof(mNB_BB_FAB3_GpioInitData_SC_TRI[0]), (GPIO_CONF_PAD_INIT *) (UINTN)PlatformInfoHob->PlatformGpioData_SC_TRI);
}
}
diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.h b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.h
index aebfafa1b9..d8cd98e688 100644
--- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.h
+++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardGpios/BoardGpios.h
@@ -46,33 +46,33 @@ GPIO_INIT_ITEM("PLT_CLK3 GPIOC_99 " ,TRISTS ,NA ,F0
#define MINNOW2_GPIO_USE_SEL_VAL_64_70 0x00000000
#define MINNOW2_GPIO_USE_SEL_VAL_64_70 0x00000000
#define MINNOW2_GPIO_USE_SEL_VAL_SUS 0x00000000
-#define MINNOW2_GPIO_USE_SEL_VAL_SUS2 0x00000007
+#define MINNOW2_GPIO_USE_SEL_VAL_SUS2 0x00000001
#define MINNOW2_GPIO_IO_SEL_VAL_0_31 0x00000000
#define MINNOW2_GPIO_IO_SEL_VAL_32_63 0x00000000
#define MINNOW2_GPIO_IO_SEL_VAL_64_70 0x00000000
#define MINNOW2_GPIO_IO_SEL_VAL_SUS 0x00000000
-#define MINNOW2_GPIO_IO_SEL_VAL_SUS2 0x00000007
+#define MINNOW2_GPIO_IO_SEL_VAL_SUS2 0x00000001
#define MINNOW2_GPIO_LVL_VAL_0_31 0x00000000
#define MINNOW2_GPIO_LVL_VAL_32_63 0x00000000
#define MINNOW2_GPIO_LVL_VAL_64_70 0x00000000
#define MINNOW2_GPIO_LVL_VAL_SUS 0x00000000
-#define MINNOW2_GPIO_LVL_VAL_SUS2 0x00000007
+#define MINNOW2_GPIO_LVL_VAL_SUS2 0x00000001
#define MINNOW2_GPIO_TPE_VAL_0_31 0x00000000
#define MINNOW2_GPIO_TPE_VAL_SUS 0x00000000
-#define MINNOW2_GPIO_TPE_VAL_SUS2 0x00000007
+#define MINNOW2_GPIO_TPE_VAL_SUS2 0x00000001
#define MINNOW2_GPIO_TNE_VAL_0_31 0x00000000
#define MINNOW2_GPIO_TNE_VAL_SUS 0x00000000
-#define MINNOW2_GPIO_TNE_VAL_SUS2 0x00000007
+#define MINNOW2_GPIO_TNE_VAL_SUS2 0x00000001
#define MINNOW2_GPIO_TS_VAL_0_31 0x00000000
#define MINNOW2_GPIO_TS_VAL_SUS 0x00000000
-#define MINNOW2_GPIO_TS_VAL_SUS2 0x00000007
+#define MINNOW2_GPIO_TS_VAL_SUS2 0x00000001
static CFIO_INIT_STRUCT mMinnow2CfioInitData =
{
diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardOemIds/BoardOemIds.c b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardOemIds/BoardOemIds.c
index 7381e00875..dc2093121d 100644
--- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardOemIds/BoardOemIds.c
+++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardOemIds/BoardOemIds.c
@@ -34,6 +34,7 @@ InitializeBoardOemId (
switch (PlatformInfoHob->BoardId) {
case BOARD_ID_MINNOW2:
+ case BOARD_ID_MINNOW2_COMPATIBLE:
default:
OemId = EFI_ACPI_OEM_ID_DEFAULT;
OemTableId = EFI_ACPI_OEM_TABLE_ID_DEFAULT;
diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardSsidSvid/BoardSsidSvid.c b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardSsidSvid/BoardSsidSvid.c
index 4a05d313f8..9140009bad 100644
--- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardSsidSvid/BoardSsidSvid.c
+++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardSsidSvid/BoardSsidSvid.c
@@ -32,9 +32,10 @@ InitializeBoardSsidSvid (
//
switch (PlatformInfoHob->BoardId) {
case BOARD_ID_MINNOW2:
- default:
- SsidSvidValue = SUBSYSTEM_SVID_SSID;//SUBSYSTEM_SVID_SSID_DEFAULT;
- break;
+ case BOARD_ID_MINNOW2_COMPATIBLE:
+ default:
+ SsidSvidValue = SUBSYSTEM_SVID_SSID;//SUBSYSTEM_SVID_SSID_DEFAULT;
+ break;
}
PlatformInfoHob->SsidSvid = SsidSvidValue;
return EFI_SUCCESS;
diff --git a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
index a1cd072c8f..645b865cdd 100644
--- a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
+++ b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
@@ -483,18 +483,6 @@ SpiBiosProtectionFunction(
(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,
diff --git a/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c b/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c
index 0b0acf5d2f..368aa846e3 100644
--- a/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c
+++ b/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c
@@ -905,6 +905,7 @@ PlatformEarlyInitEntry (
PlatformInfo->BoardId == BOARD_ID_BB_RVP ||
PlatformInfo->BoardId == BOARD_ID_BS_RVP ||
PlatformInfo->BoardId == BOARD_ID_MINNOW2 ||
+ PlatformInfo->BoardId == BOARD_ID_MINNOW2_COMPATIBLE||
PlatformInfo->BoardId == BOARD_ID_CVH) {
ConfigureLpssAndSccGpio(&SystemConfiguration, PlatformInfo);
diff --git a/Vlv2TbltDevicePkg/PlatformPei/Platform.c b/Vlv2TbltDevicePkg/PlatformPei/Platform.c
index 23be887ca4..ec5e4b3458 100644
--- a/Vlv2TbltDevicePkg/PlatformPei/Platform.c
+++ b/Vlv2TbltDevicePkg/PlatformPei/Platform.c
@@ -192,6 +192,57 @@ PeiSmbusExec (
);
+/**
+
+ Detemine compatible board
+ @return 0: Not compatible board
+ 1: Compatible board
+
+**/
+UINT32
+DetermineCompatibleBoard (
+ void
+ )
+{
+ UINTN PciD31F0RegBase = 0;
+ UINT32 GpioValue = 0;
+ UINT32 TmpVal = 0;
+ UINT32 MmioConf0 = 0;
+ UINT32 MmioPadval = 0;
+ UINT32 PConf0Offset = 0x200; //GPIO_S5_4 pad_conf0 register offset
+ UINT32 PValueOffset = 0x208; //GPIO_S5_4 pad_value register offset
+ UINT32 SSUSOffset = 0x2000;
+ UINT32 IoBase = 0;
+
+ DEBUG ((EFI_D_ERROR, "DetermineCompatibleBoard() Entry\n"));
+ PciD31F0RegBase = MmPciAddress (0,
+ 0,
+ PCI_DEVICE_NUMBER_PCH_LPC,
+ PCI_FUNCTION_NUMBER_PCH_LPC,
+ 0
+ );
+ IoBase = MmioRead32 (PciD31F0RegBase + R_PCH_LPC_IO_BASE) & B_PCH_LPC_IO_BASE_BAR;
+
+ MmioConf0 = IoBase + SSUSOffset + PConf0Offset;
+ MmioPadval = IoBase + SSUSOffset + PValueOffset;
+ //0xFED0E200/0xFED0E208 is pad_Conf/pad_val register address of GPIO_S5_4
+ DEBUG ((EFI_D_ERROR, "MmioConf0[0x%x], MmioPadval[0x%x]\n", MmioConf0, MmioPadval));
+
+ MmioWrite32 (MmioConf0, 0x2003CC00);
+
+ TmpVal = MmioRead32 (MmioPadval);
+ TmpVal &= ~0x6; //Clear bit 1:2
+ TmpVal |= 0x2; // Set the pin as GPI
+ MmioWrite32 (MmioPadval, TmpVal);
+
+ GpioValue = MmioRead32 (MmioPadval);
+
+ DEBUG ((EFI_D_ERROR, "Gpio_S5_4 value is 0x%x\n", GpioValue));
+ return (GpioValue & 0x1);
+}
+
+
+
EFI_STATUS
FtpmPolicyInit (
IN CONST EFI_PEI_SERVICES **PeiServices,
@@ -854,6 +905,7 @@ ReadPlatformIds (
UINTN DataSize;
EFI_PLATFORM_INFO_HOB TmpHob;
EFI_PEI_READ_ONLY_VARIABLE2_PPI *PeiVar;
+ UINT32 CompatibleBoard = 0;
Status = (**PeiServices).LocatePpi (
PeiServices,
@@ -882,9 +934,15 @@ ReadPlatformIds (
return Status;
}
-
- PlatformInfoHob->BoardId = BOARD_ID_MINNOW2;
- DEBUG ((EFI_D_INFO, "I'm Minnow2!\n"));
+ CompatibleBoard = DetermineCompatibleBoard();
+ if (1 == CompatibleBoard) {
+ PlatformInfoHob->BoardId = BOARD_ID_MINNOW2_COMPATIBLE;
+ DEBUG ((EFI_D_INFO, "I'm MinnowBoard Compatible!\n"));
+ } else {
+ PlatformInfoHob->BoardId = BOARD_ID_MINNOW2;
+ DEBUG ((EFI_D_INFO, "I'm MinnowBoard Max!\n"));
+ }
+
PlatformInfoHob->MemCfgID = 0;
PlatformInfoHob->BoardRev = FabId + 1; // FabId = 0 means FAB1 (BoardRev = 1), FabId = 1 means FAB2 (BoardRev = 2)...
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi
index 13786fcb41..8115eb9699 100644
--- a/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi
+++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi
@@ -33,7 +33,26 @@ form formid = THERMAL_FORM_ID,
title = STRING_TOKEN(STR_THERMAL_TITLE);
subtitle text = STRING_TOKEN(STR_THERMAL_CONFIGURATION);
-
+ oneof varid = Setup.CriticalThermalTripPoint,
+ prompt = STRING_TOKEN(STR_ACPI_CRITICAL_THERMAL_TRIP_POINT),
+ help = STRING_TOKEN(STR_ACPI_CRITICAL_THERMAL_TRIP_POINT_HELP),
+ option text = STRING_TOKEN (STR_85_C), value = 85, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_87_C), value = 87, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_90_C), value = 90, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_105_C), value = 105, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_110_C), value = 110, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_200_C), value = 200, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
+ oneof varid = Setup.PassiveThermalTripPoint,
+ prompt = STRING_TOKEN (STR_ACPI_PASSIVE_THERMAL_TRIP_POINT),
+ help = STRING_TOKEN (STR_ACPI_PASSIVE_THERMAL_TRIP_POINT_HELP),
+ option text = STRING_TOKEN (STR_85_C), value = 85, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_87_C), value = 87, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_90_C), value = 90, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_100_C), value = 100, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_105_C), value = 105, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_180_C), value = 180, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
suppressif TRUE;
numeric varid = Setup.PassiveTc1Value,
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr b/Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr
index e520033191..6922ce2c3f 100644
--- a/Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr
+++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Vfr.vfr
@@ -21,6 +21,8 @@ formset
guid = SYSTEM_CONFIGURATION_GUID,
title = STRING_TOKEN(STR_SYSTEM_SETUP_TITLE),
help = STRING_TOKEN(STR_SYSTEM_SETUP_HELP),
+ class = 1,
+ subclass = 0,
varstore SYSTEM_CONFIGURATION, name = Setup, guid = SYSTEM_CONFIGURATION_GUID;
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni
index 2aed705295..144579aa2c 100644
--- a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni
+++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni
Binary files differ
diff --git a/Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.c b/Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.c
index dd3e5dc656..c26fa8596b 100644
--- a/Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.c
+++ b/Vlv2TbltDevicePkg/SaveMemoryConfig/SaveMemoryConfig.c
@@ -123,7 +123,7 @@ SaveMemoryConfigEntryPoint (
MemInfoProtocol->MemInfoData.memSize = 0;
for (Channel = 0; Channel < CH_NUM; Channel ++){
for (Slot = 0; Slot < DIMM_NUM; Slot ++){
- MemInfoProtocol->MemInfoData.dimmSize[Slot + (Channel * DIMM_NUM)] = PlatformInfoHobPtr->MemData.DimmSize[Slot];
+ MemInfoProtocol->MemInfoData.dimmSize[Slot + (Channel * DIMM_NUM)] = PlatformInfoHobPtr->MemData.DimmSize[Slot + (Channel * DIMM_NUM)];
}
}
MemInfoProtocol->MemInfoData.memSize = PlatformInfoHobPtr->MemData.MemSize;
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
index 6570e7cfd2..24b9d44b7a 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturerFunction.c
@@ -29,8 +29,11 @@ Abstract:
#include <Library/NetLib.h>
#include "Library/DebugLib.h"
#include <Uefi/UefiBaseType.h>
+#include <Guid/PlatformInfo.h>
+extern EFI_PLATFORM_INFO_HOB *mPlatformInfo;
+
/**
This function makes boot time changes to the contents of the
MiscBaseBoardManufacturer (Type 2).
@@ -66,16 +69,21 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer)
CHAR16 *MacStr;
EFI_HANDLE *Handles;
UINTN BufferSize;
+ CHAR16 Buffer[40];
ForType2InputData = (EFI_MISC_BASE_BOARD_MANUFACTURER *)RecordData;
//
// First check for invalid parameters.
//
- if (RecordData == NULL) {
+ if (RecordData == NULL || mPlatformInfo == NULL) {
return EFI_INVALID_PARAMETER;
}
+ if (BOARD_ID_MINNOW2_COMPATIBLE == mPlatformInfo->BoardId) {
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"Compatible Vendor");
+ HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_BASE_BOARD_MANUFACTURER), Buffer, NULL);
+ }
TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER);
Manufacturer = SmbiosMiscGetString (TokenToGet);
ManuStrLen = StrLen(Manufacturer);
@@ -83,6 +91,10 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer)
return EFI_UNSUPPORTED;
}
+ if (BOARD_ID_MINNOW2_COMPATIBLE == mPlatformInfo->BoardId) {
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"MinnowBoard Compatible Platform");
+ HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_BASE_BOARD_PRODUCT_NAME1), Buffer, NULL);
+ }
TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_PRODUCT_NAME1);
Product = SmbiosMiscGetString (TokenToGet);
ProductStrLen = StrLen(Product);
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManufacturerFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManufacturerFunction.c
index f503a2a640..206167fe58 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManufacturerFunction.c
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManufacturerFunction.c
@@ -25,8 +25,11 @@ Abstract:
#include "CommonHeader.h"
-
#include "MiscSubclassDriver.h"
+#include <Guid/PlatformInfo.h>
+
+
+extern EFI_PLATFORM_INFO_HOB *mPlatformInfo;
/**
This function makes boot time changes to the contents of the
@@ -55,16 +58,21 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer)
EFI_SMBIOS_HANDLE SmbiosHandle;
SMBIOS_TABLE_TYPE3 *SmbiosRecord;
EFI_MISC_CHASSIS_MANUFACTURER *ForType3InputData;
+ CHAR16 Buffer[40];
ForType3InputData = (EFI_MISC_CHASSIS_MANUFACTURER *)RecordData;
//
// First check for invalid parameters.
//
- if (RecordData == NULL) {
+ if (RecordData == NULL || mPlatformInfo == NULL) {
return EFI_INVALID_PARAMETER;
}
+ if (BOARD_ID_MINNOW2_COMPATIBLE == mPlatformInfo->BoardId) {
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"Compatible Vendor");
+ HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_CHASSIS_MANUFACTURER), Buffer, NULL);
+ }
TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_MANUFACTURER);
Manufacturer = SmbiosMiscGetString (TokenToGet);
ManuStrLen = StrLen(Manufacturer);
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverEntryPoint.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverEntryPoint.c
index cae5a8e38a..e2cdb03526 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverEntryPoint.c
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSubclassDriverEntryPoint.c
@@ -26,13 +26,14 @@ Abstract:
#include "CommonHeader.h"
-
#include "MiscSubclassDriver.h"
#include <Protocol/HiiString.h>
+#include <Guid/PlatformInfo.h>
+
EFI_HII_HANDLE mHiiHandle;
EFI_HII_STRING_PROTOCOL *mHiiString;
-
+EFI_PLATFORM_INFO_HOB *mPlatformInfo=NULL;
EFI_STRING
EFIAPI
@@ -122,7 +123,19 @@ MiscSubclassDriverEntryPoint (
UINTN Index;
EFI_STATUS EfiStatus;
EFI_SMBIOS_PROTOCOL *Smbios;
+ EFI_PEI_HOB_POINTERS GuidHob;
+
+
+ GuidHob.Raw = GetHobList ();
+ if (GuidHob.Raw != NULL) {
+ if ((GuidHob.Raw = GetNextGuidHob (&gEfiPlatformInfoGuid, GuidHob.Raw)) != NULL) {
+ mPlatformInfo = GET_GUID_HOB_DATA (GuidHob.Guid);
+ }
+ }
+
+ DEBUG ((EFI_D_ERROR, "PlatformInfoHob->BoardId [0x%x]\n", mPlatformInfo->BoardId));
+
//
// Retrieve the pointer to the UEFI HII String Protocol
//
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
index ff08b5b52f..99906d0613 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c
@@ -30,6 +30,11 @@ Abstract:
#include <Library/NetLib.h>
#include "Library/DebugLib.h"
#include <Uefi/UefiBaseType.h>
+#include <Guid/PlatformInfo.h>
+
+
+extern EFI_PLATFORM_INFO_HOB *mPlatformInfo;
+
/**
@@ -70,77 +75,86 @@ AddSmbiosManuCallback (
EFI_SMBIOS_PROTOCOL *Smbios;
CHAR16 Buffer[40];
- CHAR16 *MacStr;
- EFI_HANDLE *Handles;
- UINTN BufferSize;
+ CHAR16 *MacStr;
+ EFI_HANDLE *Handles;
+ UINTN BufferSize;
+ CHAR16 PlatformNameBuffer[40];
ForType1InputData = (EFI_MISC_SYSTEM_MANUFACTURER *)Context;
//
// First check for invalid parameters.
//
- if (Context == NULL) {
+ if (Context == NULL || mPlatformInfo == NULL) {
return EFI_INVALID_PARAMETER;
}
Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID *) &Smbios);
ASSERT_EFI_ERROR (Status);
+
+ if (BOARD_ID_MINNOW2_COMPATIBLE == mPlatformInfo->BoardId) {
+ // Detect the board is compatible board platform
+ UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer),L"%s",L"Minnowboard Compatible ");
+ } else {
+ UnicodeSPrint (PlatformNameBuffer, sizeof (PlatformNameBuffer),L"%s",L"Minnowboard Max ");
+ }
+
//
// Silicon Steppings
//
switch (PchStepping()) {
case PchA0:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX A0 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"A0 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"A0");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
DEBUG ((EFI_D_ERROR, "A0 Stepping Detected\n"));
break;
case PchA1:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX A1 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"A1 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"A1");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
DEBUG ((EFI_D_ERROR, "A1 Stepping Detected\n"));
break;
case PchB0:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX B0 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"B0 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"B0");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
DEBUG ((EFI_D_ERROR, "B0 Stepping Detected\n"));
break;
case PchB1:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX B1 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"B1 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"B1");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
DEBUG ((EFI_D_ERROR, "B1 Stepping Detected\n"));
break;
case PchB2:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX B2 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"B2 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"B2");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
DEBUG ((EFI_D_ERROR, "B2 Stepping Detected\n"));
break;
case PchB3:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX B3 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"B3 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"B3");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
DEBUG ((EFI_D_ERROR, "B3 Stepping Detected\n"));
break;
case PchC0:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX C0 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"C0 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"C0");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
DEBUG ((EFI_D_ERROR, "C0 Stepping Detected\n"));
break;
case PchD0:
- UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"MinnowBoard MAX D0 PLATFORM");
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"%s%s", PlatformNameBuffer, L"D0 PLATFORM");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME), Buffer, NULL);
UnicodeSPrint (Buffer, sizeof (Buffer),L"%s",L"D0");
HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_VERSION), Buffer, NULL);
@@ -151,7 +165,10 @@ AddSmbiosManuCallback (
break;
}
-
+ if (BOARD_ID_MINNOW2_COMPATIBLE == mPlatformInfo->BoardId) {
+ UnicodeSPrint (Buffer, sizeof (Buffer),L"Compatible Vendor");
+ HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_SYSTEM_MANUFACTURER), Buffer, NULL);
+ }
TokenToGet = STRING_TOKEN (STR_MISC_SYSTEM_MANUFACTURER);
Manufacturer = SmbiosMiscGetString (TokenToGet);
ManuStrLen = StrLen(Manufacturer);
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf b/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf
index 842dda3600..332d2376d8 100644
--- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf
+++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf
@@ -114,6 +114,7 @@
PchPlatformLib
I2cLib
NetLib
+ HobLib
[Guids]
gEfiProcessorSubClassGuid