]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/EfiDevice.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / EmbeddedPkg / Ebl / EfiDevice.c
index c623bd8b7e17782e030a2cead28c301a2fbb8cda..7d2060936d10d18a89b2c513ec52c71c5cd73e56 100644 (file)
@@ -157,23 +157,23 @@ EblPrintLoadFileInfo (
 \r
   if (File->DevicePath != NULL) {\r
     // Try to print out the MAC address\r
-    for (DevicePathNode = File->DevicePath; \r
-        !IsDevicePathEnd (DevicePathNode); \r
+    for (DevicePathNode = File->DevicePath;\r
+        !IsDevicePathEnd (DevicePathNode);\r
         DevicePathNode = NextDevicePathNode (DevicePathNode)) {\r
-      \r
+\r
       if ((DevicePathType (DevicePathNode) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (DevicePathNode) == MSG_MAC_ADDR_DP)) {\r
         MacAddr = (MAC_ADDR_DEVICE_PATH *)DevicePathNode;\r
-        \r
+\r
         HwAddressSize = sizeof (EFI_MAC_ADDRESS);\r
         if (MacAddr->IfType == 0x01 || MacAddr->IfType == 0x00) {\r
           HwAddressSize = 6;\r
         }\r
-  \r
+\r
         AsciiPrint ("MAC ");\r
         for (Index = 0; Index < HwAddressSize; Index++) {\r
           AsciiPrint ("%02x", MacAddr->MacAddress.Addr[Index] & 0xff);\r
         }\r
-      }      \r
+      }\r
     }\r
   }\r
 \r
@@ -185,7 +185,7 @@ EblPrintLoadFileInfo (
 \r
 \r
 /**\r
-  Dump information about devices in the system. \r
+  Dump information about devices in the system.\r
 \r
   fv:       PI Firmware Volume\r
   fs:       EFI Simple File System\r
@@ -195,7 +195,7 @@ EblPrintLoadFileInfo (
   Argv[0] - "device"\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \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
@@ -249,7 +249,7 @@ EblDeviceCmd (
       }\r
     }\r
   }\r
-  \r
+\r
   Max = EfiGetDeviceCounts (EfiOpenLoadFile);\r
   if (Max != 0) {\r
     AsciiPrint ("LoadFile Devices: (usually network)\n");\r
@@ -266,7 +266,7 @@ EblDeviceCmd (
 \r
 \r
 /**\r
-  Start an EFI image (PE32+ with EFI defined entry point). \r
+  Start an EFI image (PE32+ with EFI defined entry point).\r
 \r
   Argv[0] - "start"\r
   Argv[1] - device name and path\r
@@ -278,7 +278,7 @@ EblDeviceCmd (
   start LoadFile0:                    ; load an FV via a PXE boot\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \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
@@ -308,7 +308,7 @@ EblStartCmd (
 \r
   File = EfiOpen (Argv[1], EFI_FILE_MODE_READ, 0);\r
   if (File == NULL) {\r
-    return EFI_INVALID_PARAMETER; \r
+    return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   DevicePath = File->DevicePath;\r
@@ -328,7 +328,7 @@ EblStartCmd (
 \r
     FreePool (Buffer);\r
   }\r
-  \r
+\r
   EfiClose (File);\r
 \r
   if (!EFI_ERROR (Status)) {\r
@@ -337,7 +337,7 @@ EblStartCmd (
       // We don't pass Argv[0] to the EFI Application (it's name) just the args\r
       Status = gBS->HandleProtocol (ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **)&ImageInfo);\r
       ASSERT_EFI_ERROR (Status);\r
-      \r
+\r
       ImageInfo->LoadOptionsSize = (UINT32)AsciiStrSize (Argv[2]);\r
       ImageInfo->LoadOptions     = AllocatePool (ImageInfo->LoadOptionsSize);\r
       AsciiStrCpy (ImageInfo->LoadOptions, Argv[2]);\r
@@ -354,7 +354,7 @@ EblStartCmd (
 /**\r
   Load a Firmware Volume (FV) into memory from a device. This causes drivers in\r
   the FV to be dispatched if the dependencies of the drivers are met.\r
-  \r
+\r
   Argv[0] - "loadfv"\r
   Argv[1] - device name and path\r
 \r
@@ -363,7 +363,7 @@ EblStartCmd (
   loadfv LoadFile0:      ; load an FV via a PXE boot\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \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
@@ -388,7 +388,7 @@ EblLoadFvCmd (
 \r
   File = EfiOpen (Argv[1], EFI_FILE_MODE_READ, 0);\r
   if (File == NULL) {\r
-    return EFI_INVALID_PARAMETER; \r
+    return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   if (File->Type == EfiOpenMemoryBuffer) {\r
@@ -401,25 +401,25 @@ EblLoadFvCmd (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-      \r
+\r
     Status = gDS->ProcessFirmwareVolume (FvStart, FvSize, &FvHandle);\r
     if (EFI_ERROR (Status)) {\r
       FreePool (FvStart);\r
-    } \r
+    }\r
   }\r
   return Status;\r
 }\r
 \r
 \r
 /**\r
-  Perform an EFI connect to connect devices that follow the EFI driver model. \r
+  Perform an EFI connect to connect devices that follow the EFI driver model.\r
   If it is a PI system also call the dispatcher in case a new FV was made\r
   available by one of the connect EFI drivers (this is not a common case).\r
-  \r
+\r
   Argv[0] - "connect"\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \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
@@ -451,11 +451,11 @@ EblConnectCmd (
       if (EFI_ERROR (Status)) {\r
         return Status;\r
       }\r
-      \r
+\r
       for (Index = 0; Index < HandleCount; Index++) {\r
         gBS->DisconnectController (HandleBuffer[Index], NULL, NULL);\r
       }\r
-      \r
+\r
       //\r
       // Given we disconnect our console we should go and do a connect now\r
       //\r
@@ -537,11 +537,11 @@ CHAR8 *gMemMapType[] = {
 \r
 /**\r
   Dump out the EFI memory map\r
-  \r
+\r
   Argv[0] - "memmap"\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \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
@@ -569,7 +569,7 @@ EblMemMapCmd (
   ZeroMem (PageCount, sizeof (PageCount));\r
 \r
   AsciiPrint ("EFI Memory Map\n");\r
-  \r
+\r
   // First call is to figure out how big the buffer needs to be\r
   MemMapSize = 0;\r
   MemMap     = NULL;\r
@@ -593,7 +593,7 @@ EblMemMapCmd (
           MemMap = NEXT_MEMORY_DESCRIPTOR (MemMap, DescriptorSize);\r
         }\r
       }\r
-        \r
+\r
       for (Index = 0, TotalMemory = 0; Index < EfiMaxMemoryType; Index++) {\r
         if (PageCount[Index] != 0) {\r
           AsciiPrint ("\n  %a %,7ld Pages (%,14ld)", gMemMapType[Index], PageCount[Index], LShiftU64 (PageCount[Index], 12));\r
@@ -630,27 +630,27 @@ EblMemMapCmd (
 /**\r
   Load a file into memory and optionally jump to it. A load address can be\r
   specified or automatically allocated. A quoted command line can optionally\r
-  be passed into the image. \r
+  be passed into the image.\r
 \r
   Argv[0] - "go"\r
   Argv[1] - Device Name:path for the file to load\r
   Argv[2] - Address to load to or '*' if the load address will be allocated\r
   Argv[3] - Optional Entry point to the image. Image will be called if present\r
-  Argv[4] - "" string that will be passed as Argc & Argv to EntryPoint. Needs \r
+  Argv[4] - "" string that will be passed as Argc & Argv to EntryPoint. Needs\r
             to include the command name\r
 \r
-  go fv1:\EblCmdX  0x10000  0x10010 "EblCmdX Arg2 Arg3 Arg4"; - load EblCmdX \r
-    from FV1 to location 0x10000 and call the entry point at 0x10010 passing \r
+  go fv1:\EblCmdX  0x10000  0x10010 "EblCmdX Arg2 Arg3 Arg4"; - load EblCmdX\r
+    from FV1 to location 0x10000 and call the entry point at 0x10010 passing\r
     in "EblCmdX Arg2 Arg3 Arg4" as the arguments.\r
 \r
-  go fv0:\EblCmdX  *  0x10 "EblCmdX Arg2 Arg3 Arg4"; - load EblCmdX from FS0 \r
+  go fv0:\EblCmdX  *  0x10 "EblCmdX Arg2 Arg3 Arg4"; - load EblCmdX from FS0\r
     to location allocated by this command and call the entry point at offset 0x10\r
     passing in "EblCmdX Arg2 Arg3 Arg4" as the arguments.\r
 \r
   go fv1:\EblCmdX  0x10000; Load EblCmdX to address 0x10000 and return\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \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
@@ -669,7 +669,7 @@ EblGoCmd (
   EBL_COMMMAND                  EntryPoint;\r
   UINTN                         EntryPointArgc;\r
   CHAR8                         *EntryPointArgv[MAX_ARGS];\r
-  \r
+\r
 \r
   if (Argc <= 2) {\r
     // device name and laod address are required\r
@@ -686,7 +686,7 @@ EblGoCmd (
   if (Argv[2][0] == '*') {\r
     // * Means allocate the buffer\r
     Status = EfiReadAllocatePool (File, &Address, &Size);\r
-    \r
+\r
     // EntryPoint is relative to the start of the image\r
     EntryPoint = (EBL_COMMMAND)((UINTN)EntryPoint + (UINTN)Address);\r
 \r
@@ -709,7 +709,7 @@ EblGoCmd (
         EntryPointArgc = 1;\r
         EntryPointArgv[0] = File->FileName;\r
       }\r
-      \r
+\r
       Status = EntryPoint (EntryPointArgc, EntryPointArgv);\r
     }\r
   }\r
@@ -741,7 +741,7 @@ EblFileCopyCmd (
   if (Argc < 3) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   DestFileName = Argv[2];\r
   FileNameLen = AsciiStrLen (DestFileName);\r
 \r
@@ -788,7 +788,7 @@ EblFileCopyCmd (
     AsciiPrint("Source file open error.\n");\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   Destination = EfiOpen(DestFileName, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, 0);\r
   if (Destination == NULL) {\r
     AsciiPrint("Destination file open error.\n");\r
@@ -799,12 +799,12 @@ EblFileCopyCmd (
   if (Buffer == NULL) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   Size = EfiTell(Source, NULL);\r
 \r
   for (Offset = 0; Offset + FILE_COPY_CHUNK <= Size; Offset += Chunk) {\r
     Chunk = FILE_COPY_CHUNK;\r
-    \r
+\r
     Status = EfiRead(Source, Buffer, &Chunk);\r
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("Read file error %r\n", Status);\r
@@ -815,13 +815,13 @@ EblFileCopyCmd (
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("Write file error %r\n", Status);\r
       goto Exit;\r
-    }    \r
+    }\r
   }\r
-  \r
+\r
   // Any left over?\r
   if (Offset < Size) {\r
     Chunk = Size - Offset;\r
-    \r
+\r
     Status = EfiRead(Source, Buffer, &Chunk);\r
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("Read file error %r\n", Status);\r
@@ -832,7 +832,7 @@ EblFileCopyCmd (
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("Write file error %r\n", Status);\r
       goto Exit;\r
-    }    \r
+    }\r
   }\r
 \r
 \r
@@ -854,11 +854,11 @@ Exit:
       FreePool (DestFileName);\r
     }\r
   }\r
-  \r
+\r
   if (Buffer != NULL) {\r
     FreePool(Buffer);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -877,17 +877,17 @@ EblFileDiffCmd (
   UINTN         Size2;\r
   UINTN         Offset;\r
   UINTN         Chunk   = FILE_COPY_CHUNK;\r
-  \r
+\r
   if (Argc != 3) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   File1 = EfiOpen(Argv[1], EFI_FILE_MODE_READ, 0);\r
   if (File1 == NULL) {\r
     AsciiPrint("File 1 open error.\n");\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   File2 = EfiOpen(Argv[2], EFI_FILE_MODE_READ, 0);\r
   if (File2 == NULL) {\r
     AsciiPrint("File 2 open error.\n");\r
@@ -906,15 +906,15 @@ EblFileDiffCmd (
   if (Buffer1 == NULL) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   Buffer2 = AllocatePool(FILE_COPY_CHUNK);\r
   if (Buffer2 == NULL) {\r
     goto Exit;\r
-  }  \r
+  }\r
 \r
   for (Offset = 0; Offset + FILE_COPY_CHUNK <= Size1; Offset += Chunk) {\r
     Chunk = FILE_COPY_CHUNK;\r
-    \r
+\r
     Status = EfiRead(File1, Buffer1, &Chunk);\r
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("File 1 read error\n");\r
@@ -926,17 +926,17 @@ EblFileDiffCmd (
       AsciiPrint("File 2 read error\n");\r
       goto Exit;\r
     }\r
-    \r
+\r
     if (CompareMem(Buffer1, Buffer2, Chunk) != 0) {\r
       AsciiPrint("Files differ.\n");\r
       goto Exit;\r
     };\r
   }\r
-  \r
+\r
   // Any left over?\r
   if (Offset < Size1) {\r
     Chunk = Size1 - Offset;\r
-    \r
+\r
     Status = EfiRead(File1, Buffer1, &Chunk);\r
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("File 1 read error\n");\r
@@ -947,9 +947,9 @@ EblFileDiffCmd (
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("File 2 read error\n");\r
       goto Exit;\r
-    }    \r
+    }\r
   }\r
-  \r
+\r
   if (CompareMem(Buffer1, Buffer2, Chunk) != 0) {\r
     AsciiPrint("Files differ.\n");\r
   } else {\r
@@ -963,22 +963,22 @@ Exit:
       AsciiPrint("File 1 close error %r\n", Status);\r
     }\r
   }\r
-  \r
+\r
   if (File2 != NULL) {\r
     Status = EfiClose(File2);\r
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("File 2 close error %r\n", Status);\r
     }\r
   }\r
-  \r
+\r
   if (Buffer1 != NULL) {\r
     FreePool(Buffer1);\r
   }\r
-  \r
+\r
   if (Buffer2 != NULL) {\r
     FreePool(Buffer2);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -998,25 +998,25 @@ GLOBAL_REMOVE_IF_UNREFERENCED const EBL_COMMAND_TABLE mCmdDeviceTemplate[] =
   },\r
   {\r
     "go",\r
-    " dev:path loadaddress entrypoint args; load to given address and jump in", \r
+    " dev:path loadaddress entrypoint args; load to given address and jump in",\r
     NULL,\r
     EblGoCmd\r
   },\r
   {\r
     "loadfv",\r
-    " devname; Load PI FV from device", \r
+    " devname; Load PI FV from device",\r
     NULL,\r
     EblLoadFvCmd\r
   },\r
   {\r
     "start",\r
-    " path; EFI Boot Device:filepath. fs1:\\EFI\\BOOT.EFI", \r
+    " path; EFI Boot Device:filepath. fs1:\\EFI\\BOOT.EFI",\r
     NULL,\r
     EblStartCmd\r
   },\r
   {\r
     "memmap",\r
-    "; dump EFI memory map", \r
+    "; dump EFI memory map",\r
     NULL,\r
     EblMemMapCmd\r
   },\r