Integrate patch from Andrew Fish to make it run on OS X.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9194 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -22,7 +22,7 @@ Abstract:
|
||||
|
||||
#define EFI_UNIX_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xf2e23f54, 0x8985, 0x11db, {0xac, 0x79, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2e23f54, 0x8985, 0x11db, {0xac, 0x79, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@@ -44,7 +44,7 @@ extern EFI_GUID gEfiUnixIoProtocolGuid;
|
||||
//
|
||||
#define EFI_UNIX_VIRTUAL_DISKS_GUID \
|
||||
{ \
|
||||
0xf2ba331a, 0x8985, 0x11db, {0xa4, 0x06, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2ba331a, 0x8985, 0x11db, {0xa4, 0x06, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixVirtualDisksGuid;
|
||||
@@ -54,7 +54,7 @@ extern EFI_GUID gEfiUnixVirtualDisksGuid;
|
||||
//
|
||||
#define EFI_UNIX_PHYSICAL_DISKS_GUID \
|
||||
{ \
|
||||
0xf2bdcc96, 0x8985, 0x11db, {0x87, 0x19, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2bdcc96, 0x8985, 0x11db, {0x87, 0x19, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixPhysicalDisksGuid;
|
||||
@@ -64,7 +64,7 @@ extern EFI_GUID gEfiUnixPhysicalDisksGuid;
|
||||
//
|
||||
#define EFI_UNIX_FILE_SYSTEM_GUID \
|
||||
{ \
|
||||
0xf2c16b9e, 0x8985, 0x11db, {0x92, 0xc8, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2c16b9e, 0x8985, 0x11db, {0x92, 0xc8, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixFileSystemGuid;
|
||||
@@ -84,7 +84,7 @@ extern EFI_GUID gEfiUnixSerialPortGuid;
|
||||
//
|
||||
#define EFI_UNIX_UGA_GUID \
|
||||
{ \
|
||||
0xf2c8b80e, 0x8985, 0x11db, {0x93, 0xf1, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2c8b80e, 0x8985, 0x11db, {0x93, 0xf1, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixUgaGuid;
|
||||
@@ -94,7 +94,7 @@ extern EFI_GUID gEfiUnixUgaGuid;
|
||||
//
|
||||
#define EFI_UNIX_GOP_GUID \
|
||||
{ \
|
||||
0xbace07c2, 0x8987, 0x11db, {0xa5, 0x9a, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xbace07c2, 0x8987, 0x11db, {0xa5, 0x9a, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixGopGuid;
|
||||
@@ -104,7 +104,7 @@ extern EFI_GUID gEfiUnixGopGuid;
|
||||
//
|
||||
#define EFI_UNIX_CONSOLE_GUID \
|
||||
{ \
|
||||
0xf2cc5d06, 0x8985, 0x11db, {0xbb, 0x19, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2cc5d06, 0x8985, 0x11db, {0xbb, 0x19, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixConsoleGuid;
|
||||
@@ -114,7 +114,7 @@ extern EFI_GUID gEfiUnixConsoleGuid;
|
||||
//
|
||||
#define EFI_UNIX_MEMORY_GUID \
|
||||
{ \
|
||||
0xf2d006cc, 0x8985, 0x11db, {0xa4, 0x72, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2d006cc, 0x8985, 0x11db, {0xa4, 0x72, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixMemoryGuid;
|
||||
@@ -124,7 +124,7 @@ extern EFI_GUID gEfiUnixMemoryGuid;
|
||||
//
|
||||
#define EFI_UNIX_CPU_MODEL_GUID \
|
||||
{ \
|
||||
0xf2d3b330, 0x8985, 0x11db, {0x8a, 0xa3, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2d3b330, 0x8985, 0x11db, {0x8a, 0xa3, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixCPUModelGuid;
|
||||
@@ -134,7 +134,7 @@ extern EFI_GUID gEfiUnixCPUModelGuid;
|
||||
//
|
||||
#define EFI_UNIX_CPU_SPEED_GUID \
|
||||
{ \
|
||||
0xf2d74e5a, 0x8985, 0x11db, {0x97, 0x05, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
0xf2d74e5a, 0x8985, 0x11db, {0x97, 0x05, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiUnixCPUSpeedGuid;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, Intel Corporation
|
||||
Copyright (c) 2004 - 2009, Intel Corporation
|
||||
Portions copyright (c) 2008-2009 Apple Inc.<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -31,7 +32,13 @@ Abstract:
|
||||
#include <sys/termios.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#if __CYGWIN__
|
||||
#include <sys/dirent.h>
|
||||
#else
|
||||
#include <sys/dir.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
#include <sys/types.h>
|
||||
@@ -42,12 +49,24 @@ Abstract:
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <termio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#define _XOPEN_SOURCE
|
||||
#else
|
||||
#include <termio.h>
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
#include <utime.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <Base.h>
|
||||
#include <Library/PeCoffLib.h>
|
||||
|
||||
|
||||
#define EFI_UNIX_THUNK_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xf2e98868, 0x8985, 0x11db, {0x9a, 0x59, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \
|
||||
@@ -167,7 +186,11 @@ void
|
||||
|
||||
typedef
|
||||
int
|
||||
#if __CYGWIN__
|
||||
(*UnixIoCtl) (int fd, int __request, ...);
|
||||
#else
|
||||
(*UnixIoCtl) (int fd, unsigned long int __request, ...);
|
||||
#endif
|
||||
|
||||
typedef
|
||||
int
|
||||
@@ -204,8 +227,29 @@ VOID *
|
||||
|
||||
|
||||
//
|
||||
// Work functions to enable source level debug in the emulator
|
||||
//
|
||||
//
|
||||
|
||||
typedef
|
||||
RETURN_STATUS
|
||||
(EFIAPI *UnixPeCoffGetEntryPoint) (
|
||||
IN VOID *Pe32Data,
|
||||
IN OUT VOID **EntryPoint
|
||||
);
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *UnixPeCoffRelocateImageExtraAction) (
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
);
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI *UnixPeCoffLoaderUnloadImageExtraAction) (
|
||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||
);
|
||||
|
||||
|
||||
|
||||
#define EFI_UNIX_THUNK_PROTOCOL_SIGNATURE SIGNATURE_32 ('L', 'N', 'X', 'T')
|
||||
|
||||
@@ -254,6 +298,11 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
|
||||
UnixDlopen Dlopen;
|
||||
UnixDlerror Dlerror;
|
||||
UnixDlsym Dlsym;
|
||||
UnixPeCoffGetEntryPoint PeCoffGetEntryPoint;
|
||||
UnixPeCoffRelocateImageExtraAction PeCoffRelocateImageExtraAction;
|
||||
UnixPeCoffLoaderUnloadImageExtraAction PeCoffUnloadImageExtraAction;
|
||||
|
||||
|
||||
} EFI_UNIX_THUNK_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiUnixThunkProtocolGuid;
|
||||
|
Reference in New Issue
Block a user