summaryrefslogtreecommitdiff
path: root/UnixPkg/Sec/SecMain.c
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-18 20:24:08 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-18 20:24:08 +0000
commitbb111c2346bef02c18b30acced3f7b0311bbfe21 (patch)
tree496916a37849ea45a4083848501de061a2b98732 /UnixPkg/Sec/SecMain.c
parent6989af71680fc69024e68a0ab6d8284f0c4909fc (diff)
downloadedk2-platforms-bb111c2346bef02c18b30acced3f7b0311bbfe21.tar.xz
Added support for an EFI X64 ABI compatible UnixPkg. With an internal only compiler I've been able to run checked in X64 EFI shell binary! We are hoping to get the open source LLVM compiler working for this... Since the SEC has to be UNIX ABI to make the POSIX calls it is compiled using a different compiler and the rest of the UnixPkg is compiled with UNIXPKG tool. You just need to point UNIXPKG at your EFI X64 ABI compiler of choice, it should work like MYTOOLS. Some one may want to port this to Linux at some point. To build cd into UnixPkg and ./build64.sh
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10806 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/Sec/SecMain.c')
-rw-r--r--UnixPkg/Sec/SecMain.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/UnixPkg/Sec/SecMain.c b/UnixPkg/Sec/SecMain.c
index 4d66bfa301..76ac58e636 100644
--- a/UnixPkg/Sec/SecMain.c
+++ b/UnixPkg/Sec/SecMain.c
@@ -48,18 +48,21 @@ char *gGdbWorkingFileName = NULL;
//
// Globals
//
-
-UNIX_PEI_LOAD_FILE_PPI mSecUnixLoadFilePpi = { SecUnixPeiLoadFile };
-
-PEI_UNIX_AUTOSCAN_PPI mSecUnixAutoScanPpi = { SecUnixPeiAutoScan };
-
-PEI_UNIX_THUNK_PPI mSecUnixThunkPpi = { SecUnixUnixThunkAddress };
-
+#ifdef __APPLE__
+UNIX_PEI_LOAD_FILE_PPI mSecUnixLoadFilePpi = { GasketSecUnixPeiLoadFile };
+PEI_UNIX_AUTOSCAN_PPI mSecUnixAutoScanPpi = { GasketSecUnixPeiAutoScan };
+PEI_UNIX_THUNK_PPI mSecUnixThunkPpi = { GasketSecUnixUnixThunkAddress };
+EFI_PEI_PROGRESS_CODE_PPI mSecStatusCodePpi = { GasketSecPeiReportStatusCode };
+UNIX_FWH_PPI mSecFwhInformationPpi = { GasketSecUnixFdAddress };
+TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = { GasketSecTemporaryRamSupport };
+#else
+UNIX_PEI_LOAD_FILE_PPI mSecUnixLoadFilePpi = { SecUnixPeiLoadFile };
+PEI_UNIX_AUTOSCAN_PPI mSecUnixAutoScanPpi = { SecUnixPeiAutoScan };
+PEI_UNIX_THUNK_PPI mSecUnixThunkPpi = { SecUnixUnixThunkAddress };
EFI_PEI_PROGRESS_CODE_PPI mSecStatusCodePpi = { SecPeiReportStatusCode };
-
UNIX_FWH_PPI mSecFwhInformationPpi = { SecUnixFdAddress };
-
-TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = {SecTemporaryRamSupport};
+TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = { SecTemporaryRamSupport };
+#endif
EFI_PEI_PPI_DESCRIPTOR gPrivateDispatchTable[] = {
{
@@ -1068,13 +1071,20 @@ PrintLoadAddress (
IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
- fprintf (stderr,
- "0x%08lx Loading %s with entry point 0x%08lx\n",
- (unsigned long)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders),
- ImageContext->PdbPointer,
- (unsigned long)ImageContext->EntryPoint
- );
-
+ if (ImageContext->PdbPointer == NULL) {
+ fprintf (stderr,
+ "0x%08lx Loading NO DEBUG with entry point 0x%08lx\n",
+ (unsigned long)(ImageContext->ImageAddress),
+ (unsigned long)ImageContext->EntryPoint
+ );
+ } else {
+ fprintf (stderr,
+ "0x%08lx Loading %s with entry point 0x%08lx\n",
+ (unsigned long)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders),
+ ImageContext->PdbPointer,
+ (unsigned long)ImageContext->EntryPoint
+ );
+ }
// Keep output synced up
fflush (stderr);
}