Add firmware version to front page

This commit is contained in:
Jeremy Soller
2019-10-04 13:38:39 -06:00
committed by Tim Crawford
parent b0e7e3919f
commit 826b9d30cf
2 changed files with 35 additions and 21 deletions

View File

@ -926,10 +926,10 @@ UpdateFrontPageStrings (
Str2Index = SmbiosTable.Type0->BiosReleaseDate;
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), StrIndex, &NewString);
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), Str2Index, &NewString2);
StrCatS (NewString3, 0x80 / sizeof (CHAR16), L"FW: ");
StrCatS (NewString3, 0x80 / sizeof (CHAR16), L"Version: ");
StrCatS (NewString3, 0x80 / sizeof (CHAR16), NewString);
StrCatS (NewString3, 0x80 / sizeof (CHAR16), L" ");
StrCatS (NewString3, 0x80 / sizeof (CHAR16), NewString2);
// StrCatS (NewString3, 0x80 / sizeof (CHAR16), L" ");
// StrCatS (NewString3, 0x80 / sizeof (CHAR16), NewString2);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
FreePool (NewString);
@ -959,6 +959,16 @@ UpdateFrontPageStrings (
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_TITLE);
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
FreePool (NewString);
NewString3 = AllocateZeroPool (0x60);
StrIndex = SmbiosTable.Type1->Version;
GetOptionalStringByIndex ((CHAR8*)((UINT8*)SmbiosTable.Raw + SmbiosTable.Hdr->Length), StrIndex, &NewString);
StrCatS (NewString3, 0x60 / sizeof (CHAR16), L"Model: ");
StrCatS (NewString3, 0x60 / sizeof (CHAR16), NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString3, NULL);
FreePool (NewString);
}
SmbiosTable = GetSmbiosTableFromType (EntryPoint, SMBIOS_TYPE_PROCESSOR_INFORMATION , 0);