]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Dmem.c
index 87c12fb97cac679724f0acd0ce1de267379839cd..42efb4c7d5b251491cc8b3434b184ae10bb4ac32 100644 (file)
@@ -1,8 +1,9 @@
 /** @file\r
   Main file for Dmem shell Debug1 function.\r
 \r
-  Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>  \r
+  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>  \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -30,7 +31,6 @@
   @return A printable character representing Char.\r
 **/\r
 CHAR16\r
-EFIAPI\r
 MakePrintable(\r
   IN CONST CHAR16 Char\r
   )\r
@@ -48,7 +48,6 @@ MakePrintable(
   @param[in] Size       The length of memory to display.\r
 **/\r
 SHELL_STATUS\r
-EFIAPI\r
 DisplayMmioMemory(\r
   IN CONST VOID   *Address,\r
   IN CONST UINTN  Size\r
@@ -67,7 +66,9 @@ DisplayMmioMemory(
     return (SHELL_NOT_FOUND);\r
   }\r
   Buffer = AllocateZeroPool(Size);\r
-  ASSERT(Buffer != NULL);\r
+  if (Buffer == NULL) {\r
+    return SHELL_OUT_OF_RESOURCES;\r
+  }\r
 \r
   Status = PciRbIo->Mem.Read(PciRbIo, EfiPciWidthUint8, (UINT64)(UINTN)Address, Size, Buffer);\r
   if (EFI_ERROR(Status)) {\r
@@ -193,6 +194,10 @@ ShellCommandRunDmem (
               SmbiosTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
               continue;\r
             }\r
+            if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiSmbios3TableGuid)) {\r
+              SmbiosTableAddress = (UINT64) (UINTN) gST->ConfigurationTable[TableWalker].VendorTable;\r
+              continue;\r
+            }\r
             if (CompareGuid(&gST->ConfigurationTable[TableWalker].VendorGuid, &gEfiMpsTableGuid)) {\r
               MpsTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;\r
               continue;\r