summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
diff options
context:
space:
mode:
authorElvin Li <elvin.li@intel.com>2015-03-17 08:12:59 +0000
committerli-elvin <li-elvin@Edk2>2015-03-17 08:12:59 +0000
commitec8a502e66fe190a77546e82820e921cfa9d05e0 (patch)
treec42572b9844e6d9072ec34667c183fed531023e2 /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
parentba9d087b8fb91f19c9accf9541332a36889e18ed (diff)
downloadedk2-platforms-ec8a502e66fe190a77546e82820e921cfa9d05e0.tar.xz
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 <elvin.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17060 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c69
1 files changed, 69 insertions, 0 deletions
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
@@ -200,6 +200,75 @@ SmbiosPrintEPSInfo (
}
/**
+ 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.
@param[in] Struct Point to the structure to be printed.