From ec8a502e66fe190a77546e82820e921cfa9d05e0 Mon Sep 17 00:00:00 2001 From: Elvin Li Date: Tue, 17 Mar 2015 08:12:59 +0000 Subject: ShellPkg: update smbiosview for SMBIOS 3.0. smbiosview can dump 64-bit entry point and table as long as SMBIOS 3.0 table exists in system configuration table. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Elvin Li Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17060 6f19259b-4bc3-4df7-8a09-765794883524 --- .../SmbiosView/PrintInfo.c | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c') diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 676aedef6e..1494c47e37 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -199,6 +199,75 @@ SmbiosPrintEPSInfo ( Print (L"\n"); } +/** + Print the info of 64-bit EPS(Entry Point Structure). + + @param[in] SmbiosTable Pointer to the SMBIOS table entry point. + @param[in] Option Display option. +**/ +VOID +Smbios64BitPrintEPSInfo ( + IN SMBIOS_TABLE_3_0_ENTRY_POINT *SmbiosTable, + IN UINT8 Option + ) +{ + UINT8 Anchor[5]; + + if (SmbiosTable == NULL) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_SMBIOSTABLE_NULL), gShellDebug1HiiHandle); + return ; + } + + if (Option == SHOW_NONE) { + return ; + } + + if (Option >= SHOW_NORMAL) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_64_BIT_ENTRY_POINT_SIGN), gShellDebug1HiiHandle); + + MemToString (Anchor, SmbiosTable->AnchorString, 5); + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ANCHOR_STR), gShellDebug1HiiHandle, Anchor); + + ShellPrintHiiEx(-1,-1,NULL, + STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_EPS_CHECKSUM), + gShellDebug1HiiHandle, + SmbiosTable->EntryPointStructureChecksum + ); + + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_LEN), gShellDebug1HiiHandle, SmbiosTable->EntryPointLength); + + ShellPrintHiiEx(-1,-1,NULL, + STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_VERSION), + gShellDebug1HiiHandle, + SmbiosTable->MajorVersion, + SmbiosTable->MinorVersion + ); + + ShellPrintHiiEx(-1,-1,NULL, + STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DOCREV), + gShellDebug1HiiHandle, + SmbiosTable->DocRev + ); + + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_MAX_SIZE), gShellDebug1HiiHandle, SmbiosTable->TableMaximumSize); + + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TABLE_ADDR), gShellDebug1HiiHandle, SmbiosTable->TableAddress); + + } + // + // If SHOW_ALL, also print followings. + // + if (Option >= SHOW_DETAIL) { + ShellPrintHiiEx(-1,-1,NULL, + STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ENTRY_POINT_REVISION), + gShellDebug1HiiHandle, + SmbiosTable->EntryPointRevision + ); + } + + Print (L"\n"); +} + /** This function print the content of the structure pointed by Struct. -- cgit v1.2.3