summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-31 00:18:25 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-31 00:18:25 +0000
commit4641e70095e19616fe318d6753baf3dc11dbf569 (patch)
treea6a18c353232b3c73535c5ae7654d062c7756fec /ShellPkg
parent8fa6b23c495b2b05592d5ab8036a9c72814969d4 (diff)
downloadedk2-platforms-4641e70095e19616fe318d6753baf3dc11dbf569.tar.xz
Fix type 19 print to match SBMIOS 2.7.
Note: Some one should port smbiosview to use the edk2 MdePkg/Include/IndustryStandard/SmBios.h and not carry it's own definitions, that are now out of date. signed-off-by:andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12971 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbios.h5
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbios.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbios.h
index 5e146cde52..4960587254 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbios.h
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbios.h
@@ -321,6 +321,11 @@ typedef struct {
UINT32 EndingAddress;
UINT16 MemoryArrayHandle;
UINT8 PartitionWidth;
+ //
+ // Add for smbios 2.7
+ //
+ UINT64 ExtendedStartingAddress;
+ UINT64 ExtendedEndingAddress;
} SMBIOS_TYPE19;
typedef struct {
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index 7c081bdf8a..feaf91065f 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -58,6 +58,12 @@
ShellPrintEx(-1,-1,L": 0x%x\n", (pStruct->type->element)); \
} while (0);
+#define PRINT_STRUCT_VALUE_LH(pStruct, type, element) \
+ do { \
+ ShellPrintEx(-1,-1,L"%a",#element); \
+ ShellPrintEx(-1,-1,L": 0x%lx\n", (pStruct->type->element)); \
+ } while (0);
+
#define PRINT_BIT_FIELD(pStruct, type, element, size) \
do { \
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DUMP), gShellDebug1HiiHandle); \
@@ -630,6 +636,11 @@ SmbiosPrintStructure (
PRINT_STRUCT_VALUE_H (Struct, Type19, EndingAddress);
PRINT_STRUCT_VALUE_H (Struct, Type19, MemoryArrayHandle);
PRINT_STRUCT_VALUE_H (Struct, Type19, PartitionWidth);
+ if (Struct->Hdr->Length >= 0x19) {
+ // SMBIOS 2.7+
+ PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedStartingAddress);
+ PRINT_STRUCT_VALUE_LH (Struct, Type19, ExtendedEndingAddress);
+ }
break;
//