mirror of https://github.com/acidanthera/audk.git
Fix line endings
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10062 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ea02543004
commit
14e00c13be
|
@ -184,15 +184,16 @@ CEntryPoint (
|
||||||
{
|
{
|
||||||
VOID *HobBase;
|
VOID *HobBase;
|
||||||
|
|
||||||
|
// Build a basic HOB list
|
||||||
|
HobBase = (VOID *)(UINTN)(FixedPcdGet32(PcdEmbeddedFdBaseAddress) + FixedPcdGet32(PcdEmbeddedFdSize));
|
||||||
|
CreateHobList (MemoryBase, MemorySize, HobBase, StackBase);
|
||||||
|
|
||||||
//Set up Pin muxing.
|
//Set up Pin muxing.
|
||||||
PadConfiguration ();
|
PadConfiguration ();
|
||||||
|
|
||||||
// Set up system clocking
|
// Set up system clocking
|
||||||
ClockInit ();
|
ClockInit ();
|
||||||
|
|
||||||
// Build a basic HOB list
|
|
||||||
HobBase = (VOID *)(UINTN)(FixedPcdGet32(PcdEmbeddedFdBaseAddress) + FixedPcdGet32(PcdEmbeddedFdSize));
|
|
||||||
CreateHobList (MemoryBase, MemorySize, HobBase, StackBase);
|
|
||||||
|
|
||||||
// Enable program flow prediction, if supported.
|
// Enable program flow prediction, if supported.
|
||||||
ArmEnableBranchPrediction ();
|
ArmEnableBranchPrediction ();
|
||||||
|
@ -222,35 +223,34 @@ CEntryPoint (
|
||||||
VOID *PeCoffImage;
|
VOID *PeCoffImage;
|
||||||
UINT32 Offset;
|
UINT32 Offset;
|
||||||
CHAR8 *FilePath;
|
CHAR8 *FilePath;
|
||||||
|
FfsAnyFvFindFirstFile (EFI_FV_FILETYPE_SECURITY_CORE, &VolumeHandle, &FileHandle);
|
||||||
FfsAnyFvFindFirstFile (EFI_FV_FILETYPE_SECURITY_CORE, &VolumeHandle, &FileHandle);
|
Status = FfsFindSectionData (EFI_SECTION_TE, FileHandle, &PeCoffImage);
|
||||||
Status = FfsFindSectionData (EFI_SECTION_TE, FileHandle, &PeCoffImage);
|
if (EFI_ERROR (Status)) {
|
||||||
if (EFI_ERROR (Status)) {
|
// Usually is a TE (PI striped down PE/COFF), but could be a full PE/COFF
|
||||||
// Usually is a TE (PI striped down PE/COFF), but could be a full PE/COFF
|
Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage);
|
||||||
Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &PeCoffImage);
|
}
|
||||||
}
|
if (!EFI_ERROR (Status)) {
|
||||||
if (!EFI_ERROR (Status)) {
|
|
||||||
Offset = PeCoffGetSizeOfHeaders (PeCoffImage);
|
Offset = PeCoffGetSizeOfHeaders (PeCoffImage);
|
||||||
FilePath = PeCoffLoaderGetPdbPointer (PeCoffImage);
|
FilePath = PeCoffLoaderGetPdbPointer (PeCoffImage);
|
||||||
if (FilePath != NULL) {
|
if (FilePath != NULL) {
|
||||||
|
|
||||||
//
|
//
|
||||||
// In general you should never have to use #ifdef __CC_ARM in the code. It
|
// 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
|
// is hidden in the away in the MdePkg. But here we would like to print differnt things
|
||||||
// for different toolchains.
|
// for different toolchains.
|
||||||
//
|
//
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
// Print out the command for the RVD debugger to load symbols for this image
|
// 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));
|
DEBUG ((EFI_D_ERROR, "load /a /ni /np %a &0x%08x\n", SecDeCygwinPathIfNeeded (FilePath), (CHAR8 *)PeCoffImage + Offset));
|
||||||
#elif __GNUC__
|
#elif __GNUC__
|
||||||
// This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required
|
// 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));
|
DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", FilePath, PeCoffImage + Offset));
|
||||||
#else
|
#else
|
||||||
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));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DEBUG_CODE_END ();
|
DEBUG_CODE_END ();
|
||||||
|
|
||||||
|
@ -271,6 +271,7 @@ CEntryPoint (
|
||||||
LzmaGuidedSectionExtraction
|
LzmaGuidedSectionExtraction
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Assume the FV that contains the SEC (our code) also contains a compressed FV.
|
||||||
DecompressFirstFv ();
|
DecompressFirstFv ();
|
||||||
|
|
||||||
// Load the DXE Core and transfer control to it
|
// Load the DXE Core and transfer control to it
|
||||||
|
|
Loading…
Reference in New Issue