From 4641e70095e19616fe318d6753baf3dc11dbf569 Mon Sep 17 00:00:00 2001 From: andrewfish Date: Tue, 31 Jan 2012 00:18:25 +0000 Subject: 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 --- .../Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 11 +++++++++++ 1 file changed, 11 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 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; // -- cgit v1.2.3