]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/EfiDevice.c
ArmPlatformPkg: remove EblCmdLib implementation
[mirror_edk2.git] / EmbeddedPkg / Ebl / EfiDevice.c
index 80dcfcb5cc2c26373c567465301b5aae4c0cf3da..f6969e7b2b05ab63067a01a3d00613832bb73c01 100644 (file)
@@ -3,6 +3,7 @@
 \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
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -157,23 +158,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 +186,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,56 +196,29 @@ 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
-                 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
 EblDeviceCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
   )\r
 {\r
-  EFI_STATUS    Status;\r
   UINTN         Index;\r
   UINTN         CurrentRow;\r
   UINTN         Max;\r
-  EFI_OPEN_FILE *File;\r
 \r
   CurrentRow = 0;\r
 \r
   // Need to call here to make sure Device Counts are valid\r
   EblUpdateDeviceLists ();\r
 \r
-  //\r
-  // Probe for media insertion/removal in removable media devices\r
-  //\r
-  Max = EfiGetDeviceCounts (EfiOpenBlockIo);\r
-  if (Max != 0) {\r
-    for (Index = 0; Index < Max; Index++) {\r
-      File = EfiDeviceOpenByType (EfiOpenBlockIo, Index);\r
-      if (File != NULL) {\r
-        if (File->FsBlockIoMedia->RemovableMedia) {\r
-          if (File->FsBlockIoMedia->MediaPresent) {\r
-            // Probe to see if media is present\r
-            Status = File->FsBlockIo->ReadBlocks (File->FsBlockIo, File->FsBlockIo->Media->MediaId, (EFI_LBA)0, 0, NULL);\r
-            if (Status == EFI_NO_MEDIA) {\r
-              gBS->DisconnectController (File->EfiHandle, NULL, NULL);\r
-            }\r
-          } else {\r
-            // Probe for media insertion and connect partition and filesystem drivers if needed\r
-            gBS->ConnectController (File->EfiHandle, NULL, NULL, TRUE);\r
-          }\r
-        }\r
-        EfiClose (File);\r
-      }\r
-    }\r
-  }\r
-\r
   // Now we can print out the info...\r
-\r
   Max = EfiGetDeviceCounts (EfiOpenFirmwareVolume);\r
   if (Max != 0) {\r
     AsciiPrint ("Firmware Volume Devices:\n");\r
@@ -277,7 +251,7 @@ EblDeviceCmd (
       }\r
     }\r
   }\r
-  \r
+\r
   Max = EfiGetDeviceCounts (EfiOpenLoadFile);\r
   if (Max != 0) {\r
     AsciiPrint ("LoadFile Devices: (usually network)\n");\r
@@ -294,7 +268,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
@@ -306,13 +280,14 @@ 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
-                 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
 EblStartCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -336,7 +311,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
@@ -356,7 +331,7 @@ EblStartCmd (
 \r
     FreePool (Buffer);\r
   }\r
-  \r
+\r
   EfiClose (File);\r
 \r
   if (!EFI_ERROR (Status)) {\r
@@ -365,10 +340,10 @@ 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
+      AsciiStrCpyS (ImageInfo->LoadOptions, ImageInfo->LoadOptionsSize, Argv[2]);\r
     }\r
 \r
     // Transfer control to the EFI image we loaded with LoadImage()\r
@@ -381,8 +356,8 @@ EblStartCmd (
 \r
 /**\r
   Load a Firmware Volume (FV) into memory from a device. This causes drivers in\r
-  the FV to be dispatched if the dependancies of the drivers are met.\r
-  \r
+  the FV to be dispatched if the dependencies of the drivers are met.\r
+\r
   Argv[0] - "loadfv"\r
   Argv[1] - device name and path\r
 \r
@@ -391,13 +366,14 @@ 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
-                 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
 EblLoadFvCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -416,7 +392,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
@@ -429,29 +405,32 @@ EblLoadFvCmd (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-      \r
+\r
     Status = gDS->ProcessFirmwareVolume (FvStart, FvSize, &FvHandle);\r
-    FreePool (FvStart);\r
+    if (EFI_ERROR (Status)) {\r
+      FreePool (FvStart);\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
-  availible by one of the connect EFI drivers (this is not a common case).\r
-  \r
+  available by one of the connect EFI drivers (this is not a common case).\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
-                 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
 EblConnectCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -477,11 +456,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
@@ -563,17 +542,18 @@ 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
-                 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
 EblMemMapCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -595,7 +575,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
@@ -619,7 +599,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
@@ -654,35 +634,36 @@ EblMemMapCmd (
 \r
 \r
 /**\r
-  Load a file into memory and optionally jump to it. A load addres can be \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
-    to location allocated by this comamnd and call the entry point at offset 0x10 \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
-                 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
 EblGoCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -695,7 +676,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
@@ -712,8 +693,8 @@ EblGoCmd (
   if (Argv[2][0] == '*') {\r
     // * Means allocate the buffer\r
     Status = EfiReadAllocatePool (File, &Address, &Size);\r
-    \r
-    // EntryPoint is relatvie to the start of the image \r
+\r
+    // EntryPoint is relative to the start of the image\r
     EntryPoint = (EBL_COMMMAND)((UINTN)EntryPoint + (UINTN)Address);\r
 \r
   } else {\r
@@ -735,7 +716,7 @@ EblGoCmd (
         EntryPointArgc = 1;\r
         EntryPointArgv[0] = File->FileName;\r
       }\r
-      \r
+\r
       Status = EntryPoint (EntryPointArgc, EntryPointArgv);\r
     }\r
   }\r
@@ -747,6 +728,7 @@ EblGoCmd (
 #define FILE_COPY_CHUNK 0x20000\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 EblFileCopyCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -758,19 +740,65 @@ EblFileCopyCmd (
   VOID          *Buffer      = NULL;\r
   UINTN         Size;\r
   UINTN         Offset;\r
-  UINTN         Chunk = FILE_COPY_CHUNK;\r
+  UINTN         Chunk        = FILE_COPY_CHUNK;\r
+  UINTN         FileNameLen, DestFileNameLen;\r
+  CHAR8*        DestFileName;\r
+  CHAR8*        SrcFileName;\r
+  CHAR8*        SrcPtr;\r
 \r
   if (Argc < 3) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
+  DestFileName = Argv[2];\r
+  FileNameLen = AsciiStrLen (DestFileName);\r
+\r
+  // Check if the destination file name looks like a directory\r
+  if ((DestFileName[FileNameLen-1] == '\\') || (DestFileName[FileNameLen-1] == ':')) {\r
+    // Set the pointer after the source drive (eg: after fs1:)\r
+    SrcPtr = AsciiStrStr (Argv[1], ":");\r
+    if (SrcPtr == NULL) {\r
+      SrcPtr = Argv[1];\r
+    } else {\r
+      SrcPtr++;\r
+      if (*SrcPtr == '\\') {\r
+        SrcPtr++;\r
+      }\r
+    }\r
+\r
+    if (*SrcPtr == '\0') {\r
+      AsciiPrint("Source file incorrect.\n");\r
+    }\r
+\r
+    // Skip the Source Directories\r
+    while (1) {\r
+      SrcFileName = SrcPtr;\r
+      SrcPtr = AsciiStrStr (SrcPtr,"\\");\r
+      if (SrcPtr != NULL) {\r
+        SrcPtr++;\r
+      } else {\r
+        break;\r
+      }\r
+    }\r
+\r
+    if (*SrcFileName == '\0') {\r
+      AsciiPrint("Source file incorrect (Error 2).\n");\r
+    }\r
+\r
+    // Construct the destination filepath\r
+    DestFileNameLen = FileNameLen + AsciiStrLen (SrcFileName) + 1;\r
+    DestFileName = (CHAR8*)AllocatePool (DestFileNameLen);\r
+    AsciiStrCpyS (DestFileName, DestFileNameLen, Argv[2]);\r
+    AsciiStrCatS (DestFileName, DestFileNameLen, SrcFileName);\r
+  }\r
+\r
   Source = EfiOpen(Argv[1], EFI_FILE_MODE_READ, 0);\r
   if (Source == NULL) {\r
     AsciiPrint("Source file open error.\n");\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
-  Destination = EfiOpen(Argv[2], EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, 0);\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
     return EFI_NOT_FOUND;\r
@@ -780,12 +808,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
@@ -796,13 +824,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
@@ -813,7 +841,7 @@ EblFileCopyCmd (
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("Write file error %r\n", Status);\r
       goto Exit;\r
-    }    \r
+    }\r
   }\r
 \r
 \r
@@ -829,16 +857,22 @@ Exit:
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("Destination close error %r\n", Status);\r
     }\r
+\r
+    // Case when we have concated the filename to the destination directory\r
+    if (DestFileName != Argv[2]) {\r
+      FreePool (DestFileName);\r
+    }\r
   }\r
-  \r
+\r
   if (Buffer != NULL) {\r
     FreePool(Buffer);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 EblFileDiffCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -853,17 +887,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
@@ -882,15 +916,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
@@ -902,17 +936,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
@@ -923,9 +957,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
@@ -939,22 +973,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
@@ -974,31 +1008,31 @@ 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
   {\r
     "cp",\r
-    " file1 file2; copy file",\r
+    " file1 file2; copy file only.",\r
     NULL,\r
     EblFileCopyCmd\r
   },\r