]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/Hob.c
IntelFrameworkModulePkg: Fix MSFT C4255 warning
[mirror_edk2.git] / EmbeddedPkg / Ebl / Hob.c
index c541f6696801a1f2ad18044c8164cee913a67b0d..edc0a744f47fb70f937089aeabeb03a9ade5ded1 100644 (file)
@@ -1,10 +1,11 @@
 /** @file\r
   Hob command for EBL (Embedded Boot Loader)\r
 \r
-  Copyright (c) 2007, Intel Corporation<BR>\r
-  Portions copyright (c) 2008-2009, Apple Inc. All rights reserved.\r
+  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 \r
-  All rights reserved. This program and the accompanying materials\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
   http://opensource.org/licenses/bsd-license.php\r
@@ -87,7 +88,7 @@
 **/\r
 \r
 #include "Ebl.h"\r
-// BugBug: Autogen does not allow this to be included currently \r
+// BugBug: Autogen does not allow this to be included currently\r
 //#include <EdkModulePkg/Include/EdkDxe.h>\r
 \r
 GLOBAL_REMOVE_IF_UNREFERENCED char *mHobResourceType[] = {\r
@@ -103,19 +104,20 @@ GLOBAL_REMOVE_IF_UNREFERENCED char *mHobResourceType[] = {
 \r
 \r
 /**\r
-  Dump out the HOBs in the system. HOBs are defined in the PI specificaiton\r
+  Dump out the HOBs in the system. HOBs are defined in the PI specification\r
   and they are used to hand off information from PEI to DXE.\r
 \r
   Argv[0] - "hob"\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
-                 Argv[0] is the comamnd name\r
+  @param  Argv   Array of strings that represent the parsed command line.\r
+                 Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 EblHobCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -129,9 +131,9 @@ EblHobCmd (
   CurrentRow = 0;\r
   for (Hob.Raw = GetHobList (); !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
     if (Hob.Header->HobType == EFI_HOB_TYPE_HANDOFF) {\r
-      AsciiPrint ("PHIT HOB Ver %x Boot Mode %02x Top %lx  Bottom %lx\n", \r
-        Hob.HandoffInformationTable->Version, \r
-        Hob.HandoffInformationTable->BootMode, \r
+      AsciiPrint ("PHIT HOB Ver %x Boot Mode %02x Top %lx  Bottom %lx\n",\r
+        Hob.HandoffInformationTable->Version,\r
+        Hob.HandoffInformationTable->BootMode,\r
         Hob.HandoffInformationTable->EfiMemoryTop,\r
         Hob.HandoffInformationTable->EfiMemoryBottom\r
         );\r
@@ -140,7 +142,7 @@ EblHobCmd (
         return EFI_SUCCESS;\r
       }\r
 \r
-      AsciiPrint ("    Free Top %lx Free Bottom %lx  End Of HOB %lx\n", \r
+      AsciiPrint ("    Free Top %lx Free Bottom %lx  End Of HOB %lx\n",\r
         Hob.HandoffInformationTable->EfiFreeMemoryTop,\r
         Hob.HandoffInformationTable->EfiFreeMemoryBottom,\r
         Hob.HandoffInformationTable->EfiEndOfHobList\r
@@ -149,9 +151,9 @@ EblHobCmd (
     } else if (Hob.Header->HobType == EFI_HOB_TYPE_MEMORY_ALLOCATION) {\r
       // mod(%) on array index is just to prevent buffer overrun\r
       AsciiPrint ("Mem Alloc HOB %a %g %08lx:%lx\n",\r
-        (Hob.MemoryAllocation->AllocDescriptor.MemoryType < EfiMaxMemoryType) ? gMemMapType[Hob.MemoryAllocation->AllocDescriptor.MemoryType] : "ILLEGAL TYPE", \r
-        &Hob.MemoryAllocation->AllocDescriptor.Name, \r
-        Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress, \r
+        (Hob.MemoryAllocation->AllocDescriptor.MemoryType < EfiMaxMemoryType) ? gMemMapType[Hob.MemoryAllocation->AllocDescriptor.MemoryType] : "ILLEGAL TYPE",\r
+        &Hob.MemoryAllocation->AllocDescriptor.Name,\r
+        Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress,\r
         Hob.MemoryAllocation->AllocDescriptor.MemoryLength\r
         );\r
       if (CompareGuid (&gEfiHobMemoryAllocModuleGuid, &Hob.MemoryAllocation->AllocDescriptor.Name)) {\r
@@ -163,9 +165,9 @@ EblHobCmd (
     } else if (Hob.Header->HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {\r
       AsciiPrint ("Resource HOB %a %g %08lx:%lx\n    Attributes: %08x\n",\r
         (Hob.ResourceDescriptor->ResourceType < EFI_RESOURCE_MAX_MEMORY_TYPE) ? mHobResourceType[Hob.ResourceDescriptor->ResourceType] : mHobResourceType[EFI_RESOURCE_MAX_MEMORY_TYPE],\r
-        &Hob.ResourceDescriptor->Owner, \r
-        Hob.ResourceDescriptor->PhysicalStart, \r
-        Hob.ResourceDescriptor->ResourceLength, \r
+        &Hob.ResourceDescriptor->Owner,\r
+        Hob.ResourceDescriptor->PhysicalStart,\r
+        Hob.ResourceDescriptor->ResourceLength,\r
         Hob.ResourceDescriptor->ResourceAttribute\r
         );\r
         if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
@@ -179,16 +181,16 @@ EblHobCmd (
           if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
             return EFI_SUCCESS;\r
           }\r
-          AsciiPrint ("    %a 0x%08x\n", \r
-            (EfiMemoryTypeInformation->Type < EfiMaxMemoryType) ? gMemMapType[EfiMemoryTypeInformation->Type] : "END       ", \r
+          AsciiPrint ("    %a 0x%08x\n",\r
+            (EfiMemoryTypeInformation->Type < EfiMaxMemoryType) ? gMemMapType[EfiMemoryTypeInformation->Type] : "END       ",\r
             EfiMemoryTypeInformation->NumberOfPages\r
             );\r
        }\r
       }\r
     } else if (Hob.Header->HobType == EFI_HOB_TYPE_FV) {\r
-      AsciiPrint ("FV HOB %08lx:%08lx\n", Hob.FirmwareVolume->BaseAddress, Hob.FirmwareVolume->Length);  \r
+      AsciiPrint ("FV HOB %08lx:%08lx\n", Hob.FirmwareVolume->BaseAddress, Hob.FirmwareVolume->Length);\r
     } else if (Hob.Header->HobType == EFI_HOB_TYPE_CPU) {\r
-      AsciiPrint ("CPU HOB: Mem %x IO %x\n", Hob.Cpu->SizeOfMemorySpace, Hob.Cpu->SizeOfIoSpace);  \r
+      AsciiPrint ("CPU HOB: Mem %x IO %x\n", Hob.Cpu->SizeOfMemorySpace, Hob.Cpu->SizeOfIoSpace);\r
     } else if (Hob.Header->HobType == EFI_HOB_TYPE_MEMORY_POOL) {\r
       AsciiPrint ("Mem Pool HOB:\n");\r
 /* Not in PI\r
@@ -199,7 +201,7 @@ EblHobCmd (
 \r
     if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
       break;\r
-    }    \r
+    }\r
   }\r
 \r
   return EFI_SUCCESS;\r