]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BeagleBoardPkg/Sec/Sec.c
Fix line endings
[mirror_edk2.git] / BeagleBoardPkg / Sec / Sec.c
index e3d299b82dc7e447912d7160cd7a4b9f6aa31c27..cc134317b1ae1b34bf97ea2fe450acfdfdb8d741 100755 (executable)
@@ -184,15 +184,16 @@ CEntryPoint (
 {\r
   VOID *HobBase;\r
 \r
+  // Build a basic HOB list\r
+  HobBase      = (VOID *)(UINTN)(FixedPcdGet32(PcdEmbeddedFdBaseAddress) + FixedPcdGet32(PcdEmbeddedFdSize));\r
+  CreateHobList (MemoryBase, MemorySize, HobBase, StackBase);\r
+\r
   //Set up Pin muxing.\r
   PadConfiguration ();\r
 \r
   // Set up system clocking\r
   ClockInit ();\r
 \r
-  // Build a basic HOB list\r
-  HobBase      = (VOID *)(UINTN)(FixedPcdGet32(PcdEmbeddedFdBaseAddress) + FixedPcdGet32(PcdEmbeddedFdSize));\r
-  CreateHobList (MemoryBase, MemorySize, HobBase, StackBase);\r
 \r
   // Enable program flow prediction, if supported.\r
   ArmEnableBranchPrediction ();\r
@@ -222,35 +223,34 @@ CEntryPoint (
     VOID                *PeCoffImage;\r
     UINT32              Offset;\r
     CHAR8               *FilePath;\r
-
-    FfsAnyFvFindFirstFile (EFI_FV_FILETYPE_SECURITY_CORE, &VolumeHandle, &FileHandle);
-    Status = FfsFindSectionData (EFI_SECTION_TE, FileHandle, &PeCoffImage);
-    if (EFI_ERROR (Status)) {
-      // Usually is a TE (PI striped down PE/COFF), but could be a full PE/COFF
-      Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage);
-    }
-    if (!EFI_ERROR (Status)) {
+    FfsAnyFvFindFirstFile (EFI_FV_FILETYPE_SECURITY_CORE, &VolumeHandle, &FileHandle);\r
+    Status = FfsFindSectionData (EFI_SECTION_TE, FileHandle, &PeCoffImage);\r
+    if (EFI_ERROR (Status)) {\r
+      // Usually is a TE (PI striped down PE/COFF), but could be a full PE/COFF\r
+      Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage);\r
+    }\r
+    if (!EFI_ERROR (Status)) {\r
       Offset = PeCoffGetSizeOfHeaders (PeCoffImage);\r
-      FilePath = PeCoffLoaderGetPdbPointer (PeCoffImage);
-      if (FilePath != NULL) {
-      
-        // 
-        // In general you should never have to use #ifdef __CC_ARM in the code. It
-        // is hidden in the away in the MdePkg. But here we would like to print differnt things
-        // for different toolchains. 
-        //
-#ifdef __CC_ARM
-        // Print out the command for the RVD debugger to load symbols for this image
-        DEBUG ((EFI_D_ERROR, "load /a /ni /np %a &0x%08x\n", SecDeCygwinPathIfNeeded (FilePath), (CHAR8 *)PeCoffImage + Offset));
+      FilePath = PeCoffLoaderGetPdbPointer (PeCoffImage);\r
+      if (FilePath != NULL) {\r
+      \r
+        // \r
+        // In general you should never have to use #ifdef __CC_ARM in the code. It\r
+        // is hidden in the away in the MdePkg. But here we would like to print differnt things\r
+        // for different toolchains. \r
+        //\r
+#ifdef __CC_ARM\r
+        // Print out the command for the RVD debugger to load symbols for this image\r
+        DEBUG ((EFI_D_ERROR, "load /a /ni /np %a &0x%08x\n", SecDeCygwinPathIfNeeded (FilePath), (CHAR8 *)PeCoffImage + Offset));\r
 #elif __GNUC__\r
-        // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required
-        DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", FilePath, PeCoffImage + Offset));
+        // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required\r
+        DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", FilePath, PeCoffImage + Offset));\r
 #else\r
-        DEBUG ((EFI_D_ERROR, "SEC starts at 0x%08x with an entry point at 0x%08x %a\n", PeCoffImage, _ModuleEntryPoint, FilePath));
+        DEBUG ((EFI_D_ERROR, "SEC starts at 0x%08x with an entry point at 0x%08x %a\n", PeCoffImage, _ModuleEntryPoint, FilePath));\r
 #endif\r
       }\r
-    }
-
+    }\r
+\r
    \r
   DEBUG_CODE_END ();\r
 \r
@@ -271,6 +271,7 @@ CEntryPoint (
     LzmaGuidedSectionExtraction\r
     );\r
 \r
+  // Assume the FV that contains the SEC (our code) also contains a compressed FV.\r
   DecompressFirstFv ();\r
 \r
   // Load the DXE Core and transfer control to it\r