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

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