summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-10-11 02:19:36 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2014-10-11 02:19:36 +0000
commit6d5b88f372180dc3a8622fda19ae0ac1fb076ae8 (patch)
tree45577f84213fdedb9d0eda6bcbd370714c2abfa9 /IntelFrameworkModulePkg/Universal/BdsDxe
parentebb923532915eb33371d97cf8f2e706139ae75a2 (diff)
downloadedk2-platforms-6d5b88f372180dc3a8622fda19ae0ac1fb076ae8.tar.xz
Removes dependencies on SMBIOS in the IntelFrameworkModulePkg’s BDS.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16207 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
index 1a864bc779..f69b17c7bf 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
@@ -741,66 +741,66 @@ UpdateFrontPageStrings (
NULL,
(VOID **) &Smbios
);
- ASSERT_EFI_ERROR (Status);
+ if (!EFI_ERROR (Status)) {
+ SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
+ do {
+ Status = Smbios->GetNext (Smbios, &SmbiosHandle, NULL, &Record, NULL);
+ if (EFI_ERROR(Status)) {
+ break;
+ }
- SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
- do {
- Status = Smbios->GetNext (Smbios, &SmbiosHandle, NULL, &Record, NULL);
- if (EFI_ERROR(Status)) {
- break;
- }
+ if (Record->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) {
+ Type0Record = (SMBIOS_TABLE_TYPE0 *) Record;
+ StrIndex = Type0Record->BiosVersion;
+ GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record + Type0Record->Hdr.Length), StrIndex, &NewString);
+ TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
+ HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
+ FreePool (NewString);
+ Find[0] = TRUE;
+ }
- if (Record->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) {
- Type0Record = (SMBIOS_TABLE_TYPE0 *) Record;
- StrIndex = Type0Record->BiosVersion;
- GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record + Type0Record->Hdr.Length), StrIndex, &NewString);
- TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
- HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
- FreePool (NewString);
- Find[0] = TRUE;
- }
+ if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) {
+ Type1Record = (SMBIOS_TABLE_TYPE1 *) Record;
+ StrIndex = Type1Record->ProductName;
+ GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record + Type1Record->Hdr.Length), StrIndex, &NewString);
+ TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
+ HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
+ FreePool (NewString);
+ Find[1] = TRUE;
+ }
- if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) {
- Type1Record = (SMBIOS_TABLE_TYPE1 *) Record;
- StrIndex = Type1Record->ProductName;
- GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record + Type1Record->Hdr.Length), StrIndex, &NewString);
- TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
- HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
- FreePool (NewString);
- Find[1] = TRUE;
- }
-
- if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
- Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
- StrIndex = Type4Record->ProcessorVersion;
- GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record + Type4Record->Hdr.Length), StrIndex, &NewString);
- TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_MODEL);
- HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
- FreePool (NewString);
- Find[2] = TRUE;
- }
-
- if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
- Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
- ConvertProcessorToString(Type4Record->CurrentSpeed, 6, &NewString);
- TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_SPEED);
- HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
- FreePool (NewString);
- Find[3] = TRUE;
- }
-
- if ( Record->Type == EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS ) {
- Type19Record = (SMBIOS_TABLE_TYPE19 *) Record;
- ConvertMemorySizeToString (
- (UINT32)(RShiftU64((Type19Record->EndingAddress - Type19Record->StartingAddress + 1), 10)),
- &NewString
- );
- TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_MEMORY_SIZE);
- HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
- FreePool (NewString);
- Find[4] = TRUE;
- }
- } while ( !(Find[0] && Find[1] && Find[2] && Find[3] && Find[4]));
+ if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
+ Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
+ StrIndex = Type4Record->ProcessorVersion;
+ GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record + Type4Record->Hdr.Length), StrIndex, &NewString);
+ TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_MODEL);
+ HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
+ FreePool (NewString);
+ Find[2] = TRUE;
+ }
+
+ if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
+ Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
+ ConvertProcessorToString(Type4Record->CurrentSpeed, 6, &NewString);
+ TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_SPEED);
+ HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
+ FreePool (NewString);
+ Find[3] = TRUE;
+ }
+
+ if ( Record->Type == EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS ) {
+ Type19Record = (SMBIOS_TABLE_TYPE19 *) Record;
+ ConvertMemorySizeToString (
+ (UINT32)(RShiftU64((Type19Record->EndingAddress - Type19Record->StartingAddress + 1), 10)),
+ &NewString
+ );
+ TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_MEMORY_SIZE);
+ HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
+ FreePool (NewString);
+ Find[4] = TRUE;
+ }
+ } while ( !(Find[0] && Find[1] && Find[2] && Find[3] && Find[4]));
+ }
return ;
}