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

@@ -26,5 +26,5 @@ OEM_ID = I32
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#

View File

@@ -26,5 +26,5 @@ OEM_ID = I32
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#

View File

@@ -25,6 +25,6 @@ BOARD_REV = 1
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
#

View File

@@ -25,6 +25,6 @@ BOARD_REV = 1
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
#

View File

@@ -176,7 +176,8 @@ typedef enum {
} EFI_PLATFORM_IGD_DATA;
typedef enum {
BOARD_ID_AV_SVP = 0x0, // Alpine Valley Board
BOARD_ID_AV_SVP = 0x0, // Alpine Valley Board
BOARD_ID_BL_RVP = 0x2, // BayLake Board (RVP)
BOARD_ID_BL_FFRD8 = 0x3, // FFRD8 b'0011
BOARD_ID_BL_FFRD = 0x4, // BayLake Board (FFRD)
BOARD_ID_BL_RVP_DDR3L = 0x5, // BayLake Board (RVP DDR3L)

View File

@@ -66,7 +66,7 @@ typedef enum {
#define SF_VENDOR_ID_ATMEL 0x1F
#define SF_DEVICE_ID0_AT26DF321 0x47
#define SF_DEVICE_ID1_AT26DF321 0x00
#define SF_DEVICE_ID0_AT25DF321A 0x47
#define SF_DEVICE_ID0_AT25DF321A 0x47
#define SF_DEVICE_ID1_AT25DF321A 0x01
#define SF_DEVICE_ID0_AT25DF641 0x48
#define SF_DEVICE_ID1_AT25DF641 0x00
@@ -152,7 +152,7 @@ typedef enum {
#define SF_DEVICE_ID1_25VF016B 0x41
#define SF_VENDOR_ID_ATMEL 0x1F
#define SF_DEVICE_ID0_AT26DF321 0x47
#define SF_DEVICE_ID0_AT26DF321 0x47
#define SF_DEVICE_ID1_AT26DF321 0x00
#define SF_VENDOR_ID_STM 0x20

View File

@@ -370,6 +370,7 @@ ConfigurePlatformClocks (
if(!EFI_ERROR (Status)){
EnableSpreadSpectrum = SystemConfiguration.EnableClockSpreadSpec;
}
//
// Perform platform-specific intialization dependent upon Board ID:
//

View File

@@ -150,7 +150,7 @@ MultiPlatformGpioTableInit (
EFI_PEI_READ_ONLY_VARIABLE2_PPI *PeiReadOnlyVarPpi;
UINTN VarSize;
SYSTEM_CONFIGURATION SystemConfiguration;
DEBUG ((EFI_D_INFO, "MultiPlatformGpioTableInit()...\n"));
//
@@ -509,6 +509,7 @@ MultiPlatformGpioProgram (
IoWrite32 (GPIO_BASE_ADDRESS + R_PCH_GPIO_SUS_TS, PlatformCfioDataPtr->TS_SS);
//
// GPIO Wake Enable.
//
IoWrite32 (GPIO_BASE_ADDRESS + R_PCH_GPIO_SUS_WAKE_EN, PlatformCfioDataPtr->WE_SS);
@@ -523,7 +524,7 @@ MultiPlatformGpioProgram (
InternalGpioConfig(GPIO_NCORE_OFFSET, sizeof(mMinnow2_GpioInitData_NC)/sizeof(mMinnow2_GpioInitData_NC[0]), (GPIO_CONF_PAD_INIT *) (UINTN) PlatformInfoHob->PlatformGpioData_NC);
InternalGpioConfig(GPIO_SSUS_OFFSET, sizeof(mMinnow2_GpioInitData_SUS)/sizeof(mMinnow2_GpioInitData_SUS[0]), (GPIO_CONF_PAD_INIT *) (UINTN) PlatformInfoHob->PlatformGpioData_SUS);
break;
default:
default:
break;
}

View File

@@ -46,33 +46,33 @@ GPIO_INIT_ITEM("PLT_CLK3 GPIOC_99 " ,TRISTS ,NA ,F0
GPIO_INIT_ITEM("PLT_CLK0 GPIOC_96 " ,TRISTS ,NA ,F0 , , ,NONE ,0x6a),
GPIO_INIT_ITEM("PLT_CLK3 GPIOC_99 " ,TRISTS ,NA ,F0 , , ,NONE ,0x68),
};
//
// Minnow2
//
#define MINNOW2_GPIO_USE_SEL_VAL_0_31 0x00000000
#define MINNOW2_GPIO_USE_SEL_VAL_32_63 0x00000000
#define MINNOW2_GPIO_USE_SEL_VAL_64_70 0x00000000
#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 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_64_70 0x00000000
#define MINNOW2_GPIO_IO_SEL_VAL_SUS 0x00000000
#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_SUS 0x00000000
#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_SUS 0x00000000
#define MINNOW2_GPIO_TPE_VAL_SUS2 0x00000001
#define MINNOW2_GPIO_TNE_VAL_0_31 0x00000000

View File

@@ -34,6 +34,7 @@ InitializeBoardOemId (
IN EFI_PLATFORM_INFO_HOB *PlatformInfoHob
)
{
UINT64 OemId;
UINT64 OemTableId;
//

View File

@@ -32,9 +32,10 @@ InitializeBoardSsidSvid (
InitializeBoardSsidSvid (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PLATFORM_INFO_HOB *PlatformInfoHob
)
{
UINT32 SsidSvidValue = 0;
)
{
UINT32 SsidSvidValue = 0;
//
// Set OEM ID according to Board ID.
//

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,

View File

@@ -905,6 +905,7 @@ PlatformEarlyInitEntry (
//
// Baylake Board specific.
//
if (PlatformInfo->BoardId == BOARD_ID_BL_RVP ||
PlatformInfo->BoardId == BOARD_ID_BL_FFRD ||
PlatformInfo->BoardId == BOARD_ID_BL_FFRD8 ||

View File

@@ -192,6 +192,57 @@ PeiSmbusExec (
//
EFI_STATUS
PeiSmbusExec (
UINT16 SmbusBase,
UINT8 SlvAddr,
UINT8 Operation,
UINT8 Offset,
UINT8 *Length,
UINT8 *Buffer
);
/**
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);
@@ -854,6 +905,7 @@ ReadPlatformIds (
EFI_STATUS
ReadPlatformIds (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT EFI_PLATFORM_INFO_HOB *PlatformInfoHob
)
{
{
@@ -882,9 +934,15 @@ ReadPlatformIds (
&DataSize,
&TmpHob
);
if (Status == EFI_SUCCESS) {
PlatformInfoHob->BoardId = TmpHob.BoardId;
if (Status == EFI_SUCCESS) {
PlatformInfoHob->BoardId = TmpHob.BoardId;
PlatformInfoHob->MemCfgID = TmpHob.MemCfgID;
PlatformInfoHob->BoardRev = TmpHob.BoardRev;
PlatformInfoHob->PlatformFlavor = TmpHob.PlatformFlavor;
return Status;
}
CompatibleBoard = DetermineCompatibleBoard();
if (1 == CompatibleBoard) {
PlatformInfoHob->BoardId = BOARD_ID_MINNOW2_COMPATIBLE;

View File

@@ -33,7 +33,26 @@ form formid = THERMAL_FORM_ID,
// Revision History:
// ------------------------------------------------------------------------------
// Rev Date<MM/DD/YYYY> Name Description
// ------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// --*/
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;

View File

@@ -21,6 +21,8 @@ formset
//
//
//
#include "Configuration.h"
#include "PlatformSetupDxeStrDefs.h"
#include "Guid/SetupVariable.h"

View File

@@ -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;

View File

@@ -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);

View File

@@ -25,8 +25,11 @@ Abstract:
MiscChassisManufacturerFunction.c
Abstract:
Abstract:
Chassis manufacturer information boot time changes.
SMBIOS type 3.
--*/
@@ -55,16 +58,21 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer)
UINTN VerStrLen;
UINTN AssertTagStrLen;
UINTN SerialNumStrLen;
EFI_STATUS Status;
EFI_STRING Manufacturer;
EFI_STRING Version;
EFI_STRING SerialNumber;
EFI_STRING AssertTag;
STRING_REF TokenToGet;
EFI_SMBIOS_HANDLE SmbiosHandle;
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 || mPlatformInfo == NULL) {
return EFI_INVALID_PARAMETER;

View File

@@ -26,13 +26,14 @@ Abstract:
MiscSubclassDriverEntryPoint.c
Abstract:
This driver parses the mMiscSubclassDataTable structure and reports
any generated data to the DataHub.
**/
#include "CommonHeader.h"
#include "MiscSubclassDriver.h"
#include <Protocol/HiiString.h>
@@ -122,7 +123,19 @@ MiscSubclassDriverEntryPoint (
**/
EFI_STATUS
EFIAPI
MiscSubclassDriverEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
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) {

View File

@@ -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);

View File

@@ -114,6 +114,7 @@
PchPlatformLib
I2cLib
NetLib
HobLib
[Guids]
gEfiProcessorSubClassGuid