]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Adding Simple Pointer, GOP, SimpleTextInEx, and Networking protocols to the emulator...
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 30 Nov 2010 23:38:40 +0000 (23:38 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 30 Nov 2010 23:38:40 +0000 (23:38 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11105 6f19259b-4bc3-4df7-8a09-765794883524

44 files changed:
UnixPkg/CpuRuntimeDxe/Cpu.c
UnixPkg/CpuRuntimeDxe/Cpu.inf
UnixPkg/Include/Protocol/UnixIo.h
UnixPkg/Include/Protocol/UnixThunk.h
UnixPkg/Include/Protocol/UnixUgaIo.h
UnixPkg/Library/UnixBaseLib/X64/SwitchStack.S
UnixPkg/Library/UnixBdsLib/PlatformData.c
UnixPkg/Sec/Gasket.c
UnixPkg/Sec/Gasket.h
UnixPkg/Sec/Ia32/Gasket.S
UnixPkg/Sec/Ia32/GasketTemplate.c
UnixPkg/Sec/SecMain.c
UnixPkg/Sec/SecMain.h
UnixPkg/Sec/SecMain.inf
UnixPkg/Sec/UgaX11.c
UnixPkg/Sec/UnixThunk.c
UnixPkg/Sec/X64/Gasket.S [deleted file]
UnixPkg/Sec/X64/GasketTemplate.c [deleted file]
UnixPkg/Sec/X64/MangleGasket.S
UnixPkg/Sec/X64/SwitchStack.S
UnixPkg/UnixBusDriverDxe/UnixBusDriver.c
UnixPkg/UnixBusDriverDxe/UnixBusDriver.inf
UnixPkg/UnixGopDxe/ComponentName.c [new file with mode: 0644]
UnixPkg/UnixGopDxe/UnixGop.h [new file with mode: 0644]
UnixPkg/UnixGopDxe/UnixGop.inf [new file with mode: 0644]
UnixPkg/UnixGopDxe/UnixGopDriver.c [new file with mode: 0644]
UnixPkg/UnixGopDxe/UnixGopInput.c [new file with mode: 0644]
UnixPkg/UnixGopDxe/UnixGopScreen.c [new file with mode: 0644]
UnixPkg/UnixPkg.dec
UnixPkg/UnixPkg.dsc
UnixPkg/UnixPkg.fdf
UnixPkg/UnixPkgX64.dsc
UnixPkg/UnixPkgX64.fdf
UnixPkg/UnixSnpDxe/ComponentName.c [new file with mode: 0644]
UnixPkg/UnixSnpDxe/UnixSnp.c [new file with mode: 0644]
UnixPkg/UnixSnpDxe/UnixSnp.h [new file with mode: 0644]
UnixPkg/UnixSnpDxe/UnixSnpDxe.inf [new file with mode: 0644]
UnixPkg/UnixUgaDxe/UnixUga.h
UnixPkg/UnixUgaDxe/UnixUga.inf
UnixPkg/UnixUgaDxe/UnixUgaDriver.c
UnixPkg/UnixUgaDxe/UnixUgaInput.c
UnixPkg/UnixUgaDxe/UnixUgaScreen.c
UnixPkg/Xcode/xcode_project/XcodeBuild.sh
UnixPkg/Xcode/xcode_project64/XcodeBuild.sh

index 0cc913abfb1247c7695c3f197b5131dae11d47ee..d4926c3707b5b884d9f1812e6791fcf5cf339fa2 100644 (file)
@@ -28,6 +28,7 @@ Abstract:
 #include <Guid/DataHubRecords.h>\r
 #include <Protocol/CpuIo2.h>\r
 #include <Protocol/FrameworkHii.h>\r
+#include <Protocol/UnixThunk.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -37,6 +38,8 @@ Abstract:
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UnixLib.h>\r
+\r
 #include "CpuDriver.h"\r
 #include "UnixDxe.h"\r
 #include <Protocol/UnixIo.h>\r
@@ -151,6 +154,7 @@ Returns:
 \r
   Private                 = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);\r
   Private->InterruptState = TRUE;\r
+  gUnix->EnableInterrupt ();\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -184,6 +188,7 @@ Returns:
 \r
   Private                 = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);\r
   Private->InterruptState = FALSE;\r
+  gUnix->DisableInterrupt ();\r
   return EFI_SUCCESS;\r
 }\r
 \r
index 1c2e9d2f5c1a10b9accf8d3a38cbd9bc132e8dd9..ea49064cea18ece36118826d3b499a6348254709 100644 (file)
@@ -52,6 +52,7 @@
   HiiLib\r
   DebugLib\r
   BaseLib\r
+  UnixLib\r
 \r
 [Protocols]\r
   gEfiUnixIoProtocolGuid                        # PROTOCOL_NOTIFY SOMETIMES_CONSUMED\r
index 7bb9a4655480eeb61b8e3dd203263115fe5e003e..c9b91ef366df04a0f4cac8daf8b60a9dfa3fe98c 100644 (file)
@@ -20,6 +20,8 @@ Abstract:
 #ifndef _UNIX_IO_H_\r
 #define _UNIX_IO_H_\r
 \r
+#include <Protocol/UnixThunk.h>\r
+\r
 #define EFI_UNIX_IO_PROTOCOL_GUID \\r
   { \\r
     0xf2e23f54, 0x8985, 0x11db, {0xac, 0x79, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } \\r
@@ -139,4 +141,14 @@ extern EFI_GUID gEfiUnixCPUModelGuid;
 \r
 extern EFI_GUID gEfiUnixCPUSpeedGuid;\r
 \r
+//\r
+// EFI_UNIX_NETWORK\r
+//\r
+#define EFI_UNIX_NETWORK_GUID \\r
+  { \\r
+    0x081603B4, 0x0F1D, 0x4022, {0xB6, 0xFD, 0x4C, 0xE3, 0x5E, 0x09, 0xA1, 0xA6 } \\r
+  }\r
+\r
+extern EFI_GUID gEfiUnixNetworkGuid;\r
+\r
 #endif\r
index 307da1fa7f154416b4ba8cf12d929b08454aa136..a5383be29e20b7b943c2e8586e1e4228bb74fb37 100644 (file)
@@ -1,7 +1,7 @@
 /*++
 
 Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
 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
@@ -51,10 +51,21 @@ Abstract:
 #include <stdlib.h>
 #include <sys/ioctl.h>
 
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <ifaddrs.h>
+#include <net/bpf.h>
+
 #ifdef __APPLE__
 #include <sys/param.h>
 #include <sys/mount.h>
 #define _XOPEN_SOURCE
+#ifndef _Bool
+  #define _Bool char // for clang debug
+#endif
 #else
 #include <termio.h>
 #include <sys/vfs.h>
@@ -76,7 +87,15 @@ Abstract:
 #pragma pack(4)
 #endif
 
-#if __DARWIN_64_BIT_INO_T
+#if defined(__DARWIN_64_BIT_INO_T)
+
+
+typedef struct {
+  UINTN        tv_sec;         /* seconds */
+       UINTN   tv_nsec;        /* and nanoseconds */
+} EFI_timespec;
+
+
 
 typedef struct stat_fix { \
        dev_t           st_dev;                 /* [XSI] ID of device containing file */
@@ -86,7 +105,15 @@ typedef struct stat_fix { \
        uid_t           st_uid;                 /* [XSI] User ID of the file */
        gid_t           st_gid;                 /* [XSI] Group ID of the file */
        dev_t           st_rdev;                /* [XSI] Device ID */
-       __DARWIN_STRUCT_STAT64_TIMES
+
+  // clang for X64 ABI follows Windows and a long is 32-bits
+  // this breaks system inlcude files so that is why we need
+  // to redefine timespec as EFI_timespec 
+  EFI_timespec  st_atimespec;
+  EFI_timespec  st_mtimespec;
+  EFI_timespec  st_ctimespec;
+  EFI_timespec  st_birthtimespec;
+
        off_t           st_size;                /* [XSI] file size, in bytes */
        blkcnt_t        st_blocks;              /* [XSI] blocks allocated for file */
        blksize_t       st_blksize;             /* [XSI] optimal blocksize for I/O */
@@ -358,6 +385,35 @@ VOID
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext
   );
 
+typedef
+int
+(EFIAPI *UnixGetIfAddrs) (
+  struct ifaddrs **ifap
+  );
+
+typedef
+void
+(EFIAPI *UnixFreeIfAddrs) (
+  struct ifaddrs *ifap
+  );
+
+typedef
+int
+(EFIAPI *UnixSocket) (
+  int domain, 
+  int type, 
+  int protocol
+  );
+
+typedef 
+void
+(EFIAPI *UnixDisableInterruptEmulation) (void);
+
+typedef 
+void
+(EFIAPI *UnixEnableInterruptEmulation) (void);
+
+
 
 
 #define EFI_UNIX_THUNK_PROTOCOL_SIGNATURE SIGNATURE_32 ('L', 'N', 'X', 'T')
@@ -407,8 +463,12 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
   UnixPeCoffGetEntryPoint                 PeCoffGetEntryPoint;
   UnixPeCoffRelocateImageExtraAction      PeCoffRelocateImageExtraAction;
   UnixPeCoffLoaderUnloadImageExtraAction  PeCoffUnloadImageExtraAction;
+  UnixEnableInterruptEmulation        EnableInterrupt;
+  UnixDisableInterruptEmulation       DisableInterrupt;
 
-
+  UnixGetIfAddrs                      GetIfAddrs;
+  UnixFreeIfAddrs                     FreeIfAddrs;
+  UnixSocket                          Socket;
 } EFI_UNIX_THUNK_PROTOCOL;
 
 extern EFI_GUID gEfiUnixThunkProtocolGuid;
index 3b32795219e553c4d87c6a144ba7cf114c87cc66..5200e4c4e081b8449046c9e1c3ce85e0c124a58a 100644 (file)
@@ -20,19 +20,24 @@ Abstract:
 #ifndef _UNIX_UGA_IO_H_
 #define _UNIX_UGA_IO_H_
 
+#include <Protocol/SimplePointer.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Protocol/SimpleTextInEx.h>
+#include <Protocol/UgaDraw.h>
+
 #define EFI_UNIX_UGA_IO_PROTOCOL_GUID {0xf2e5e2c6, 0x8985, 0x11db, {0xa1, 0x91, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35 } }
 
 typedef struct _EFI_UNIX_UGA_IO_PROTOCOL EFI_UNIX_UGA_IO_PROTOCOL;
 
 typedef
 EFI_STATUS
-(*UGAClose)(
+(EFIAPI *UGAClose)(
   EFI_UNIX_UGA_IO_PROTOCOL *Uga
   );
 
 typedef
 EFI_STATUS
-(*UGASize)(
+(EFIAPI *UGASize)(
   EFI_UNIX_UGA_IO_PROTOCOL *Uga, 
   UINT32                   Width, 
   UINT32                   Height
@@ -40,15 +45,38 @@ EFI_STATUS
 
 typedef
 EFI_STATUS
-(*UGACheckKey)(
+(EFIAPI *UGACheckKey)(
   EFI_UNIX_UGA_IO_PROTOCOL *Uga
   );
 
 typedef
 EFI_STATUS
-(*UGAGetKey)(
+(EFIAPI *UGAGetKey)(
   EFI_UNIX_UGA_IO_PROTOCOL *Uga, 
-  EFI_INPUT_KEY            *key
+  EFI_KEY_DATA             *key
+  );
+
+typedef
+EFI_STATUS
+(EFIAPI *UGAKeySetState) (
+  IN EFI_UNIX_UGA_IO_PROTOCOL   *UgaIo, 
+  IN EFI_KEY_TOGGLE_STATE       *KeyToggleState
+  );
+
+
+typedef 
+VOID
+(EFIAPI *UGA_REGISTER_KEY_NOTIFY_CALLBACK) (
+  IN VOID           *Context,
+  IN EFI_KEY_DATA   *KeyData
+  );
+
+typedef
+EFI_STATUS
+(EFIAPI *UGARegisterKeyNotify) (
+  IN EFI_UNIX_UGA_IO_PROTOCOL           *UgaIo, 
+  IN UGA_REGISTER_KEY_NOTIFY_CALLBACK   CallBack,
+  IN VOID                               *Context
   );
 
 
@@ -64,20 +92,45 @@ typedef struct {
 
 typedef
 EFI_STATUS
-(*UGABlt)(
+(EFIAPI *UGABlt)(
     IN  EFI_UNIX_UGA_IO_PROTOCOL                *Uga,
          IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,
          IN  EFI_UGA_BLT_OPERATION                   BltOperation,
          IN  UGA_BLT_ARGS                            *Args
          );
 
+typedef
+BOOLEAN
+(EFIAPI *UGAIsKeyPressed) ( 
+  IN  EFI_UNIX_UGA_IO_PROTOCOL  *UgaIo, 
+  IN  EFI_KEY_DATA              *KeyData
+  );
+
+typedef
+EFI_STATUS
+(EFIAPI *UGACheckPointer)(
+  EFI_UNIX_UGA_IO_PROTOCOL *Uga
+  );
+
+typedef
+EFI_STATUS
+(EFIAPI *UGAGetPointerState)(
+  EFI_UNIX_UGA_IO_PROTOCOL *Uga,
+  EFI_SIMPLE_POINTER_STATE *state
+  );
+
 struct _EFI_UNIX_UGA_IO_PROTOCOL {
   VOID                                *Private;
   UGAClose                            UgaClose;
   UGASize                             UgaSize;
   UGACheckKey                         UgaCheckKey;
+  UGAKeySetState                      UgaKeySetState;
   UGAGetKey                           UgaGetKey;
+  UGARegisterKeyNotify                UgaRegisterKeyNotify;
   UGABlt                              UgaBlt;
+  UGAIsKeyPressed                     UgaIsKeyPressed;
+  UGACheckPointer                     UgaCheckPointer;
+  UGAGetPointerState                  UgaGetPointerState;
 };
 
 
index 3a84b0d22f8e79e425e98041fb764b295a78a5af..fd7ba6e717747df756fbd59dbf1a40b5229e4c85 100644 (file)
@@ -40,12 +40,9 @@ ASM_PFX(InternalSwitchStack):
     movq    %rcx, %rax\r
     movq    %rdx, %rcx\r
     movq    %r8,  %rdx\r
-    movq    %r9,  %rsp\r
-\r
     #\r
     # Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,\r
     # in case the callee wishes to spill them.\r
     #\r
-         subq    $40, %rsp  // 32-byte shadow space plus alignment pad\r
-\r
+    lea     -0x20(%r9), %rsp\r
     call    *%rax\r
index bbeeb8172171a9a1228fcdf44cae815cbd3d46ef..449ad52e16581645ba31ce703f28a1365a548b62 100644 (file)
@@ -30,7 +30,7 @@ UINT16                      gPlatformBootTimeOutDefault = 10;
 //\r
 // Platform specific keyboard device path\r
 //\r
-UNIX_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath0 = \r
+UNIX_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath = \r
 {\r
   {\r
       HARDWARE_DEVICE_PATH,\r
@@ -54,7 +54,7 @@ UNIX_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath0 =
   gEndEntire\r
 };\r
 \r
-UNIX_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath1 = {\r
+UNIX_PLATFORM_UGA_DEVICE_PATH gGopDevicePath = {\r
   {\r
       HARDWARE_DEVICE_PATH,\r
       HW_VENDOR_DP,\r
@@ -71,8 +71,8 @@ UNIX_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath1 = {
         (UINT8) (sizeof (UNIX_VENDOR_DEVICE_PATH_NODE)),\r
         (UINT8) ((sizeof (UNIX_VENDOR_DEVICE_PATH_NODE)) >> 8)\r
       },\r
-      EFI_UNIX_UGA_GUID,\r
-      1\r
+      EFI_UNIX_GOP_GUID,\r
+      0\r
   },\r
   gEndEntire\r
 };\r
@@ -108,11 +108,11 @@ BDS_CONSOLE_CONNECT_ENTRY   gPlatformConsole[] = {
     (CONSOLE_OUT | CONSOLE_IN)\r
   },\r
   {\r
-    (EFI_DEVICE_PATH_PROTOCOL *) &gUgaDevicePath0,\r
+    (EFI_DEVICE_PATH_PROTOCOL *) &gUgaDevicePath,\r
     (CONSOLE_OUT | CONSOLE_IN)\r
   },\r
   {\r
-    (EFI_DEVICE_PATH_PROTOCOL *) &gUgaDevicePath1,\r
+    (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath,\r
     (CONSOLE_OUT | CONSOLE_IN)\r
   },\r
   {\r
index 826e13bad3588436611dc3db4a185b100eb59142..3c7ef8009793cf1212970d7713eac6c1dbc2875d 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<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
@@ -369,28 +369,88 @@ GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)
 \r
 EFI_STATUS \r
 EFIAPI \r
-GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key)\r
+GasketUgaKeySetState (EFI_UNIX_UGA_IO_PROTOCOL   *UgaIo, EFI_KEY_TOGGLE_STATE *KeyToggleState)\r
+{\r
+  return GasketUintnUintn (UgaGetKey, (UINTN)UgaIo, (UINTN)KeyToggleState);\r
+}\r
+\r
+EFI_STATUS \r
+EFIAPI \r
+GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_KEY_DATA *key)\r
 {\r
   return GasketUintnUintn (UgaGetKey, (UINTN)UgaIo, (UINTN)key);\r
 }\r
 \r
+EFI_STATUS \r
+EFIAPI \r
+GasketUgaRegisterKeyNotify (\r
+  IN EFI_UNIX_UGA_IO_PROTOCOL           *UgaIo, \r
+  IN UGA_REGISTER_KEY_NOTIFY_CALLBACK   CallBack,\r
+  IN VOID                               *Context\r
+  )\r
+{\r
+  return GasketUintnUintnUintn (UgaRegisterKeyNotify, (UINTN)UgaIo, (UINTN)CallBack, (UINTN)Context);  \r
+}\r
+\r
 EFI_STATUS \r
 EFIAPI \r
 GasketUgaBlt (\r
    EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
    IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
    IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
-   IN  UINTN                                   SourceX,\r
-   IN  UINTN                                   SourceY,\r
-   IN  UINTN                                   DestinationX,\r
-   IN  UINTN                                   DestinationY,\r
-   IN  UINTN                                   Width,\r
-   IN  UINTN                                   Height,\r
-   IN  UINTN                                   Delta OPTIONAL\r
+        IN  UGA_BLT_ARGS                            *Args\r
    )\r
 {\r
-  return GasketUintn10Args (UgaBlt, (UINTN)UgaIo, (UINTN)BltBuffer, BltOperation, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\r
+  return GasketUintnUintnUintnUintn (UgaBlt, (UINTN)UgaIo, (UINTN)BltBuffer, (UINTN)BltOperation, (UINTN)Args);\r
+}\r
+\r
+EFI_STATUS \r
+EFIAPI \r
+GasketUgaCheckPointer (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)\r
+{\r
+  return GasketUintn (UgaCheckPointer, (UINTN)UgaIo);\r
+}\r
+\r
+EFI_STATUS \r
+EFIAPI \r
+GasketUgaGetPointerState (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_SIMPLE_POINTER_STATE *state)\r
+{\r
+  return GasketUintnUintn (UgaGetPointerState, (UINTN)UgaIo, (UINTN)state);\r
+}\r
+\r
+void\r
+GasketUnixEnableInterrupt (void)\r
+{\r
+  GasketVoid (UnixEnableInterrupt);\r
+}\r
+\r
+void\r
+GasketUnixDisableInterrupt (void)\r
+{\r
+  GasketVoid (UnixDisableInterrupt);\r
+}\r
+\r
+\r
+int\r
+Gasketgetifaddrs (struct ifaddrs **ifap)\r
+{\r
+  return( GasketUintn( getifaddrs, ( UINTN ) ifap ) );\r
+}\r
+\r
+\r
+void\r
+Gasketfreeifaddrs (struct ifaddrs *ifap)\r
+{\r
+  GasketUintn( freeifaddrs, ( UINTN ) ifap );\r
 }\r
 \r
+\r
+int\r
+Gasketsocket (int domain, int type, int protocol )\r
+{\r
+  return( GasketUintnUintnUintn( socket, domain, type, protocol ) );\r
+}\r
+\r
+\r
 #endif\r
 \r
index 1b7187035a17cd9b428e1f9564484ef8604cb60d..4c75d8abcc83ee30ba7f1b9d5d8b732e4c1e4df9 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<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
@@ -19,6 +19,7 @@
 \r
 #include <Protocol/UgaDraw.h>\r
 #include <Protocol/SimpleTextIn.h>\r
+#include <Protocol/SimpleTextInEx.h>\r
 #include <Protocol/UnixUgaIo.h>\r
 \r
 \r
@@ -177,11 +178,17 @@ Gasketclosedir (
 \r
 int\r
 EFIAPI\r
-Gasketstat (const char *path, STAT_FIX *buf);\r
+Gasketstat (\r
+  const char  *path, \r
+  STAT_FIX    *buf)\r
+  ;\r
 \r
 int\r
 EFIAPI\r
-Gasketstatfs (const char *path, struct statfs *buf);\r
+Gasketstatfs (\r
+  const char      *path, \r
+  struct statfs   *buf\r
+  );\r
 \r
 int\r
 EFIAPI\r
@@ -293,6 +300,34 @@ Gasketsigaction (
   struct sigaction *oact\r
   );\r
 \r
+int \r
+EFIAPI \r
+Gasketgetifaddrs (\r
+  struct ifaddrs **ifap\r
+  );\r
+\r
+void \r
+EFIAPI \r
+Gasketfreeifaddrs (\r
+  struct ifaddrs *ifap\r
+  );\r
+\r
+int \r
+EFIAPI \r
+Gasketsocket (\r
+  int domain, \r
+  int type, \r
+  int protocol\r
+  );\r
+\r
+void \r
+EFIAPI \r
+GasketUnixEnableInterrupt (void);\r
+\r
+void \r
+EFIAPI \r
+GasketUnixDisableInterrupt (void);\r
+\r
 RETURN_STATUS\r
 EFIAPI\r
 GasketUnixPeCoffGetEntryPoint (\r
@@ -406,6 +441,13 @@ ReverseGasketUint64 (
   UINT64 a\r
   );\r
 \r
+UINTN\r
+ReverseGasketUint64Uint64 (\r
+  VOID      *CallBack,\r
+  VOID      *Context,\r
+  VOID      *Key\r
+  );\r
+\r
 //\r
 // Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
 //\r
@@ -435,35 +477,59 @@ EFI_STATUS
 EFIAPI\r
 GasketUgaGetKey (\r
   EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
-  EFI_INPUT_KEY *key\r
+  EFI_KEY_DATA              *key\r
   );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
-GasketUgaBlt (\r
+GasketUgaKeySetState (\r
    EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
+  EFI_KEY_TOGGLE_STATE *KeyToggleState\r
+  );\r
+  \r
+EFI_STATUS\r
+EFIAPI  \r
+GasketUgaRegisterKeyNotify ( \r
+  IN EFI_UNIX_UGA_IO_PROTOCOL           *UgaIo, \r
+  IN UGA_REGISTER_KEY_NOTIFY_CALLBACK   CallBack,\r
+  IN VOID                               *Context\r
+  );\r
+  \r
+EFI_STATUS\r
+EFIAPI\r
+GasketUgaBlt (\r
+  IN  EFI_UNIX_UGA_IO_PROTOCOL                *UgaIo,\r
    IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
    IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
-   IN  UINTN                                   SourceX,\r
-   IN  UINTN                                   SourceY,\r
-   IN  UINTN                                   DestinationX,\r
-   IN  UINTN                                   DestinationY,\r
-   IN  UINTN                                   Width,\r
-   IN  UINTN                                   Height,\r
-   IN  UINTN                                   Delta OPTIONAL\r
+  IN  UGA_BLT_ARGS                            *Args\r
    );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
-UgaCreate (\r
-  EFI_UNIX_UGA_IO_PROTOCOL **Uga,\r
-  CONST CHAR16 *Title\r
+GasketUgaCheckPointer (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
+  );\r
+\r
+EFI_STATUS \r
+EFIAPI \r
+GasketUgaGetPointerState (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, \r
+  EFI_SIMPLE_POINTER_STATE *state\r
   );\r
 \r
 \r
 //\r
-// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
+// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL C calls\r
 //\r
+\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UgaCreate (\r
+  EFI_UNIX_UGA_IO_PROTOCOL **Uga,\r
+  CONST CHAR16 *Title\r
+  );\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 UgaClose (\r
@@ -488,24 +554,39 @@ EFI_STATUS
 EFIAPI\r
 UgaGetKey (\r
   EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
-  EFI_INPUT_KEY *key\r
+  EFI_KEY_DATA             *key\r
   );\r
 \r
+EFI_STATUS\r
+EFIAPI\r
+UgaRegisterKeyNotify (\r
+  IN EFI_UNIX_UGA_IO_PROTOCOL           *UgaIo, \r
+  IN UGA_REGISTER_KEY_NOTIFY_CALLBACK   CallBack,\r
+  IN VOID                               *Context\r
+  );\r
+\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 UgaBlt (\r
-  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
+  IN  EFI_UNIX_UGA_IO_PROTOCOL                *UgaIo,\r
   IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
   IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
-  IN  UINTN                                   SourceX,\r
-  IN  UINTN                                   SourceY,\r
-  IN  UINTN                                   DestinationX,\r
-  IN  UINTN                                   DestinationY,\r
-  IN  UINTN                                   Width,\r
-  IN  UINTN                                   Height,\r
-  IN  UINTN                                   Delta OPTIONAL\r
+  IN  UGA_BLT_ARGS                            *Args\r
   );\r
 \r
+EFI_STATUS \r
+EFIAPI\r
+UgaCheckPointer (\r
+  IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
+  );\r
+  \r
+EFI_STATUS\r
+EFIAPI\r
+UgaGetPointerState (\r
+  IN EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, \r
+  IN EFI_SIMPLE_POINTER_STATE *State\r
+  );\r
 \r
 \r
 #endif\r
index 93d92b50deb14ba02ae362494198093af19b9957..440e73d6df4e4ff224c1d451a38b68414f02286f 100644 (file)
@@ -127,6 +127,31 @@ _GasketUintnUintnUintnUintn:
   leave\r
   ret\r
 \r
+#------------------------------------------------------------------------------\r
+#------------------------------------------------------------------------------\r
+.globl _GasketUintnUintnUintnUintnUintn\r
+_GasketUintnUintnUintnUintnUintn:\r
+  pushl %ebp\r
+  movl  %esp, %ebp\r
+  subl  $50, %esp           # sub extra 0x10 from the stack for the AND\r
+  and   $-16, %esp          # stack needs to end in 0xFFFFFFF0 before call\r
+  movl  8(%ebp), %eax\r
+  movl  %eax, -12(%ebp)\r
+  movl  28(%ebp), %eax\r
+  movl  %eax, 16(%esp)\r
+  movl  24(%ebp), %eax\r
+  movl  %eax, 12(%esp)\r
+  movl  20(%ebp), %eax\r
+  movl  %eax, 8(%esp)\r
+  movl  16(%ebp), %eax\r
+  movl  %eax, 4(%esp)\r
+  movl  12(%ebp), %eax\r
+  movl  %eax, (%esp)\r
+  movl  -12(%ebp), %eax\r
+  call  *%eax\r
+  leave\r
+  ret\r
+\r
 #------------------------------------------------------------------------------\r
 #------------------------------------------------------------------------------\r
 .globl _GasketUintn10Args\r
@@ -256,6 +281,35 @@ _ReverseGasketUint64:
        ret\r
   \r
   \r
+.globl _ReverseGasketUint64Uint64\r
+_ReverseGasketUint64Uint64:\r
+  pushl   %ebp\r
+  movl    %esp, %ebp\r
+  subl    $56, %esp\r
+  movl    12(%ebp), %eax\r
+  movl    %eax, -32(%ebp)\r
+  movl    16(%ebp), %eax\r
+  movl    %eax, -28(%ebp)\r
+  movl    20(%ebp), %eax\r
+  movl    %eax, -40(%ebp)\r
+  movl    24(%ebp), %eax\r
+  movl    %eax, -36(%ebp)\r
+  movl    8(%ebp), %eax\r
+  movl    %eax, -12(%ebp)\r
+  movl    -40(%ebp), %eax\r
+  movl    -36(%ebp), %edx\r
+  movl    %eax, 8(%esp)\r
+  movl    %edx, 12(%esp)\r
+  movl    -32(%ebp), %eax\r
+  movl    -28(%ebp), %edx\r
+  movl    %eax, (%esp)\r
+  movl    %edx, 4(%esp)\r
+  movl    -12(%ebp), %eax\r
+  call    *%eax\r
+  leave\r
+  ret\r
+\r
+  \r
 // Sec PPI Callbacks\r
 \r
 .globl _GasketSecUnixPeiLoadFile\r
@@ -288,4 +342,3 @@ _GasketSecTemporaryRamSupport:
        jmp       _SecTemporaryRamSupport\r
   \r
   #endif\r
-  \r
index bb703bf6315487fb80501ac7d0a03f6cd6757ef0..d85a26a53ec88231657b25859a5bb2e39bb4351d 100644 (file)
@@ -7,7 +7,7 @@
   the assembly functions. 
 
 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
 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
@@ -36,6 +36,7 @@ typedef UINT32    UINTN;
 typedef int (*GASKET_VOID) ();
 typedef int (*GASKET_UINTN) (UINTN);
 typedef int (*GASKET_UINT64) (UINT64);
+typedef int (*GASKET_UINT64UINT64) (UINT64, UINT64);
 typedef int (*GASKET_UINTN_UINTN) (UINTN, UINTN);
 typedef int (*GASKET_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN);
 typedef int (*GASKET_UINTN_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN, UINTN);
@@ -149,4 +150,14 @@ ReverseGasketUint64 (void *api, UINT64 a)
   return;
 }
 
+void
+ReverseGasketUint64UINT64 (void *api, UINT64 a, UINT64 b)
+{
+  GASKET_UINT64UINT64 func;
+  
+  func = (GASKET_UINT64UINT64)api;
+  func (a, b);
+  return;
+}
+
 
index da83e3fa5cc8f15dc22483e4f3a8679f83c920d4..dc4b14c00fadac3623aadd86fba01c73fecda26d 100644 (file)
@@ -1,7 +1,7 @@
 /*++
 
 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
 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
@@ -1114,6 +1114,18 @@ SecPeCoffRelocateImageExtraAction (
 {
 
 #ifdef __APPLE__
+  BOOLEAN EnabledOnEntry;
+
+   //
+   // Make sure writting of the file is an atomic operation
+   //
+   if (UnixInterruptEanbled ()) {
+     UnixDisableInterrupt ();
+     EnabledOnEntry = TRUE;
+   } else {
+     EnabledOnEntry = FALSE;
+   }
+
   PrintLoadAddress (ImageContext);
 
   //
@@ -1165,10 +1177,17 @@ SecPeCoffRelocateImageExtraAction (
       // Hey what can you say scripting in gdb is not that great....
       //
       SecGdbScriptBreak ();
+    } else {
+      ASSERT (FALSE);
     }
 
     AddHandle (ImageContext, ImageContext->PdbPointer);
 
+    if (EnabledOnEntry) {
+      UnixEnableInterrupt ();
+    }
+
+    
   }
 
 #else
@@ -1223,12 +1242,20 @@ SecPeCoffLoaderUnloadImageExtraAction (
 
 #ifdef __APPLE__
   FILE  *GdbTempFile;
+  BOOLEAN EnabledOnEntry;
 
   if (Handle != NULL) {
     //
     // Need to skip .PDB files created from VC++
     //
     if (!IsPdbFile (ImageContext->PdbPointer)) {
+       if (UnixInterruptEanbled ()) {
+         UnixDisableInterrupt ();
+         EnabledOnEntry = TRUE;
+       } else {
+         EnabledOnEntry = FALSE;
+       }
+       
       //
       // Write the file we need for the gdb script
       //
@@ -1242,6 +1269,12 @@ SecPeCoffLoaderUnloadImageExtraAction (
         // Hey what can you say scripting in gdb is not that great....
         //
         SecGdbScriptBreak ();
+      } else {
+        ASSERT (FALSE);
+      }
+      
+      if (EnabledOnEntry) {
+        UnixEnableInterrupt ();
       }
     }
   }
index 408a761965a4e092328650eeeb17ebc37ac04597..dc857d8fb0cfe14c0bd0949e520a0efe2134a81f 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
-Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -585,7 +585,6 @@ SecPeCoffLoaderUnloadImageExtraAction (
   );\r
 \r
 \r
-\r
 VOID SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));\r
 void msSleep (unsigned long Milliseconds);\r
 void GetLocalTime (EFI_TIME *Time);\r
@@ -593,6 +592,9 @@ void TzSet (void);
 long GetTimeZone(void);\r
 int GetDayLight(void);\r
 int GetErrno(void);\r
+void UnixEnableInterrupt (void);\r
+void UnixDisableInterrupt (void);\r
+BOOLEAN UnixInterruptEanbled (void);\r
 \r
 \r
 \r
index 94d2d95fb7f290def6599d0734969af4128b9573..abee48519c364da8ea46e307f21d48ffc7e3e573 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 # Main executable file of Unix Emulator that loads PEI core after initialization finished.\r
 # Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
-# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+# Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<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
@@ -42,7 +42,7 @@
   Ia32/SwitchStack.c\r
 \r
 [Sources.X64]\r
-#  X64/Gasket.S       # pure UINX x86_64 ABI also need to fix issues in BaseLib\r
+#  X64/Gasket.S       # pure UNIX x86_64 ABI also need to fix issues in BaseLib\r
   X64/MangleGasket.S  # convert between UNIX x86_64 ABI and EFI X64 ABI\r
 \r
   X64/SwitchStack.S\r
index c8b9451328b67c7b8314ce197a35d168169e22cf..c1a2b2d7a54c533f9791b46cee726aebc0e5b7bf 100644 (file)
@@ -1,7 +1,7 @@
 /*++
 
 Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
 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        
@@ -17,16 +17,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "PiPei.h"
-#include "Protocol/UnixThunk.h"
-#include "Protocol/SimpleTextIn.h"
-#include "Protocol/UgaDraw.h"
-#include "Protocol/UnixUgaIo.h"
+#include <PiPei.h>
+#include <Protocol/SimplePointer.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Protocol/SimpleTextInEx.h>
+#include <Protocol/UgaDraw.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xos.h>
 #include <X11/extensions/XShm.h>
 #include <X11/keysym.h>
+#include <X11/cursorfont.h>
+
+#include <Protocol/UnixThunk.h>
+#include <Protocol/UnixUgaIo.h>
 
 #include <Ppi/StatusCode.h>
 
@@ -37,20 +41,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PcdLib.h>
 #include <Library/DebugLib.h>
 
+#include "Gasket.h"
+#include "SecMain.h"
+
+
 extern void msSleep (unsigned long Milliseconds);
 
 /* XQueryPointer  */
 
-struct uga_drv_shift_mask
-{
+struct uga_drv_shift_mask {
   unsigned char shift;
   unsigned char size;
   unsigned char csize;
 };
 
 #define NBR_KEYS 32
-typedef struct
-{
+typedef struct {
   EFI_UNIX_UGA_IO_PROTOCOL UgaIo;
 
   Display *display;
@@ -75,7 +81,17 @@ typedef struct
   unsigned int key_rd;
   unsigned int key_wr;
   unsigned int key_count;
-  EFI_INPUT_KEY keys[NBR_KEYS];
+  EFI_KEY_DATA keys[NBR_KEYS];
+
+  EFI_KEY_STATE KeyState;
+  
+  UGA_REGISTER_KEY_NOTIFY_CALLBACK RegisterdKeyCallback;
+  VOID                             *RegisterdKeyCallbackContext;
+  
+  int                        previous_x;
+  int                        previous_y;
+  EFI_SIMPLE_POINTER_STATE   pointer_state;
+  int                        pointer_state_changed;
 } UGA_IO_PRIVATE;
 
 void
@@ -246,49 +262,165 @@ handleKeyEvent(UGA_IO_PRIVATE *drv, XEvent *ev)
 {
   KeySym keysym;
   char str[4];
-  EFI_INPUT_KEY Key;
+  EFI_KEY_DATA KeyData;
   int res;
 
   if (drv->key_count == NBR_KEYS)
     return;
 
   res = XLookupString(&ev->xkey, str, sizeof(str), &keysym, NULL);
-  Key.ScanCode = 0;
-  Key.UnicodeChar = 0;
+  KeyData.Key.ScanCode = 0;
+  KeyData.Key.UnicodeChar = 0;
+  KeyData.KeyState.KeyShiftState = 0;
+
+  //
+  // KeyRelease is not supported (on Mac) so we can not easily implement Ex functions.
+  // If a modifier key is hit by its self we get a keysym. If a modfifier and key is hit
+  // we get the state bit set and keysym is the modified key. 
+  //
+  // We use lack of state bits being set to clear ToggleState and KeyShiftState. We can 
+  // also use the stat bits to set ToggleState and KeyShiftState. 
+  // Skipping EFI_SCROLL_LOCK_ACTIVE & EFI_NUM_LOCK_ACTIVE since they are not on Macs  
+  //
+  if ((ev->xkey.state & LockMask) == 0) {
+    drv->KeyState.KeyToggleState &= ~EFI_CAPS_LOCK_ACTIVE;
+  } else {
+    drv->KeyState.KeyToggleState |= EFI_CAPS_LOCK_ACTIVE;
+  }
+  
+  if ((ev->xkey.state & ControlMask) == 0) {
+    drv->KeyState.KeyShiftState &= ~(EFI_RIGHT_CONTROL_PRESSED | EFI_LEFT_CONTROL_PRESSED);
+  } else if ((drv->KeyState.KeyShiftState & EFI_RIGHT_CONTROL_PRESSED) == 0) {
+    drv->KeyState.KeyShiftState |= EFI_LEFT_CONTROL_PRESSED;
+  }
+  
+  if ((ev->xkey.state & ShiftMask) == 0) {
+    drv->KeyState.KeyShiftState &= ~(EFI_RIGHT_SHIFT_PRESSED | EFI_LEFT_SHIFT_PRESSED);
+  } else if ((drv->KeyState.KeyShiftState & EFI_RIGHT_SHIFT_PRESSED) == 0) {
+    drv->KeyState.KeyShiftState |= EFI_LEFT_SHIFT_PRESSED;
+  }
+  
+  if ((ev->xkey.state & Mod2Mask) == 0) {
+    drv->KeyState.KeyShiftState &= ~(EFI_RIGHT_LOGO_PRESSED | EFI_LEFT_LOGO_PRESSED);
+  } else if ((drv->KeyState.KeyShiftState & EFI_RIGHT_LOGO_PRESSED) == 0) {
+    drv->KeyState.KeyShiftState |= EFI_LEFT_LOGO_PRESSED;
+  }
+
+  if ((ev->xkey.state & 0x2000) == 0) {
+    drv->KeyState.KeyShiftState &= ~(EFI_LEFT_ALT_PRESSED);
+  } else {
+    drv->KeyState.KeyShiftState |= EFI_LEFT_ALT_PRESSED;
+  }
+  
+  
   switch (keysym) {
-  case XK_Home:       Key.ScanCode = SCAN_HOME;       break;
-  case XK_End:        Key.ScanCode = SCAN_END;        break;
-  case XK_Left:       Key.ScanCode = SCAN_LEFT;       break;
-  case XK_Right:      Key.ScanCode = SCAN_RIGHT;      break;
-  case XK_Up:         Key.ScanCode = SCAN_UP;         break;
-  case XK_Down:       Key.ScanCode = SCAN_DOWN;       break;
-  case XK_Delete:     Key.ScanCode = SCAN_DELETE;     break;
-  case XK_Insert:     Key.ScanCode = SCAN_INSERT;     break;
-  case XK_Page_Up:    Key.ScanCode = SCAN_PAGE_UP;    break;
-  case XK_Page_Down:  Key.ScanCode = SCAN_PAGE_DOWN;  break;
-  case XK_Escape:     Key.ScanCode = SCAN_ESC;        break;
-
-  case XK_F1:   Key.ScanCode = SCAN_F1;   break;
-  case XK_F2:   Key.ScanCode = SCAN_F2;   break;
-  case XK_F3:   Key.ScanCode = SCAN_F3;   break;
-  case XK_F4:   Key.ScanCode = SCAN_F4;   break;
-  case XK_F5:   Key.ScanCode = SCAN_F5;   break;
-  case XK_F6:   Key.ScanCode = SCAN_F6;   break;
-  case XK_F7:   Key.ScanCode = SCAN_F7;   break;
-  case XK_F8:   Key.ScanCode = SCAN_F8;   break;
-  case XK_F9:   Key.ScanCode = SCAN_F9;   break;
+  case XK_Control_R:
+    drv->KeyState.KeyShiftState |= EFI_RIGHT_CONTROL_PRESSED;
+    break;
+  case XK_Control_L:
+    drv->KeyState.KeyShiftState |= EFI_LEFT_CONTROL_PRESSED;
+    break;
+
+  case XK_Shift_R:
+    drv->KeyState.KeyShiftState |= EFI_RIGHT_SHIFT_PRESSED;
+    break;
+  case XK_Shift_L:
+    drv->KeyState.KeyShiftState |= EFI_LEFT_SHIFT_PRESSED;
+    break;
+  
+  case XK_Mode_switch:
+    drv->KeyState.KeyShiftState |= EFI_LEFT_ALT_PRESSED;
+    break;
+
+  case XK_Meta_R:
+    drv->KeyState.KeyShiftState |= EFI_RIGHT_LOGO_PRESSED;
+    break;
+  case XK_Meta_L:
+    drv->KeyState.KeyShiftState |= EFI_LEFT_LOGO_PRESSED;
+    break;
+
+  case XK_Home:       KeyData.Key.ScanCode = SCAN_HOME;       break;
+  case XK_End:        KeyData.Key.ScanCode = SCAN_END;        break;
+  case XK_Left:       KeyData.Key.ScanCode = SCAN_LEFT;       break;
+  case XK_Right:      KeyData.Key.ScanCode = SCAN_RIGHT;      break;
+  case XK_Up:         KeyData.Key.ScanCode = SCAN_UP;         break;
+  case XK_Down:       KeyData.Key.ScanCode = SCAN_DOWN;       break;
+  case XK_Delete:     KeyData.Key.ScanCode = SCAN_DELETE;     break;
+  case XK_Insert:     KeyData.Key.ScanCode = SCAN_INSERT;     break;
+  case XK_Page_Up:    KeyData.Key.ScanCode = SCAN_PAGE_UP;    break;
+  case XK_Page_Down:  KeyData.Key.ScanCode = SCAN_PAGE_DOWN;  break;
+  case XK_Escape:     KeyData.Key.ScanCode = SCAN_ESC;        break;
+
+  case XK_F1:   KeyData.Key.ScanCode = SCAN_F1;   break;
+  case XK_F2:   KeyData.Key.ScanCode = SCAN_F2;   break;
+  case XK_F3:   KeyData.Key.ScanCode = SCAN_F3;   break;
+  case XK_F4:   KeyData.Key.ScanCode = SCAN_F4;   break;
+  case XK_F5:   KeyData.Key.ScanCode = SCAN_F5;   break;
+  case XK_F6:   KeyData.Key.ScanCode = SCAN_F6;   break;
+  case XK_F7:   KeyData.Key.ScanCode = SCAN_F7;   break;
+  case XK_F8:   KeyData.Key.ScanCode = SCAN_F8;   break;
+  case XK_F9:   KeyData.Key.ScanCode = SCAN_F9;   break;
 
   default:
     if (res == 1) {
-      Key.UnicodeChar = str[0];
+      KeyData.Key.UnicodeChar = str[0];
     } else {
       return;
     }
   }
 
-  drv->keys[drv->key_wr] = Key;
+  // The global state is our state
+  KeyData.KeyState.KeyShiftState = drv->KeyState.KeyShiftState;
+  KeyData.KeyState.KeyToggleState = drv->KeyState.KeyToggleState;
+
+  CopyMem (&drv->keys[drv->key_wr], &KeyData, sizeof (EFI_KEY_DATA));
   drv->key_wr = (drv->key_wr + 1) % NBR_KEYS;
   drv->key_count++;
+  
+  
+#if defined(__APPLE__) || defined(MDE_CPU_X64)
+  ReverseGasketUint64Uint64 (drv->RegisterdKeyCallback ,drv->RegisterdKeyCallbackContext, &KeyData);
+#else
+  drv->RegisterdKeyCallback (drv->RegisterdKeyCallbackContext, &KeyData);
+#endif
+
+  
+}
+
+
+void
+handleMouseMoved(UGA_IO_PRIVATE *drv, XEvent *ev)
+{
+  if ( ev->xmotion.x != drv->previous_x )
+  {
+    drv->pointer_state.RelativeMovementX += ( ev->xmotion.x - drv->previous_x );
+       drv->previous_x = ev->xmotion.x;
+       drv->pointer_state_changed = 1;
+  }
+
+  if ( ev->xmotion.y != drv->previous_y )
+  {
+    drv->pointer_state.RelativeMovementY += ( ev->xmotion.y - drv->previous_y );
+    drv->previous_y = ev->xmotion.y;
+       drv->pointer_state_changed = 1;
+  }
+
+  drv->pointer_state.RelativeMovementZ = 0;
+}
+
+void
+handleMouseDown(UGA_IO_PRIVATE *drv, XEvent *ev, BOOLEAN Pressed)
+{
+  if ( ev->xbutton.button == Button1 )
+  {
+    drv->pointer_state_changed = ( drv->pointer_state.LeftButton != Pressed );
+       drv->pointer_state.LeftButton = Pressed;
+  }
+  if ( ev->xbutton.button == Button2 )
+  {
+    drv->pointer_state_changed = ( drv->pointer_state.RightButton != Pressed );
+       drv->pointer_state.RightButton = Pressed;
+  }
 }
 
 void
@@ -319,9 +451,20 @@ HandleEvent(UGA_IO_PRIVATE *drv, XEvent *ev)
     case KeyPress:
       handleKeyEvent(drv, ev);
       break;
+    case KeyRelease:
+      break;
     case MappingNotify:
       XRefreshKeyboardMapping(&ev->xmapping);
       break;
+    case MotionNotify:
+      handleMouseMoved(drv, ev);
+      break;
+    case ButtonPress:
+      handleMouseDown(drv, ev, TRUE);
+         break;
+    case ButtonRelease:
+      handleMouseDown(drv, ev, FALSE);
+         break;
 #if 0
     case DestroyNotify:
       XCloseDisplay (drv->display);
@@ -368,37 +511,87 @@ UgaColorToPixel (UGA_IO_PRIVATE *drv, unsigned long val)
   return res;
 }
 
-EFI_STATUS
-UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)
+STATIC EFI_STATUS
+CheckKeyInternal( UGA_IO_PRIVATE *drv, BOOLEAN delay )
 {
-  UGA_IO_PRIVATE *drv = (UGA_IO_PRIVATE *)UgaIo;
   HandleEvents(drv);
-  
-  if (drv->key_count != 0) {
+  if (drv->key_count != 0)
     return EFI_SUCCESS;
-  } else {
-    /* EFI is certainly polling.  Be CPU-friendly.  */
+  if ( delay )
+    /* EFI is polling.  Be CPU-friendly.  */
     msSleep (20);
     return EFI_NOT_READY;
   }
+
+EFI_STATUS
+UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)
+{
+  UGA_IO_PRIVATE  *drv = (UGA_IO_PRIVATE *)UgaIo;
+  return( CheckKeyInternal( drv, TRUE ) );
 }
 
 EFI_STATUS
-UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key)
+EFIAPI
+UgaGetKey (
+  IN  EFI_UNIX_UGA_IO_PROTOCOL  *UgaIo, 
+  IN  EFI_KEY_DATA              *KeyData
+  )
 {
   UGA_IO_PRIVATE *drv = (UGA_IO_PRIVATE *)UgaIo;
   EFI_STATUS status;
 
-  status = UgaCheckKey(UgaIo);
+  status = CheckKeyInternal(drv, FALSE);
   if (status != EFI_SUCCESS)
     return status;
 
-  *key = drv->keys[drv->key_rd];
+  CopyMem (KeyData, &drv->keys[drv->key_rd], sizeof (EFI_KEY_DATA));
   drv->key_rd = (drv->key_rd + 1) % NBR_KEYS;
   drv->key_count--;
   return EFI_SUCCESS;
 }
 
+
+EFI_STATUS
+EFIAPI
+UgaKeySetState (
+  IN EFI_UNIX_UGA_IO_PROTOCOL   *UgaIo, 
+  IN EFI_KEY_TOGGLE_STATE       *KeyToggleState
+  )
+{
+  UGA_IO_PRIVATE  *drv = (UGA_IO_PRIVATE *)UgaIo;
+//  XKeyEvent       event;
+  
+  if (*KeyToggleState & EFI_CAPS_LOCK_ACTIVE) {
+    if ((drv->KeyState.KeyToggleState & EFI_CAPS_LOCK_ACTIVE) == 0) {
+      //
+      // We could create an XKeyEvent and send a XK_Caps_Lock to
+      // the UGA/GOP Window
+      //
+    }
+  }
+    
+  drv->KeyState.KeyToggleState = *KeyToggleState;
+  return EFI_SUCCESS;
+}
+
+
+EFI_STATUS
+EFIAPI
+UgaRegisterKeyNotify (
+  IN EFI_UNIX_UGA_IO_PROTOCOL           *UgaIo, 
+  IN UGA_REGISTER_KEY_NOTIFY_CALLBACK   CallBack,
+  IN VOID                               *Context
+  )
+{
+  UGA_IO_PRIVATE  *drv = (UGA_IO_PRIVATE *)UgaIo;
+
+  drv->RegisterdKeyCallback = CallBack;
+  drv->RegisterdKeyCallbackContext = Context;
+
+  return EFI_SUCCESS;
+}
+
+
 EFI_STATUS
 UgaBlt(
   IN EFI_UNIX_UGA_IO_PROTOCOL                 *UgaIo,
@@ -545,6 +738,44 @@ UgaBlt(
   return EFI_SUCCESS;
 }
 
+STATIC EFI_STATUS
+CheckPointerInternal( UGA_IO_PRIVATE *drv, BOOLEAN delay )
+{
+  HandleEvents(drv);
+  if (drv->pointer_state_changed != 0)
+    return EFI_SUCCESS;
+  if ( delay )
+    /* EFI is polling.  Be CPU-friendly.  */
+    msSleep (20);
+  return EFI_NOT_READY;
+}
+
+EFI_STATUS
+UgaCheckPointer(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)
+{
+  UGA_IO_PRIVATE  *drv = (UGA_IO_PRIVATE *)UgaIo;
+  return( CheckPointerInternal( drv, TRUE ) );
+}
+
+EFI_STATUS
+UgaGetPointerState (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_SIMPLE_POINTER_STATE *state)
+{
+  UGA_IO_PRIVATE *drv = (UGA_IO_PRIVATE *)UgaIo;
+  EFI_STATUS status;
+
+  status = CheckPointerInternal( drv, FALSE );
+  if (status != EFI_SUCCESS)
+    return status;
+  
+  memcpy( state, &drv->pointer_state, sizeof( EFI_SIMPLE_POINTER_STATE ) );
+
+  drv->pointer_state.RelativeMovementX = 0;
+  drv->pointer_state.RelativeMovementY = 0;
+  drv->pointer_state.RelativeMovementZ = 0;
+  drv->pointer_state_changed = 0;
+  return EFI_SUCCESS;
+}
+
 EFI_STATUS
 UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title)
 {
@@ -557,32 +788,29 @@ UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title)
   if (drv == NULL)
     return EFI_OUT_OF_RESOURCES;
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(MDE_CPU_X64)
 //
 //
 //
-EFI_STATUS EFIAPI GasketUgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
-EFI_STATUS EFIAPI GasketUgaSize (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);
-EFI_STATUS EFIAPI GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
-EFI_STATUS EFIAPI GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);
-EFI_STATUS EFIAPI GasketUgaBlt (
-   EFI_UNIX_UGA_IO_PROTOCOL                    *UgaIo,
-   IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,
-   IN  EFI_UGA_BLT_OPERATION                   BltOperation,
-   IN  UGA_BLT_ARGS                            *Args
-   );
-
   drv->UgaIo.UgaClose    = GasketUgaClose; 
   drv->UgaIo.UgaSize     = GasketUgaSize;
   drv->UgaIo.UgaCheckKey = GasketUgaCheckKey;
   drv->UgaIo.UgaGetKey   = GasketUgaGetKey;
+  drv->UgaIo.UgaKeySetState         = GasketUgaKeySetState;
+  drv->UgaIo.UgaRegisterKeyNotify   = GasketUgaRegisterKeyNotify;
   drv->UgaIo.UgaBlt      = GasketUgaBlt;
+  drv->UgaIo.UgaCheckPointer        = GasketUgaCheckPointer;
+  drv->UgaIo.UgaGetPointerState     = GasketUgaGetPointerState;
 #else
   drv->UgaIo.UgaClose = UgaClose;
   drv->UgaIo.UgaSize = UgaSize;
   drv->UgaIo.UgaCheckKey = UgaCheckKey;
   drv->UgaIo.UgaGetKey = UgaGetKey;
+  drv->UgaIo.UgaKeySetState         = UgaKeySetState;
+  drv->UgaIo.UgaRegisterKeyNotify   = UgaRegisterKeyNotify;
   drv->UgaIo.UgaBlt = UgaBlt;
+  drv->UgaIo.UgaCheckPointer        = UgaCheckPointer;
+  drv->UgaIo.UgaGetPointerState     = UgaGetPointerState;
 #endif
   
   
@@ -590,6 +818,12 @@ EFI_STATUS EFIAPI GasketUgaBlt (
   drv->key_count = 0;
   drv->key_rd = 0;
   drv->key_wr = 0;
+  drv->KeyState.KeyShiftState  = EFI_SHIFT_STATE_VALID;
+  drv->KeyState.KeyToggleState = EFI_TOGGLE_STATE_VALID;
+  drv->RegisterdKeyCallback = NULL;
+  drv->RegisterdKeyCallbackContext = NULL;
+  
+  
   drv->display = XOpenDisplay (display_name);
   if (drv->display == NULL)
     {
@@ -607,6 +841,7 @@ EFI_STATUS EFIAPI GasketUgaBlt (
                 BlackPixel (drv->display, drv->screen));
 
   drv->depth = DefaultDepth (drv->display, drv->screen);
+  XDefineCursor (drv->display, drv->win, XCreateFontCursor (drv->display, XC_pirate)); 
 
   /* Compute title len and convert to Ascii.  */
   for (title_len = 0; Title[title_len] != 0; title_len++)
@@ -621,8 +856,8 @@ EFI_STATUS EFIAPI GasketUgaBlt (
     XStoreName (drv->display, drv->win, title);
   }
 
-  XSelectInput (drv->display, drv->win, ExposureMask | KeyPressMask);
-  
+  XSelectInput (drv->display, drv->win,
+                 ExposureMask | KeyPressMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask );
   drv->gc = DefaultGC (drv->display, drv->screen);
 
   *Uga = (EFI_UNIX_UGA_IO_PROTOCOL *)drv;
index 874f26fa89ee3af872361417dc52461f9772ab93..f65acab10062c09b096c32af622eeeb83a2fb2f6 100644 (file)
@@ -1,14 +1,14 @@
 /*++
 
 Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-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
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
+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        
+http://opensource.org/licenses/bsd-license.php                                            
+                                                                                          
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
 
 Module Name:
 
@@ -16,7 +16,7 @@ Module Name:
 
 Abstract:
 
-  Since the SEC is the only program in our emulation we
+  Since the SEC is the only program in our emulation we 
   must use a Tiano mechanism to export APIs to other modules.
   This is the role of the EFI_UNIX_THUNK_PROTOCOL.
 
@@ -25,7 +25,7 @@ Abstract:
   are not added. It looks like adding a element to end and not initializing
   it may cause the table to be initaliized with the members at the end being
   set to zero. This is bad as jumping to zero will crash.
-
+  
 
   gUnix is a a public exported global that contains the initialized
   data.
@@ -44,6 +44,9 @@ int settimer_initialized;
 struct timeval settimer_timeval;
 void (*settimer_callback)(UINT64 delta);
 
+BOOLEAN gEmulatorInterruptEnabled = FALSE;
+
+
 void
 settimer_handler (int sig)
 {
@@ -52,15 +55,15 @@ settimer_handler (int sig)
 
   gettimeofday (&timeval, NULL);
   delta = ((UINT64)timeval.tv_sec * 1000) + (timeval.tv_usec / 1000)
-    - ((UINT64)settimer_timeval.tv_sec * 1000)
+    - ((UINT64)settimer_timeval.tv_sec * 1000) 
     - (settimer_timeval.tv_usec / 1000);
   settimer_timeval = timeval;
-
+  
   if (settimer_callback) {
 #if defined(__APPLE__) || defined(MDE_CPU_X64)
    ReverseGasketUint64 (settimer_callback, delta);
 #else
-   (*settimer_callback)(delta);
+    (*settimer_callback)(delta);
 #endif
   }
 }
@@ -78,6 +81,7 @@ SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))
     act.sa_handler = settimer_handler;
     act.sa_flags = 0;
     sigemptyset (&act.sa_mask);
+    gEmulatorInterruptEnabled = TRUE;
     if (sigaction (SIGALRM, &act, NULL) != 0) {
       printf ("SetTimer: sigaction error %s\n", strerror (errno));
     }
@@ -90,13 +94,50 @@ SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))
   timerval.it_value.tv_usec = remainder * 1000;
   timerval.it_value.tv_sec = DivU64x32(PeriodMs, 1000);
   timerval.it_interval = timerval.it_value;
-
+  
   if (setitimer (ITIMER_REAL, &timerval, NULL) != 0) {
     printf ("SetTimer: setitimer error %s\n", strerror (errno));
   }
   settimer_callback = CallBack;
 }
 
+
+void
+UnixEnableInterrupt (void)
+{
+  sigset_t  sigset;
+
+  gEmulatorInterruptEnabled = TRUE;
+  // Since SetTimer() uses SIGALRM we emulate turning on and off interrupts 
+  // by enabling/disabling SIGALRM.
+  sigemptyset (&sigset);
+  sigaddset (&sigset, SIGALRM);
+  sigprocmask (SIG_UNBLOCK, &sigset, NULL);
+}
+
+
+void
+UnixDisableInterrupt (void)
+{
+  sigset_t  sigset;
+
+  // Since SetTimer() uses SIGALRM we emulate turning on and off interrupts 
+  // by enabling/disabling SIGALRM.
+  sigemptyset (&sigset);
+  sigaddset (&sigset, SIGALRM);
+  sigprocmask (SIG_BLOCK, &sigset, NULL);
+  gEmulatorInterruptEnabled = FALSE;
+}
+
+
+BOOLEAN
+UnixInterruptEanbled (void)
+{
+  return gEmulatorInterruptEnabled;
+}
+
+
+
 void
 msSleep (unsigned long Milliseconds)
 {
@@ -110,7 +151,7 @@ msSleep (unsigned long Milliseconds)
       break;
     }
     rq = rm;
-  }
+  } 
 
 }
 
@@ -174,7 +215,7 @@ EFI_UNIX_THUNK_PROTOCOL mUnixThunkTable = {
 #if defined(__APPLE__) || defined(MDE_CPU_X64)
 //
 // Mac OS X requires the stack to be 16-byte aligned for IA-32. So on an OS X build
-// we add an assembly wrapper that makes sure the stack ges aligned.
+// we add an assembly wrapper that makes sure the stack ges aligned. 
 // This has the nice benfit of being able to run EFI ABI code, like the EFI shell
 // that is checked in to source control in the OS X version of the emulator
 //
@@ -217,9 +258,16 @@ EFI_UNIX_THUNK_PROTOCOL mUnixThunkTable = {
   Gasketcfsetospeed,
   Gaskettcgetattr,
   Gaskettcsetattr,
-  GasketUnixPeCoffGetEntryPoint,
-  GasketUnixPeCoffRelocateImageExtraAction,
-  GasketUnixPeCoffUnloadImageExtraAction
+  GasketUnixPeCoffGetEntryPoint,                
+  GasketUnixPeCoffRelocateImageExtraAction,     
+  GasketUnixPeCoffUnloadImageExtraAction,  
+  
+  GasketUnixEnableInterrupt,
+  GasketUnixDisableInterrupt,
+
+  Gasketgetifaddrs,
+  Gasketfreeifaddrs,
+  Gasketsocket,
 
 #else
   msSleep, /* Sleep */
@@ -263,7 +311,12 @@ EFI_UNIX_THUNK_PROTOCOL mUnixThunkTable = {
   tcsetattr,
   SecPeCoffGetEntryPoint,
   SecPeCoffRelocateImageExtraAction,
-  SecPeCoffLoaderUnloadImageExtraAction
+  SecPeCoffLoaderUnloadImageExtraAction,
+  UnixEnableInterrupt,
+  UnixDisableInterrupt,
+  getifaddrs,
+  freeifaddrs,
+  socket
 #endif
 };
 
diff --git a/UnixPkg/Sec/X64/Gasket.S b/UnixPkg/Sec/X64/Gasket.S
deleted file mode 100644 (file)
index 4d6123f..0000000
+++ /dev/null
@@ -1,8870 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# This template was generated from GasketEfiTemplate.c Unix x86_64 ABI
-#
-# Efi Prefix means it has been ported to gasket EFIABI to Unix x86_64 ABI
-#
-# The EFI_UNIX_THUNK_PROTOCOL member functions call these these generic assembly 
-# routines.  
-#
-# Some OS X POSIX calls get name mangled in C code and we need to fill in a C global
-# to get the correct binding (does not work from assembly). So we have 4 functions
-# that do an indirect call, while the others call POSIX APIs directly
-#
-# movq _gUnixRmDir@GOTPCREL(%rip), %rax 
-#
-#
-# UNIX Arg passing: RCX, RDX,  R8,  R9
-# EFI  Arg passing: RDI, RDI, RDX, RCX, R8, R9
-#
-# RSI, RDI calle-save on EFI, scatch on UNIX callign
-#
-#
-# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-# 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
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#------------------------------------------------------------------------------
-#ifdef __APPLE__
-       .section __DWARF,__debug_frame,regular,debug
-Lsection__debug_frame:
-       .section __DWARF,__debug_info,regular,debug
-Lsection__debug_info:
-       .section __DWARF,__debug_abbrev,regular,debug
-Lsection__debug_abbrev:
-       .section __DWARF,__debug_aranges,regular,debug
-Lsection__debug_aranges:
-       .section __DWARF,__debug_macinfo,regular,debug
-Lsection__debug_macinfo:
-       .section __DWARF,__debug_line,regular,debug
-Lsection__debug_line:
-       .section __DWARF,__debug_loc,regular,debug
-Lsection__debug_loc:
-       .section __DWARF,__debug_pubnames,regular,debug
-Lsection__debug_pubnames:
-       .section __DWARF,__debug_pubtypes,regular,debug
-Lsection__debug_pubtypes:
-       .section __DWARF,__debug_inlined,regular,debug
-Lsection__debug_inlined:
-       .section __DWARF,__debug_str,regular,debug
-Lsection__debug_str:
-       .section __DWARF,__debug_ranges,regular,debug
-Lsection__debug_ranges:
-       .section __DWARF,__debug_abbrev,regular,debug
-Ldebug_abbrev0:
-       .section __DWARF,__debug_info,regular,debug
-Ldebug_info0:
-       .section __DWARF,__debug_line,regular,debug
-Ldebug_line0:
-#endif
-
-       .text
-Ltext0:
-.globl _Gasketrmdir
-_Gasketrmdir:
-LFB16:
-       .file 1 "/Users/fish/work/edk2/UnixPkg/Sec/X64/GasketEfiTemplate.c"
-       .loc 1 35 0
-       pushq   %rbp
-LCFI0:
-       movq    %rsp, %rbp
-LCFI1:
-       subq    $16, %rsp
-LCFI2:
-       movq    %rdi, -8(%rbp)
-       .loc 1 36 0
-       movq    _gUnixRmDir@GOTPCREL(%rip), %rax
-       movq    (%rax), %rax
-       movq    -8(%rbp), %rdi
-       call    *%rax
-       .loc 1 37 0
-       leave
-       ret
-       
-LFE16:
-.globl _Gasketopendir
-_Gasketopendir:
-LFB17:
-       .loc 1 42 0
-       pushq   %rbp
-LCFI3:
-       movq    %rsp, %rbp
-LCFI4:
-       subq    $16, %rsp
-LCFI5:
-       movq    %rdi, -8(%rbp)
-       .loc 1 43 0
-       movq    _gUnixOpenDir@GOTPCREL(%rip), %rax
-       movq    (%rax), %rax
-       movq    -8(%rbp), %rdi
-       call    *%rax
-       .loc 1 44 0
-       leave
-       ret
-LFE17:
-.globl _Gasketstat
-_Gasketstat:
-LFB18:
-       .loc 1 49 0
-       pushq   %rbp
-LCFI6:
-       movq    %rsp, %rbp
-LCFI7:
-       subq    $16, %rsp
-LCFI8:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 50 0
-       movq    _gUnixStat@GOTPCREL(%rip), %rax
-       movq    (%rax), %rax
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    *%rax
-       .loc 1 51 0
-       leave
-       ret
-LFE18:
-.globl _Gasketstatfs
-_Gasketstatfs:
-LFB19:
-       .loc 1 56 0
-       pushq   %rbp
-LCFI9:
-       movq    %rsp, %rbp
-LCFI10:
-       subq    $16, %rsp
-LCFI11:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 57 0
-       movq    _gUnixStatFs@GOTPCREL(%rip), %rax
-       movq    (%rax), %rax
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    *%rax
-       .loc 1 58 0
-       leave
-       ret
-LFE19:
-.globl _GasketmsSleep
-_GasketmsSleep:
-LFB20:
-       .loc 1 65 0
-       pushq   %rbp
-LCFI12:
-       movq    %rsp, %rbp
-LCFI13:
-       subq    $16, %rsp
-LCFI14:
-       movq    %rdi, -8(%rbp)
-       .loc 1 66 0
-       movq    -8(%rbp), %rdi
-       call    _msSleep
-       .loc 1 68 0
-       leave
-       ret
-LFE20:
-.globl _Gasketexit
-_Gasketexit:
-LFB21:
-       .loc 1 72 0
-       pushq   %rbp
-LCFI15:
-       movq    %rsp, %rbp
-LCFI16:
-       subq    $16, %rsp
-LCFI17:
-       movl    %edi, -4(%rbp)
-       .loc 1 73 0
-       movl    -4(%rbp), %edi
-       call    _exit
-LFE21:
-.globl _GasketSetTimer
-_GasketSetTimer:
-LFB22:
-       .loc 1 80 0
-       pushq   %rbp
-LCFI18:
-       movq    %rsp, %rbp
-LCFI19:
-       subq    $16, %rsp
-LCFI20:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 81 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _SetTimer
-       .loc 1 83 0
-       leave
-       ret
-LFE22:
-.globl _GasketGetLocalTime
-_GasketGetLocalTime:
-LFB23:
-       .loc 1 88 0
-       pushq   %rbp
-LCFI21:
-       movq    %rsp, %rbp
-LCFI22:
-       subq    $16, %rsp
-LCFI23:
-       movq    %rdi, -8(%rbp)
-       .loc 1 89 0
-       movq    -8(%rbp), %rdi
-       call    _GetLocalTime
-       .loc 1 91 0
-       leave
-       ret
-LFE23:
-.globl _Gasketgmtime
-_Gasketgmtime:
-LFB24:
-       .loc 1 96 0
-       pushq   %rbp
-LCFI24:
-       movq    %rsp, %rbp
-LCFI25:
-       subq    $16, %rsp
-LCFI26:
-       movq    %rdi, -8(%rbp)
-       .loc 1 97 0
-       movq    -8(%rbp), %rdi
-       call    _localtime
-       .loc 1 98 0
-       leave
-       ret
-LFE24:
-.globl _GasketGetTimeZone
-_GasketGetTimeZone:
-LFB25:
-       .loc 1 103 0
-       pushq   %rbp
-LCFI27:
-       movq    %rsp, %rbp
-LCFI28:
-       .loc 1 104 0
-       call    _GetTimeZone
-       .loc 1 105 0
-       leave
-       ret
-LFE25:
-.globl _GasketGetDayLight
-_GasketGetDayLight:
-LFB26:
-       .loc 1 110 0
-       pushq   %rbp
-LCFI29:
-       movq    %rsp, %rbp
-LCFI30:
-       .loc 1 111 0
-       call    _GetDayLight
-       .loc 1 112 0
-       leave
-       ret
-LFE26:
-.globl _Gasketpoll
-_Gasketpoll:
-LFB27:
-       .loc 1 117 0
-       pushq   %rbp
-LCFI31:
-       movq    %rsp, %rbp
-LCFI32:
-       subq    $16, %rsp
-LCFI33:
-       movq    %rdi, -8(%rbp)
-       movl    %esi, -12(%rbp)
-       movl    %edx, -16(%rbp)
-       .loc 1 118 0
-       movl    -16(%rbp), %edx
-       movl    -12(%rbp), %esi
-       movq    -8(%rbp), %rdi
-       call    _poll
-       .loc 1 119 0
-       leave
-       ret
-LFE27:
-.globl _Gasketread
-_Gasketread:
-LFB28:
-       .loc 1 124 0
-       pushq   %rbp
-LCFI34:
-       movq    %rsp, %rbp
-LCFI35:
-       subq    $32, %rsp
-LCFI36:
-       movl    %edi, -4(%rbp)
-       movq    %rsi, -16(%rbp)
-       movl    %edx, -20(%rbp)
-       .loc 1 125 0
-       movl    -20(%rbp), %eax
-       movslq  %eax,%rdx
-       movq    -16(%rbp), %rsi
-       movl    -4(%rbp), %edi
-       call    _read
-       .loc 1 126 0
-       leave
-       ret
-LFE28:
-.globl _Gasketwrite
-_Gasketwrite:
-LFB29:
-       .loc 1 131 0
-       pushq   %rbp
-LCFI37:
-       movq    %rsp, %rbp
-LCFI38:
-       subq    $32, %rsp
-LCFI39:
-       movl    %edi, -4(%rbp)
-       movq    %rsi, -16(%rbp)
-       movl    %edx, -20(%rbp)
-       .loc 1 132 0
-       movl    -20(%rbp), %eax
-       movslq  %eax,%rdx
-       movq    -16(%rbp), %rsi
-       movl    -4(%rbp), %edi
-       call    _write
-       .loc 1 133 0
-       leave
-       ret
-LFE29:
-.globl _Gasketgetenv
-_Gasketgetenv:
-LFB30:
-       .loc 1 138 0
-       pushq   %rbp
-LCFI40:
-       movq    %rsp, %rbp
-LCFI41:
-       subq    $16, %rsp
-LCFI42:
-       movq    %rdi, -8(%rbp)
-       .loc 1 139 0
-       movq    -8(%rbp), %rdi
-       call    _getenv
-       .loc 1 140 0
-       leave
-       ret
-LFE30:
-.globl _Gasketopen
-_Gasketopen:
-LFB31:
-       .loc 1 145 0
-       pushq   %rbp
-LCFI43:
-       movq    %rsp, %rbp
-LCFI44:
-       subq    $16, %rsp
-LCFI45:
-       movq    %rdi, -8(%rbp)
-       movl    %esi, -12(%rbp)
-       movl    %edx, -16(%rbp)
-       .loc 1 146 0
-       movl    -16(%rbp), %edx
-       movl    -12(%rbp), %esi
-       movq    -8(%rbp), %rdi
-       movl    $0, %eax
-       call    _open
-       .loc 1 147 0
-       leave
-       ret
-LFE31:
-.globl _Gasketlseek
-_Gasketlseek:
-LFB32:
-       .loc 1 152 0
-       pushq   %rbp
-LCFI46:
-       movq    %rsp, %rbp
-LCFI47:
-       subq    $32, %rsp
-LCFI48:
-       movl    %edi, -4(%rbp)
-       movq    %rsi, -16(%rbp)
-       movl    %edx, -20(%rbp)
-       .loc 1 153 0
-       movl    -20(%rbp), %edx
-       movq    -16(%rbp), %rsi
-       movl    -4(%rbp), %edi
-       call    _lseek
-       .loc 1 154 0
-       leave
-       ret
-LFE32:
-.globl _Gasketftruncate
-_Gasketftruncate:
-LFB33:
-       .loc 1 159 0
-       pushq   %rbp
-LCFI49:
-       movq    %rsp, %rbp
-LCFI50:
-       subq    $16, %rsp
-LCFI51:
-       movl    %edi, -4(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 160 0
-       movq    -16(%rbp), %rsi
-       movl    -4(%rbp), %edi
-       call    _ftruncate
-       .loc 1 161 0
-       leave
-       ret
-LFE33:
-.globl _Gasketclose
-_Gasketclose:
-LFB34:
-       .loc 1 166 0
-       pushq   %rbp
-LCFI52:
-       movq    %rsp, %rbp
-LCFI53:
-       subq    $16, %rsp
-LCFI54:
-       movl    %edi, -4(%rbp)
-       .loc 1 167 0
-       movl    -4(%rbp), %edi
-       call    _close
-       .loc 1 168 0
-       leave
-       ret
-LFE34:
-.globl _Gasketmkdir
-_Gasketmkdir:
-LFB35:
-       .loc 1 173 0
-       pushq   %rbp
-LCFI55:
-       movq    %rsp, %rbp
-LCFI56:
-       subq    $16, %rsp
-LCFI57:
-       movq    %rdi, -8(%rbp)
-       movw    %si, -12(%rbp)
-       .loc 1 174 0
-       movzwl  -12(%rbp), %esi
-       movq    -8(%rbp), %rdi
-       call    _mkdir
-       .loc 1 175 0
-       leave
-       ret
-LFE35:
-.globl _Gasketunlink
-_Gasketunlink:
-LFB36:
-       .loc 1 180 0
-       pushq   %rbp
-LCFI58:
-       movq    %rsp, %rbp
-LCFI59:
-       subq    $16, %rsp
-LCFI60:
-       movq    %rdi, -8(%rbp)
-       .loc 1 181 0
-       movq    -8(%rbp), %rdi
-       call    _unlink
-       .loc 1 182 0
-       leave
-       ret
-LFE36:
-.globl _GasketGetErrno
-_GasketGetErrno:
-LFB37:
-       .loc 1 187 0
-       pushq   %rbp
-LCFI61:
-       movq    %rsp, %rbp
-LCFI62:
-       .loc 1 188 0
-       call    _GetErrno
-       .loc 1 189 0
-       leave
-       ret
-LFE37:
-.globl _Gasketrewinddir
-_Gasketrewinddir:
-LFB38:
-       .loc 1 194 0
-       pushq   %rbp
-LCFI63:
-       movq    %rsp, %rbp
-LCFI64:
-       subq    $16, %rsp
-LCFI65:
-       movq    %rdi, -8(%rbp)
-       .loc 1 195 0
-       movq    -8(%rbp), %rdi
-       call    _rewinddir$INODE64
-       .loc 1 197 0
-       leave
-       ret
-LFE38:
-.globl _Gasketreaddir
-_Gasketreaddir:
-LFB39:
-       .loc 1 202 0
-       pushq   %rbp
-LCFI66:
-       movq    %rsp, %rbp
-LCFI67:
-       subq    $16, %rsp
-LCFI68:
-       movq    %rdi, -8(%rbp)
-       .loc 1 203 0
-       movq    -8(%rbp), %rdi
-       call    _readdir$INODE64
-       .loc 1 204 0
-       leave
-       ret
-LFE39:
-.globl _Gasketclosedir
-_Gasketclosedir:
-LFB40:
-       .loc 1 209 0
-       pushq   %rbp
-LCFI69:
-       movq    %rsp, %rbp
-LCFI70:
-       subq    $16, %rsp
-LCFI71:
-       movq    %rdi, -8(%rbp)
-       .loc 1 210 0
-       movq    -8(%rbp), %rdi
-       call    _closedir
-       .loc 1 211 0
-       leave
-       ret
-LFE40:
-.globl _Gasketrename
-_Gasketrename:
-LFB41:
-       .loc 1 216 0
-       pushq   %rbp
-LCFI72:
-       movq    %rsp, %rbp
-LCFI73:
-       subq    $16, %rsp
-LCFI74:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 217 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _rename
-       .loc 1 218 0
-       leave
-       ret
-LFE41:
-.globl _Gasketmktime
-_Gasketmktime:
-LFB42:
-       .loc 1 223 0
-       pushq   %rbp
-LCFI75:
-       movq    %rsp, %rbp
-LCFI76:
-       subq    $16, %rsp
-LCFI77:
-       movq    %rdi, -8(%rbp)
-       .loc 1 224 0
-       movq    -8(%rbp), %rdi
-       call    _mktime
-       .loc 1 225 0
-       leave
-       ret
-LFE42:
-.globl _Gasketfsync
-_Gasketfsync:
-LFB43:
-       .loc 1 230 0
-       pushq   %rbp
-LCFI78:
-       movq    %rsp, %rbp
-LCFI79:
-       subq    $16, %rsp
-LCFI80:
-       movl    %edi, -4(%rbp)
-       .loc 1 231 0
-       movl    -4(%rbp), %edi
-       call    _fsync
-       .loc 1 232 0
-       leave
-       ret
-LFE43:
-.globl _Gasketchmod
-_Gasketchmod:
-LFB44:
-       .loc 1 237 0
-       pushq   %rbp
-LCFI81:
-       movq    %rsp, %rbp
-LCFI82:
-       subq    $16, %rsp
-LCFI83:
-       movq    %rdi, -8(%rbp)
-       movw    %si, -12(%rbp)
-       .loc 1 238 0
-       movzwl  -12(%rbp), %esi
-       movq    -8(%rbp), %rdi
-       call    _chmod
-       .loc 1 239 0
-       leave
-       ret
-LFE44:
-.globl _Gasketutime
-_Gasketutime:
-LFB45:
-       .loc 1 244 0
-       pushq   %rbp
-LCFI84:
-       movq    %rsp, %rbp
-LCFI85:
-       subq    $16, %rsp
-LCFI86:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 245 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _utime
-       .loc 1 246 0
-       leave
-       ret
-LFE45:
-.globl _Gaskettcflush
-_Gaskettcflush:
-LFB46:
-       .loc 1 251 0
-       pushq   %rbp
-LCFI87:
-       movq    %rsp, %rbp
-LCFI88:
-       subq    $16, %rsp
-LCFI89:
-       movl    %edi, -4(%rbp)
-       movl    %esi, -8(%rbp)
-       .loc 1 252 0
-       movl    -8(%rbp), %esi
-       movl    -4(%rbp), %edi
-       call    _tcflush
-       .loc 1 253 0
-       leave
-       ret
-LFE46:
-.globl _GasketUgaCreate
-_GasketUgaCreate:
-LFB47:
-       .loc 1 258 0
-       pushq   %rbp
-LCFI90:
-       movq    %rsp, %rbp
-LCFI91:
-       subq    $16, %rsp
-LCFI92:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 259 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _UgaCreate
-       .loc 1 260 0
-       leave
-       ret
-LFE47:
-.globl _Gasketperror
-_Gasketperror:
-LFB48:
-       .loc 1 265 0
-       pushq   %rbp
-LCFI93:
-       movq    %rsp, %rbp
-LCFI94:
-       subq    $16, %rsp
-LCFI95:
-       movq    %rdi, -8(%rbp)
-       .loc 1 266 0
-       movq    -8(%rbp), %rdi
-       call    _perror
-       .loc 1 268 0
-       leave
-       ret
-LFE48:
-.globl _Gasketioctl
-_Gasketioctl:
-LFB49:
-       .loc 1 277 0
-       pushq   %rbp
-LCFI96:
-       movq    %rsp, %rbp
-LCFI97:
-       subq    $240, %rsp
-LCFI98:
-       movl    %edi, -212(%rbp)
-       movq    %rdx, -160(%rbp)
-       movq    %rcx, -152(%rbp)
-       movq    %r8, -144(%rbp)
-       movq    %r9, -136(%rbp)
-       movzbl  %al, %eax
-       movq    %rax, -240(%rbp)
-       movq    -240(%rbp), %rdx
-       leaq    0(,%rdx,4), %rax
-       leaq    L68(%rip), %rdx
-       movq    %rdx, -240(%rbp)
-       subq    %rax, -240(%rbp)
-       leaq    -1(%rbp), %rax
-       movq    -240(%rbp), %rdx
-       jmp     *%rdx
-       movaps  %xmm7, -15(%rax)
-       movaps  %xmm6, -31(%rax)
-       movaps  %xmm5, -47(%rax)
-       movaps  %xmm4, -63(%rax)
-       movaps  %xmm3, -79(%rax)
-       movaps  %xmm2, -95(%rax)
-       movaps  %xmm1, -111(%rax)
-       movaps  %xmm0, -127(%rax)
-L68:
-       movq    %rsi, -224(%rbp)
-       .loc 1 280 0
-       leaq    -208(%rbp), %rax
-       movl    $16, (%rax)
-       leaq    -208(%rbp), %rax
-       movl    $48, 4(%rax)
-       leaq    -208(%rbp), %rax
-       leaq    16(%rbp), %rdx
-       movq    %rdx, 8(%rax)
-       leaq    -208(%rbp), %rax
-       leaq    -176(%rbp), %rdx
-       movq    %rdx, 16(%rax)
-       .loc 1 281 0
-       movl    -208(%rbp), %eax
-       cmpl    $48, %eax
-       jae     L69
-       movq    -192(%rbp), %rdx
-       movl    -208(%rbp), %eax
-       mov     %eax, %eax
-       addq    %rax, %rdx
-       movq    %rdx, -232(%rbp)
-       movl    -208(%rbp), %eax
-       addl    $8, %eax
-       movl    %eax, -208(%rbp)
-       jmp     L71
-L69:
-       movq    -200(%rbp), %rax
-       movq    %rax, -232(%rbp)
-       addq    $8, %rax
-       movq    %rax, -200(%rbp)
-L71:
-       movq    -232(%rbp), %rax
-       movq    (%rax), %rdx
-       movq    -224(%rbp), %rsi
-       movl    -212(%rbp), %edi
-       movl    $0, %eax
-       call    _ioctl
-       .loc 1 282 0
-       leave
-       ret
-LFE49:
-.globl _Gasketfcntl
-_Gasketfcntl:
-LFB50:
-       .loc 1 287 0
-       pushq   %rbp
-LCFI99:
-       movq    %rsp, %rbp
-LCFI100:
-       subq    $240, %rsp
-LCFI101:
-       movl    %edi, -212(%rbp)
-       movq    %rdx, -160(%rbp)
-       movq    %rcx, -152(%rbp)
-       movq    %r8, -144(%rbp)
-       movq    %r9, -136(%rbp)
-       movzbl  %al, %eax
-       movq    %rax, -232(%rbp)
-       movq    -232(%rbp), %rdx
-       leaq    0(,%rdx,4), %rax
-       leaq    L74(%rip), %rdx
-       movq    %rdx, -232(%rbp)
-       subq    %rax, -232(%rbp)
-       leaq    -1(%rbp), %rax
-       movq    -232(%rbp), %rdx
-       jmp     *%rdx
-       movaps  %xmm7, -15(%rax)
-       movaps  %xmm6, -31(%rax)
-       movaps  %xmm5, -47(%rax)
-       movaps  %xmm4, -63(%rax)
-       movaps  %xmm3, -79(%rax)
-       movaps  %xmm2, -95(%rax)
-       movaps  %xmm1, -111(%rax)
-       movaps  %xmm0, -127(%rax)
-L74:
-       movl    %esi, -216(%rbp)
-       .loc 1 290 0
-       leaq    -208(%rbp), %rax
-       movl    $16, (%rax)
-       leaq    -208(%rbp), %rax
-       movl    $48, 4(%rax)
-       leaq    -208(%rbp), %rax
-       leaq    16(%rbp), %rdx
-       movq    %rdx, 8(%rax)
-       leaq    -208(%rbp), %rax
-       leaq    -176(%rbp), %rdx
-       movq    %rdx, 16(%rax)
-       .loc 1 291 0
-       movl    -208(%rbp), %eax
-       cmpl    $48, %eax
-       jae     L75
-       movq    -192(%rbp), %rdx
-       movl    -208(%rbp), %eax
-       mov     %eax, %eax
-       addq    %rax, %rdx
-       movq    %rdx, -224(%rbp)
-       movl    -208(%rbp), %eax
-       addl    $8, %eax
-       movl    %eax, -208(%rbp)
-       jmp     L77
-L75:
-       movq    -200(%rbp), %rax
-       movq    %rax, -224(%rbp)
-       addq    $8, %rax
-       movq    %rax, -200(%rbp)
-L77:
-       movq    -224(%rbp), %rax
-       movq    (%rax), %rdx
-       movl    -216(%rbp), %esi
-       movl    -212(%rbp), %edi
-       movl    $0, %eax
-       call    _fcntl
-       .loc 1 292 0
-       leave
-       ret
-LFE50:
-.globl _Gasketcfsetispeed
-_Gasketcfsetispeed:
-LFB51:
-       .loc 1 298 0
-       pushq   %rbp
-LCFI102:
-       movq    %rsp, %rbp
-LCFI103:
-       subq    $16, %rsp
-LCFI104:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 299 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _cfsetispeed
-       .loc 1 300 0
-       leave
-       ret
-LFE51:
-.globl _Gasketcfsetospeed
-_Gasketcfsetospeed:
-LFB52:
-       .loc 1 305 0
-       pushq   %rbp
-LCFI105:
-       movq    %rsp, %rbp
-LCFI106:
-       subq    $16, %rsp
-LCFI107:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 306 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _cfsetospeed
-       .loc 1 307 0
-       leave
-       ret
-LFE52:
-.globl _Gaskettcgetattr
-_Gaskettcgetattr:
-LFB53:
-       .loc 1 312 0
-       pushq   %rbp
-LCFI108:
-       movq    %rsp, %rbp
-LCFI109:
-       subq    $16, %rsp
-LCFI110:
-       movl    %edi, -4(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 313 0
-       movq    -16(%rbp), %rsi
-       movl    -4(%rbp), %edi
-       call    _tcgetattr
-       .loc 1 314 0
-       leave
-       ret
-LFE53:
-.globl _Gaskettcsetattr
-_Gaskettcsetattr:
-LFB54:
-       .loc 1 319 0
-       pushq   %rbp
-LCFI111:
-       movq    %rsp, %rbp
-LCFI112:
-       subq    $16, %rsp
-LCFI113:
-       movl    %edi, -4(%rbp)
-       movl    %esi, -8(%rbp)
-       movq    %rdx, -16(%rbp)
-       .loc 1 320 0
-       movq    -16(%rbp), %rdx
-       movl    -8(%rbp), %esi
-       movl    -4(%rbp), %edi
-       call    _tcsetattr
-       .loc 1 321 0
-       leave
-       ret
-LFE54:
-.globl _GasketUnixPeCoffGetEntryPoint
-_GasketUnixPeCoffGetEntryPoint:
-LFB55:
-       .loc 1 331 0
-       pushq   %rbp
-LCFI114:
-       movq    %rsp, %rbp
-LCFI115:
-       subq    $16, %rsp
-LCFI116:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 332 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _SecPeCoffGetEntryPoint
-       .loc 1 333 0
-       leave
-       ret
-LFE55:
-.globl _GasketUnixPeCoffRelocateImageExtraAction
-_GasketUnixPeCoffRelocateImageExtraAction:
-LFB56:
-       .loc 1 341 0
-       pushq   %rbp
-LCFI117:
-       movq    %rsp, %rbp
-LCFI118:
-       subq    $16, %rsp
-LCFI119:
-       movq    %rdi, -8(%rbp)
-       .loc 1 342 0
-       movq    -8(%rbp), %rdi
-       call    _SecPeCoffRelocateImageExtraAction
-       .loc 1 344 0
-       leave
-       ret
-LFE56:
-.globl _GasketUnixPeCoffUnloadImageExtraAction
-_GasketUnixPeCoffUnloadImageExtraAction:
-LFB57:
-       .loc 1 352 0
-       pushq   %rbp
-LCFI120:
-       movq    %rsp, %rbp
-LCFI121:
-       subq    $16, %rsp
-LCFI122:
-       movq    %rdi, -8(%rbp)
-       .loc 1 353 0
-       movq    -8(%rbp), %rdi
-       call    _SecPeCoffLoaderUnloadImageExtraAction
-       .loc 1 355 0
-       leave
-       ret
-LFE57:
-.globl _GasketUgaClose
-_GasketUgaClose:
-LFB58:
-       .loc 1 365 0
-       pushq   %rbp
-LCFI123:
-       movq    %rsp, %rbp
-LCFI124:
-       subq    $16, %rsp
-LCFI125:
-       movq    %rdi, -8(%rbp)
-       .loc 1 366 0
-       movq    -8(%rbp), %rdi
-       call    _UgaClose
-       .loc 1 367 0
-       leave
-       ret
-LFE58:
-.globl _GasketUgaSize
-_GasketUgaSize:
-LFB59:
-       .loc 1 372 0
-       pushq   %rbp
-LCFI126:
-       movq    %rsp, %rbp
-LCFI127:
-       subq    $16, %rsp
-LCFI128:
-       movq    %rdi, -8(%rbp)
-       movl    %esi, -12(%rbp)
-       movl    %edx, -16(%rbp)
-       .loc 1 373 0
-       movl    -16(%rbp), %edx
-       movl    -12(%rbp), %esi
-       movq    -8(%rbp), %rdi
-       call    _UgaSize
-       .loc 1 374 0
-       leave
-       ret
-LFE59:
-.globl _GasketUgaCheckKey
-_GasketUgaCheckKey:
-LFB60:
-       .loc 1 379 0
-       pushq   %rbp
-LCFI129:
-       movq    %rsp, %rbp
-LCFI130:
-       subq    $16, %rsp
-LCFI131:
-       movq    %rdi, -8(%rbp)
-       .loc 1 380 0
-       movq    -8(%rbp), %rdi
-       call    _UgaCheckKey
-       .loc 1 381 0
-       leave
-       ret
-LFE60:
-.globl _GasketUgaGetKey
-_GasketUgaGetKey:
-LFB61:
-       .loc 1 386 0
-       pushq   %rbp
-LCFI132:
-       movq    %rsp, %rbp
-LCFI133:
-       subq    $16, %rsp
-LCFI134:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       .loc 1 387 0
-       movq    -16(%rbp), %rsi
-       movq    -8(%rbp), %rdi
-       call    _UgaGetKey
-       .loc 1 388 0
-       leave
-       ret
-LFE61:
-.globl _GasketUgaBlt
-_GasketUgaBlt:
-LFB62:
-       .loc 1 404 0
-       pushq   %rbp
-LCFI135:
-       movq    %rsp, %rbp
-LCFI136:
-       subq    $80, %rsp
-LCFI137:
-       movq    %rdi, -8(%rbp)
-       movq    %rsi, -16(%rbp)
-       movl    %edx, -20(%rbp)
-       movq    %rcx, -32(%rbp)
-       movq    %r8, -40(%rbp)
-       movq    %r9, -48(%rbp)
-       .loc 1 405 0
-       movq    -48(%rbp), %rdx
-       movq    -40(%rbp), %rcx
-       movq    -32(%rbp), %rsi
-       movl    -20(%rbp), %edi
-       movq    -16(%rbp), %r10
-       movq    -8(%rbp), %r11
-       movq    40(%rbp), %rax
-       movq    %rax, 24(%rsp)
-       movq    32(%rbp), %rax
-       movq    %rax, 16(%rsp)
-       movq    24(%rbp), %rax
-       movq    %rax, 8(%rsp)
-       movq    16(%rbp), %rax
-       movq    %rax, (%rsp)
-       movq    %rdx, %r9
-       movq    %rcx, %r8
-       movq    %rsi, %rcx
-       movl    %edi, %edx
-       movq    %r10, %rsi
-       movq    %r11, %rdi
-       call    _UgaBlt
-       .loc 1 406 0
-       leave
-       ret
-LFE62:
-
-.globl _ReverseGasketUint64
-_ReverseGasketUint64:
-LFB63:
-       .loc 1 413 0
-       pushq   %rbp
-LCFI138:
-       movq    %rsp, %rbp
-LCFI139:
-       subq    $32, %rsp
-LCFI140:
-       movq    %rdi, -24(%rbp)
-       movq    %rsi, -32(%rbp)
-       .loc 1 414 0
-       movq    -24(%rbp), %rax
-       movq    %rax, -8(%rbp)
-       .loc 1 416 0
-       movq    -32(%rbp), %rdi
-       movq    -8(%rbp), %rax
-       call    *%rax
-       .loc 1 417 0
-       movl    $0, %eax
-       .loc 1 418 0
-       leave
-       ret
-       
-.globl _EfiReverseGasketUint64
-_EfiReverseGasketUint64:
-       pushq   %rbp
-       movq    %rsp, %rbp
-       subq    $64, %rsp
-       movq    %rdi, -24(%rbp)
-       movq    %rsi, -32(%rbp)
-       movq    -24(%rbp), %rax
-       movq    %rax, -8(%rbp)
-       movq    -32(%rbp), %rcx
-       movq    -8(%rbp), %rax
-       call    *%rax
-       leave
-       ret
-       
-// Sec PPI Callbacks
-
-.globl _GasketSecUnixPeiLoadFile
-_GasketSecUnixPeiLoadFile:
-       jmp       _SecUnixPeiLoadFile
-
-
-.globl _GasketSecUnixPeiAutoScan
-_GasketSecUnixPeiAutoScan:
-       jmp       _SecUnixPeiAutoScan
-
-
-.globl _GasketSecUnixUnixThunkAddress
-_GasketSecUnixUnixThunkAddress:
-       jmp       _SecUnixUnixThunkAddress
-
-
-.globl _GasketSecPeiReportStatusCode
-_GasketSecPeiReportStatusCode:
-       jmp       _SecPeiReportStatusCode
-
-
-.globl _GasketSecUnixFdAddress
-_GasketSecUnixFdAddress:
-       jmp       _SecUnixFdAddress
-
-
-.globl _GasketSecTemporaryRamSupport
-_GasketSecTemporaryRamSupport:
-       jmp       _SecTemporaryRamSupport
-
-       
-       
-#if __APPLE__
-
-LFE63:
-       .section __DWARF,__debug_frame,regular,debug
-Lframe0:
-       .set L$set$0,LECIE0-LSCIE0
-       .long L$set$0
-LSCIE0:
-       .long   0xffffffff
-       .byte   0x1
-       .ascii "\0"
-       .byte   0x1
-       .byte   0x78
-       .byte   0x10
-       .byte   0xc
-       .byte   0x7
-       .byte   0x8
-       .byte   0x90
-       .byte   0x1
-       .align 3
-LECIE0:
-LSFDE0:
-       .set L$set$1,LEFDE0-LASFDE0
-       .long L$set$1
-LASFDE0:
-       .set L$set$2,Lframe0-Lsection__debug_frame
-       .long L$set$2
-       .quad   LFB16
-       .set L$set$3,LFE16-LFB16
-       .quad L$set$3
-       .byte   0x4
-       .set L$set$4,LCFI0-LFB16
-       .long L$set$4
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$5,LCFI1-LCFI0
-       .long L$set$5
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE0:
-LSFDE2:
-       .set L$set$6,LEFDE2-LASFDE2
-       .long L$set$6
-LASFDE2:
-       .set L$set$7,Lframe0-Lsection__debug_frame
-       .long L$set$7
-       .quad   LFB17
-       .set L$set$8,LFE17-LFB17
-       .quad L$set$8
-       .byte   0x4
-       .set L$set$9,LCFI3-LFB17
-       .long L$set$9
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$10,LCFI4-LCFI3
-       .long L$set$10
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE2:
-LSFDE4:
-       .set L$set$11,LEFDE4-LASFDE4
-       .long L$set$11
-LASFDE4:
-       .set L$set$12,Lframe0-Lsection__debug_frame
-       .long L$set$12
-       .quad   LFB18
-       .set L$set$13,LFE18-LFB18
-       .quad L$set$13
-       .byte   0x4
-       .set L$set$14,LCFI6-LFB18
-       .long L$set$14
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$15,LCFI7-LCFI6
-       .long L$set$15
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE4:
-LSFDE6:
-       .set L$set$16,LEFDE6-LASFDE6
-       .long L$set$16
-LASFDE6:
-       .set L$set$17,Lframe0-Lsection__debug_frame
-       .long L$set$17
-       .quad   LFB19
-       .set L$set$18,LFE19-LFB19
-       .quad L$set$18
-       .byte   0x4
-       .set L$set$19,LCFI9-LFB19
-       .long L$set$19
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$20,LCFI10-LCFI9
-       .long L$set$20
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE6:
-LSFDE8:
-       .set L$set$21,LEFDE8-LASFDE8
-       .long L$set$21
-LASFDE8:
-       .set L$set$22,Lframe0-Lsection__debug_frame
-       .long L$set$22
-       .quad   LFB20
-       .set L$set$23,LFE20-LFB20
-       .quad L$set$23
-       .byte   0x4
-       .set L$set$24,LCFI12-LFB20
-       .long L$set$24
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$25,LCFI13-LCFI12
-       .long L$set$25
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE8:
-LSFDE10:
-       .set L$set$26,LEFDE10-LASFDE10
-       .long L$set$26
-LASFDE10:
-       .set L$set$27,Lframe0-Lsection__debug_frame
-       .long L$set$27
-       .quad   LFB21
-       .set L$set$28,LFE21-LFB21
-       .quad L$set$28
-       .byte   0x4
-       .set L$set$29,LCFI15-LFB21
-       .long L$set$29
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$30,LCFI16-LCFI15
-       .long L$set$30
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE10:
-LSFDE12:
-       .set L$set$31,LEFDE12-LASFDE12
-       .long L$set$31
-LASFDE12:
-       .set L$set$32,Lframe0-Lsection__debug_frame
-       .long L$set$32
-       .quad   LFB22
-       .set L$set$33,LFE22-LFB22
-       .quad L$set$33
-       .byte   0x4
-       .set L$set$34,LCFI18-LFB22
-       .long L$set$34
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$35,LCFI19-LCFI18
-       .long L$set$35
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE12:
-LSFDE14:
-       .set L$set$36,LEFDE14-LASFDE14
-       .long L$set$36
-LASFDE14:
-       .set L$set$37,Lframe0-Lsection__debug_frame
-       .long L$set$37
-       .quad   LFB23
-       .set L$set$38,LFE23-LFB23
-       .quad L$set$38
-       .byte   0x4
-       .set L$set$39,LCFI21-LFB23
-       .long L$set$39
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$40,LCFI22-LCFI21
-       .long L$set$40
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE14:
-LSFDE16:
-       .set L$set$41,LEFDE16-LASFDE16
-       .long L$set$41
-LASFDE16:
-       .set L$set$42,Lframe0-Lsection__debug_frame
-       .long L$set$42
-       .quad   LFB24
-       .set L$set$43,LFE24-LFB24
-       .quad L$set$43
-       .byte   0x4
-       .set L$set$44,LCFI24-LFB24
-       .long L$set$44
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$45,LCFI25-LCFI24
-       .long L$set$45
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE16:
-LSFDE18:
-       .set L$set$46,LEFDE18-LASFDE18
-       .long L$set$46
-LASFDE18:
-       .set L$set$47,Lframe0-Lsection__debug_frame
-       .long L$set$47
-       .quad   LFB25
-       .set L$set$48,LFE25-LFB25
-       .quad L$set$48
-       .byte   0x4
-       .set L$set$49,LCFI27-LFB25
-       .long L$set$49
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$50,LCFI28-LCFI27
-       .long L$set$50
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE18:
-LSFDE20:
-       .set L$set$51,LEFDE20-LASFDE20
-       .long L$set$51
-LASFDE20:
-       .set L$set$52,Lframe0-Lsection__debug_frame
-       .long L$set$52
-       .quad   LFB26
-       .set L$set$53,LFE26-LFB26
-       .quad L$set$53
-       .byte   0x4
-       .set L$set$54,LCFI29-LFB26
-       .long L$set$54
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$55,LCFI30-LCFI29
-       .long L$set$55
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE20:
-LSFDE22:
-       .set L$set$56,LEFDE22-LASFDE22
-       .long L$set$56
-LASFDE22:
-       .set L$set$57,Lframe0-Lsection__debug_frame
-       .long L$set$57
-       .quad   LFB27
-       .set L$set$58,LFE27-LFB27
-       .quad L$set$58
-       .byte   0x4
-       .set L$set$59,LCFI31-LFB27
-       .long L$set$59
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$60,LCFI32-LCFI31
-       .long L$set$60
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE22:
-LSFDE24:
-       .set L$set$61,LEFDE24-LASFDE24
-       .long L$set$61
-LASFDE24:
-       .set L$set$62,Lframe0-Lsection__debug_frame
-       .long L$set$62
-       .quad   LFB28
-       .set L$set$63,LFE28-LFB28
-       .quad L$set$63
-       .byte   0x4
-       .set L$set$64,LCFI34-LFB28
-       .long L$set$64
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$65,LCFI35-LCFI34
-       .long L$set$65
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE24:
-LSFDE26:
-       .set L$set$66,LEFDE26-LASFDE26
-       .long L$set$66
-LASFDE26:
-       .set L$set$67,Lframe0-Lsection__debug_frame
-       .long L$set$67
-       .quad   LFB29
-       .set L$set$68,LFE29-LFB29
-       .quad L$set$68
-       .byte   0x4
-       .set L$set$69,LCFI37-LFB29
-       .long L$set$69
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$70,LCFI38-LCFI37
-       .long L$set$70
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE26:
-LSFDE28:
-       .set L$set$71,LEFDE28-LASFDE28
-       .long L$set$71
-LASFDE28:
-       .set L$set$72,Lframe0-Lsection__debug_frame
-       .long L$set$72
-       .quad   LFB30
-       .set L$set$73,LFE30-LFB30
-       .quad L$set$73
-       .byte   0x4
-       .set L$set$74,LCFI40-LFB30
-       .long L$set$74
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$75,LCFI41-LCFI40
-       .long L$set$75
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE28:
-LSFDE30:
-       .set L$set$76,LEFDE30-LASFDE30
-       .long L$set$76
-LASFDE30:
-       .set L$set$77,Lframe0-Lsection__debug_frame
-       .long L$set$77
-       .quad   LFB31
-       .set L$set$78,LFE31-LFB31
-       .quad L$set$78
-       .byte   0x4
-       .set L$set$79,LCFI43-LFB31
-       .long L$set$79
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$80,LCFI44-LCFI43
-       .long L$set$80
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE30:
-LSFDE32:
-       .set L$set$81,LEFDE32-LASFDE32
-       .long L$set$81
-LASFDE32:
-       .set L$set$82,Lframe0-Lsection__debug_frame
-       .long L$set$82
-       .quad   LFB32
-       .set L$set$83,LFE32-LFB32
-       .quad L$set$83
-       .byte   0x4
-       .set L$set$84,LCFI46-LFB32
-       .long L$set$84
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$85,LCFI47-LCFI46
-       .long L$set$85
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE32:
-LSFDE34:
-       .set L$set$86,LEFDE34-LASFDE34
-       .long L$set$86
-LASFDE34:
-       .set L$set$87,Lframe0-Lsection__debug_frame
-       .long L$set$87
-       .quad   LFB33
-       .set L$set$88,LFE33-LFB33
-       .quad L$set$88
-       .byte   0x4
-       .set L$set$89,LCFI49-LFB33
-       .long L$set$89
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$90,LCFI50-LCFI49
-       .long L$set$90
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE34:
-LSFDE36:
-       .set L$set$91,LEFDE36-LASFDE36
-       .long L$set$91
-LASFDE36:
-       .set L$set$92,Lframe0-Lsection__debug_frame
-       .long L$set$92
-       .quad   LFB34
-       .set L$set$93,LFE34-LFB34
-       .quad L$set$93
-       .byte   0x4
-       .set L$set$94,LCFI52-LFB34
-       .long L$set$94
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$95,LCFI53-LCFI52
-       .long L$set$95
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE36:
-LSFDE38:
-       .set L$set$96,LEFDE38-LASFDE38
-       .long L$set$96
-LASFDE38:
-       .set L$set$97,Lframe0-Lsection__debug_frame
-       .long L$set$97
-       .quad   LFB35
-       .set L$set$98,LFE35-LFB35
-       .quad L$set$98
-       .byte   0x4
-       .set L$set$99,LCFI55-LFB35
-       .long L$set$99
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$100,LCFI56-LCFI55
-       .long L$set$100
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE38:
-LSFDE40:
-       .set L$set$101,LEFDE40-LASFDE40
-       .long L$set$101
-LASFDE40:
-       .set L$set$102,Lframe0-Lsection__debug_frame
-       .long L$set$102
-       .quad   LFB36
-       .set L$set$103,LFE36-LFB36
-       .quad L$set$103
-       .byte   0x4
-       .set L$set$104,LCFI58-LFB36
-       .long L$set$104
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$105,LCFI59-LCFI58
-       .long L$set$105
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE40:
-LSFDE42:
-       .set L$set$106,LEFDE42-LASFDE42
-       .long L$set$106
-LASFDE42:
-       .set L$set$107,Lframe0-Lsection__debug_frame
-       .long L$set$107
-       .quad   LFB37
-       .set L$set$108,LFE37-LFB37
-       .quad L$set$108
-       .byte   0x4
-       .set L$set$109,LCFI61-LFB37
-       .long L$set$109
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$110,LCFI62-LCFI61
-       .long L$set$110
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE42:
-LSFDE44:
-       .set L$set$111,LEFDE44-LASFDE44
-       .long L$set$111
-LASFDE44:
-       .set L$set$112,Lframe0-Lsection__debug_frame
-       .long L$set$112
-       .quad   LFB38
-       .set L$set$113,LFE38-LFB38
-       .quad L$set$113
-       .byte   0x4
-       .set L$set$114,LCFI63-LFB38
-       .long L$set$114
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$115,LCFI64-LCFI63
-       .long L$set$115
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE44:
-LSFDE46:
-       .set L$set$116,LEFDE46-LASFDE46
-       .long L$set$116
-LASFDE46:
-       .set L$set$117,Lframe0-Lsection__debug_frame
-       .long L$set$117
-       .quad   LFB39
-       .set L$set$118,LFE39-LFB39
-       .quad L$set$118
-       .byte   0x4
-       .set L$set$119,LCFI66-LFB39
-       .long L$set$119
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$120,LCFI67-LCFI66
-       .long L$set$120
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE46:
-LSFDE48:
-       .set L$set$121,LEFDE48-LASFDE48
-       .long L$set$121
-LASFDE48:
-       .set L$set$122,Lframe0-Lsection__debug_frame
-       .long L$set$122
-       .quad   LFB40
-       .set L$set$123,LFE40-LFB40
-       .quad L$set$123
-       .byte   0x4
-       .set L$set$124,LCFI69-LFB40
-       .long L$set$124
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$125,LCFI70-LCFI69
-       .long L$set$125
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE48:
-LSFDE50:
-       .set L$set$126,LEFDE50-LASFDE50
-       .long L$set$126
-LASFDE50:
-       .set L$set$127,Lframe0-Lsection__debug_frame
-       .long L$set$127
-       .quad   LFB41
-       .set L$set$128,LFE41-LFB41
-       .quad L$set$128
-       .byte   0x4
-       .set L$set$129,LCFI72-LFB41
-       .long L$set$129
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$130,LCFI73-LCFI72
-       .long L$set$130
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE50:
-LSFDE52:
-       .set L$set$131,LEFDE52-LASFDE52
-       .long L$set$131
-LASFDE52:
-       .set L$set$132,Lframe0-Lsection__debug_frame
-       .long L$set$132
-       .quad   LFB42
-       .set L$set$133,LFE42-LFB42
-       .quad L$set$133
-       .byte   0x4
-       .set L$set$134,LCFI75-LFB42
-       .long L$set$134
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$135,LCFI76-LCFI75
-       .long L$set$135
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE52:
-LSFDE54:
-       .set L$set$136,LEFDE54-LASFDE54
-       .long L$set$136
-LASFDE54:
-       .set L$set$137,Lframe0-Lsection__debug_frame
-       .long L$set$137
-       .quad   LFB43
-       .set L$set$138,LFE43-LFB43
-       .quad L$set$138
-       .byte   0x4
-       .set L$set$139,LCFI78-LFB43
-       .long L$set$139
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$140,LCFI79-LCFI78
-       .long L$set$140
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE54:
-LSFDE56:
-       .set L$set$141,LEFDE56-LASFDE56
-       .long L$set$141
-LASFDE56:
-       .set L$set$142,Lframe0-Lsection__debug_frame
-       .long L$set$142
-       .quad   LFB44
-       .set L$set$143,LFE44-LFB44
-       .quad L$set$143
-       .byte   0x4
-       .set L$set$144,LCFI81-LFB44
-       .long L$set$144
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$145,LCFI82-LCFI81
-       .long L$set$145
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE56:
-LSFDE58:
-       .set L$set$146,LEFDE58-LASFDE58
-       .long L$set$146
-LASFDE58:
-       .set L$set$147,Lframe0-Lsection__debug_frame
-       .long L$set$147
-       .quad   LFB45
-       .set L$set$148,LFE45-LFB45
-       .quad L$set$148
-       .byte   0x4
-       .set L$set$149,LCFI84-LFB45
-       .long L$set$149
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$150,LCFI85-LCFI84
-       .long L$set$150
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE58:
-LSFDE60:
-       .set L$set$151,LEFDE60-LASFDE60
-       .long L$set$151
-LASFDE60:
-       .set L$set$152,Lframe0-Lsection__debug_frame
-       .long L$set$152
-       .quad   LFB46
-       .set L$set$153,LFE46-LFB46
-       .quad L$set$153
-       .byte   0x4
-       .set L$set$154,LCFI87-LFB46
-       .long L$set$154
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$155,LCFI88-LCFI87
-       .long L$set$155
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE60:
-LSFDE62:
-       .set L$set$156,LEFDE62-LASFDE62
-       .long L$set$156
-LASFDE62:
-       .set L$set$157,Lframe0-Lsection__debug_frame
-       .long L$set$157
-       .quad   LFB47
-       .set L$set$158,LFE47-LFB47
-       .quad L$set$158
-       .byte   0x4
-       .set L$set$159,LCFI90-LFB47
-       .long L$set$159
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$160,LCFI91-LCFI90
-       .long L$set$160
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE62:
-LSFDE64:
-       .set L$set$161,LEFDE64-LASFDE64
-       .long L$set$161
-LASFDE64:
-       .set L$set$162,Lframe0-Lsection__debug_frame
-       .long L$set$162
-       .quad   LFB48
-       .set L$set$163,LFE48-LFB48
-       .quad L$set$163
-       .byte   0x4
-       .set L$set$164,LCFI93-LFB48
-       .long L$set$164
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$165,LCFI94-LCFI93
-       .long L$set$165
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE64:
-LSFDE66:
-       .set L$set$166,LEFDE66-LASFDE66
-       .long L$set$166
-LASFDE66:
-       .set L$set$167,Lframe0-Lsection__debug_frame
-       .long L$set$167
-       .quad   LFB49
-       .set L$set$168,LFE49-LFB49
-       .quad L$set$168
-       .byte   0x4
-       .set L$set$169,LCFI96-LFB49
-       .long L$set$169
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$170,LCFI97-LCFI96
-       .long L$set$170
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE66:
-LSFDE68:
-       .set L$set$171,LEFDE68-LASFDE68
-       .long L$set$171
-LASFDE68:
-       .set L$set$172,Lframe0-Lsection__debug_frame
-       .long L$set$172
-       .quad   LFB50
-       .set L$set$173,LFE50-LFB50
-       .quad L$set$173
-       .byte   0x4
-       .set L$set$174,LCFI99-LFB50
-       .long L$set$174
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$175,LCFI100-LCFI99
-       .long L$set$175
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE68:
-LSFDE70:
-       .set L$set$176,LEFDE70-LASFDE70
-       .long L$set$176
-LASFDE70:
-       .set L$set$177,Lframe0-Lsection__debug_frame
-       .long L$set$177
-       .quad   LFB51
-       .set L$set$178,LFE51-LFB51
-       .quad L$set$178
-       .byte   0x4
-       .set L$set$179,LCFI102-LFB51
-       .long L$set$179
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$180,LCFI103-LCFI102
-       .long L$set$180
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE70:
-LSFDE72:
-       .set L$set$181,LEFDE72-LASFDE72
-       .long L$set$181
-LASFDE72:
-       .set L$set$182,Lframe0-Lsection__debug_frame
-       .long L$set$182
-       .quad   LFB52
-       .set L$set$183,LFE52-LFB52
-       .quad L$set$183
-       .byte   0x4
-       .set L$set$184,LCFI105-LFB52
-       .long L$set$184
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$185,LCFI106-LCFI105
-       .long L$set$185
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE72:
-LSFDE74:
-       .set L$set$186,LEFDE74-LASFDE74
-       .long L$set$186
-LASFDE74:
-       .set L$set$187,Lframe0-Lsection__debug_frame
-       .long L$set$187
-       .quad   LFB53
-       .set L$set$188,LFE53-LFB53
-       .quad L$set$188
-       .byte   0x4
-       .set L$set$189,LCFI108-LFB53
-       .long L$set$189
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$190,LCFI109-LCFI108
-       .long L$set$190
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE74:
-LSFDE76:
-       .set L$set$191,LEFDE76-LASFDE76
-       .long L$set$191
-LASFDE76:
-       .set L$set$192,Lframe0-Lsection__debug_frame
-       .long L$set$192
-       .quad   LFB54
-       .set L$set$193,LFE54-LFB54
-       .quad L$set$193
-       .byte   0x4
-       .set L$set$194,LCFI111-LFB54
-       .long L$set$194
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$195,LCFI112-LCFI111
-       .long L$set$195
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE76:
-LSFDE78:
-       .set L$set$196,LEFDE78-LASFDE78
-       .long L$set$196
-LASFDE78:
-       .set L$set$197,Lframe0-Lsection__debug_frame
-       .long L$set$197
-       .quad   LFB55
-       .set L$set$198,LFE55-LFB55
-       .quad L$set$198
-       .byte   0x4
-       .set L$set$199,LCFI114-LFB55
-       .long L$set$199
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$200,LCFI115-LCFI114
-       .long L$set$200
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE78:
-LSFDE80:
-       .set L$set$201,LEFDE80-LASFDE80
-       .long L$set$201
-LASFDE80:
-       .set L$set$202,Lframe0-Lsection__debug_frame
-       .long L$set$202
-       .quad   LFB56
-       .set L$set$203,LFE56-LFB56
-       .quad L$set$203
-       .byte   0x4
-       .set L$set$204,LCFI117-LFB56
-       .long L$set$204
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$205,LCFI118-LCFI117
-       .long L$set$205
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE80:
-LSFDE82:
-       .set L$set$206,LEFDE82-LASFDE82
-       .long L$set$206
-LASFDE82:
-       .set L$set$207,Lframe0-Lsection__debug_frame
-       .long L$set$207
-       .quad   LFB57
-       .set L$set$208,LFE57-LFB57
-       .quad L$set$208
-       .byte   0x4
-       .set L$set$209,LCFI120-LFB57
-       .long L$set$209
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$210,LCFI121-LCFI120
-       .long L$set$210
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE82:
-LSFDE84:
-       .set L$set$211,LEFDE84-LASFDE84
-       .long L$set$211
-LASFDE84:
-       .set L$set$212,Lframe0-Lsection__debug_frame
-       .long L$set$212
-       .quad   LFB58
-       .set L$set$213,LFE58-LFB58
-       .quad L$set$213
-       .byte   0x4
-       .set L$set$214,LCFI123-LFB58
-       .long L$set$214
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$215,LCFI124-LCFI123
-       .long L$set$215
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE84:
-LSFDE86:
-       .set L$set$216,LEFDE86-LASFDE86
-       .long L$set$216
-LASFDE86:
-       .set L$set$217,Lframe0-Lsection__debug_frame
-       .long L$set$217
-       .quad   LFB59
-       .set L$set$218,LFE59-LFB59
-       .quad L$set$218
-       .byte   0x4
-       .set L$set$219,LCFI126-LFB59
-       .long L$set$219
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$220,LCFI127-LCFI126
-       .long L$set$220
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE86:
-LSFDE88:
-       .set L$set$221,LEFDE88-LASFDE88
-       .long L$set$221
-LASFDE88:
-       .set L$set$222,Lframe0-Lsection__debug_frame
-       .long L$set$222
-       .quad   LFB60
-       .set L$set$223,LFE60-LFB60
-       .quad L$set$223
-       .byte   0x4
-       .set L$set$224,LCFI129-LFB60
-       .long L$set$224
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$225,LCFI130-LCFI129
-       .long L$set$225
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE88:
-LSFDE90:
-       .set L$set$226,LEFDE90-LASFDE90
-       .long L$set$226
-LASFDE90:
-       .set L$set$227,Lframe0-Lsection__debug_frame
-       .long L$set$227
-       .quad   LFB61
-       .set L$set$228,LFE61-LFB61
-       .quad L$set$228
-       .byte   0x4
-       .set L$set$229,LCFI132-LFB61
-       .long L$set$229
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$230,LCFI133-LCFI132
-       .long L$set$230
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE90:
-LSFDE92:
-       .set L$set$231,LEFDE92-LASFDE92
-       .long L$set$231
-LASFDE92:
-       .set L$set$232,Lframe0-Lsection__debug_frame
-       .long L$set$232
-       .quad   LFB62
-       .set L$set$233,LFE62-LFB62
-       .quad L$set$233
-       .byte   0x4
-       .set L$set$234,LCFI135-LFB62
-       .long L$set$234
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$235,LCFI136-LCFI135
-       .long L$set$235
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE92:
-LSFDE94:
-       .set L$set$236,LEFDE94-LASFDE94
-       .long L$set$236
-LASFDE94:
-       .set L$set$237,Lframe0-Lsection__debug_frame
-       .long L$set$237
-       .quad   LFB63
-       .set L$set$238,LFE63-LFB63
-       .quad L$set$238
-       .byte   0x4
-       .set L$set$239,LCFI138-LFB63
-       .long L$set$239
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$240,LCFI139-LCFI138
-       .long L$set$240
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE94:
-       .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
-EH_frame1:
-       .set L$set$241,LECIE1-LSCIE1
-       .long L$set$241
-LSCIE1:
-       .long   0x0
-       .byte   0x1
-       .ascii "zR\0"
-       .byte   0x1
-       .byte   0x78
-       .byte   0x10
-       .byte   0x1
-       .byte   0x10
-       .byte   0xc
-       .byte   0x7
-       .byte   0x8
-       .byte   0x90
-       .byte   0x1
-       .align 3
-LECIE1:
-.globl _Gasketrmdir.eh
-_Gasketrmdir.eh:
-LSFDE1:
-       .set L$set$242,LEFDE1-LASFDE1
-       .long L$set$242
-LASFDE1:
-       .long   LASFDE1-EH_frame1
-       .quad   LFB16-.
-       .set L$set$243,LFE16-LFB16
-       .quad L$set$243
-       .byte   0x0
-       .byte   0x4
-       .set L$set$244,LCFI0-LFB16
-       .long L$set$244
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$245,LCFI1-LCFI0
-       .long L$set$245
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE1:
-.globl _Gasketopendir.eh
-_Gasketopendir.eh:
-LSFDE3:
-       .set L$set$246,LEFDE3-LASFDE3
-       .long L$set$246
-LASFDE3:
-       .long   LASFDE3-EH_frame1
-       .quad   LFB17-.
-       .set L$set$247,LFE17-LFB17
-       .quad L$set$247
-       .byte   0x0
-       .byte   0x4
-       .set L$set$248,LCFI3-LFB17
-       .long L$set$248
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$249,LCFI4-LCFI3
-       .long L$set$249
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE3:
-.globl _Gasketstat.eh
-_Gasketstat.eh:
-LSFDE5:
-       .set L$set$250,LEFDE5-LASFDE5
-       .long L$set$250
-LASFDE5:
-       .long   LASFDE5-EH_frame1
-       .quad   LFB18-.
-       .set L$set$251,LFE18-LFB18
-       .quad L$set$251
-       .byte   0x0
-       .byte   0x4
-       .set L$set$252,LCFI6-LFB18
-       .long L$set$252
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$253,LCFI7-LCFI6
-       .long L$set$253
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE5:
-.globl _Gasketstatfs.eh
-_Gasketstatfs.eh:
-LSFDE7:
-       .set L$set$254,LEFDE7-LASFDE7
-       .long L$set$254
-LASFDE7:
-       .long   LASFDE7-EH_frame1
-       .quad   LFB19-.
-       .set L$set$255,LFE19-LFB19
-       .quad L$set$255
-       .byte   0x0
-       .byte   0x4
-       .set L$set$256,LCFI9-LFB19
-       .long L$set$256
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$257,LCFI10-LCFI9
-       .long L$set$257
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE7:
-.globl _GasketmsSleep.eh
-_GasketmsSleep.eh:
-LSFDE9:
-       .set L$set$258,LEFDE9-LASFDE9
-       .long L$set$258
-LASFDE9:
-       .long   LASFDE9-EH_frame1
-       .quad   LFB20-.
-       .set L$set$259,LFE20-LFB20
-       .quad L$set$259
-       .byte   0x0
-       .byte   0x4
-       .set L$set$260,LCFI12-LFB20
-       .long L$set$260
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$261,LCFI13-LCFI12
-       .long L$set$261
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE9:
-.globl _Gasketexit.eh
-_Gasketexit.eh:
-LSFDE11:
-       .set L$set$262,LEFDE11-LASFDE11
-       .long L$set$262
-LASFDE11:
-       .long   LASFDE11-EH_frame1
-       .quad   LFB21-.
-       .set L$set$263,LFE21-LFB21
-       .quad L$set$263
-       .byte   0x0
-       .byte   0x4
-       .set L$set$264,LCFI15-LFB21
-       .long L$set$264
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$265,LCFI16-LCFI15
-       .long L$set$265
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE11:
-.globl _GasketSetTimer.eh
-_GasketSetTimer.eh:
-LSFDE13:
-       .set L$set$266,LEFDE13-LASFDE13
-       .long L$set$266
-LASFDE13:
-       .long   LASFDE13-EH_frame1
-       .quad   LFB22-.
-       .set L$set$267,LFE22-LFB22
-       .quad L$set$267
-       .byte   0x0
-       .byte   0x4
-       .set L$set$268,LCFI18-LFB22
-       .long L$set$268
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$269,LCFI19-LCFI18
-       .long L$set$269
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE13:
-.globl _GasketGetLocalTime.eh
-_GasketGetLocalTime.eh:
-LSFDE15:
-       .set L$set$270,LEFDE15-LASFDE15
-       .long L$set$270
-LASFDE15:
-       .long   LASFDE15-EH_frame1
-       .quad   LFB23-.
-       .set L$set$271,LFE23-LFB23
-       .quad L$set$271
-       .byte   0x0
-       .byte   0x4
-       .set L$set$272,LCFI21-LFB23
-       .long L$set$272
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$273,LCFI22-LCFI21
-       .long L$set$273
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE15:
-.globl _Gasketgmtime.eh
-_Gasketgmtime.eh:
-LSFDE17:
-       .set L$set$274,LEFDE17-LASFDE17
-       .long L$set$274
-LASFDE17:
-       .long   LASFDE17-EH_frame1
-       .quad   LFB24-.
-       .set L$set$275,LFE24-LFB24
-       .quad L$set$275
-       .byte   0x0
-       .byte   0x4
-       .set L$set$276,LCFI24-LFB24
-       .long L$set$276
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$277,LCFI25-LCFI24
-       .long L$set$277
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE17:
-.globl _GasketGetTimeZone.eh
-_GasketGetTimeZone.eh:
-LSFDE19:
-       .set L$set$278,LEFDE19-LASFDE19
-       .long L$set$278
-LASFDE19:
-       .long   LASFDE19-EH_frame1
-       .quad   LFB25-.
-       .set L$set$279,LFE25-LFB25
-       .quad L$set$279
-       .byte   0x0
-       .byte   0x4
-       .set L$set$280,LCFI27-LFB25
-       .long L$set$280
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$281,LCFI28-LCFI27
-       .long L$set$281
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE19:
-.globl _GasketGetDayLight.eh
-_GasketGetDayLight.eh:
-LSFDE21:
-       .set L$set$282,LEFDE21-LASFDE21
-       .long L$set$282
-LASFDE21:
-       .long   LASFDE21-EH_frame1
-       .quad   LFB26-.
-       .set L$set$283,LFE26-LFB26
-       .quad L$set$283
-       .byte   0x0
-       .byte   0x4
-       .set L$set$284,LCFI29-LFB26
-       .long L$set$284
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$285,LCFI30-LCFI29
-       .long L$set$285
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE21:
-.globl _Gasketpoll.eh
-_Gasketpoll.eh:
-LSFDE23:
-       .set L$set$286,LEFDE23-LASFDE23
-       .long L$set$286
-LASFDE23:
-       .long   LASFDE23-EH_frame1
-       .quad   LFB27-.
-       .set L$set$287,LFE27-LFB27
-       .quad L$set$287
-       .byte   0x0
-       .byte   0x4
-       .set L$set$288,LCFI31-LFB27
-       .long L$set$288
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$289,LCFI32-LCFI31
-       .long L$set$289
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE23:
-.globl _Gasketread.eh
-_Gasketread.eh:
-LSFDE25:
-       .set L$set$290,LEFDE25-LASFDE25
-       .long L$set$290
-LASFDE25:
-       .long   LASFDE25-EH_frame1
-       .quad   LFB28-.
-       .set L$set$291,LFE28-LFB28
-       .quad L$set$291
-       .byte   0x0
-       .byte   0x4
-       .set L$set$292,LCFI34-LFB28
-       .long L$set$292
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$293,LCFI35-LCFI34
-       .long L$set$293
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE25:
-.globl _Gasketwrite.eh
-_Gasketwrite.eh:
-LSFDE27:
-       .set L$set$294,LEFDE27-LASFDE27
-       .long L$set$294
-LASFDE27:
-       .long   LASFDE27-EH_frame1
-       .quad   LFB29-.
-       .set L$set$295,LFE29-LFB29
-       .quad L$set$295
-       .byte   0x0
-       .byte   0x4
-       .set L$set$296,LCFI37-LFB29
-       .long L$set$296
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$297,LCFI38-LCFI37
-       .long L$set$297
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE27:
-.globl _Gasketgetenv.eh
-_Gasketgetenv.eh:
-LSFDE29:
-       .set L$set$298,LEFDE29-LASFDE29
-       .long L$set$298
-LASFDE29:
-       .long   LASFDE29-EH_frame1
-       .quad   LFB30-.
-       .set L$set$299,LFE30-LFB30
-       .quad L$set$299
-       .byte   0x0
-       .byte   0x4
-       .set L$set$300,LCFI40-LFB30
-       .long L$set$300
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$301,LCFI41-LCFI40
-       .long L$set$301
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE29:
-.globl _Gasketopen.eh
-_Gasketopen.eh:
-LSFDE31:
-       .set L$set$302,LEFDE31-LASFDE31
-       .long L$set$302
-LASFDE31:
-       .long   LASFDE31-EH_frame1
-       .quad   LFB31-.
-       .set L$set$303,LFE31-LFB31
-       .quad L$set$303
-       .byte   0x0
-       .byte   0x4
-       .set L$set$304,LCFI43-LFB31
-       .long L$set$304
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$305,LCFI44-LCFI43
-       .long L$set$305
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE31:
-.globl _Gasketlseek.eh
-_Gasketlseek.eh:
-LSFDE33:
-       .set L$set$306,LEFDE33-LASFDE33
-       .long L$set$306
-LASFDE33:
-       .long   LASFDE33-EH_frame1
-       .quad   LFB32-.
-       .set L$set$307,LFE32-LFB32
-       .quad L$set$307
-       .byte   0x0
-       .byte   0x4
-       .set L$set$308,LCFI46-LFB32
-       .long L$set$308
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$309,LCFI47-LCFI46
-       .long L$set$309
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE33:
-.globl _Gasketftruncate.eh
-_Gasketftruncate.eh:
-LSFDE35:
-       .set L$set$310,LEFDE35-LASFDE35
-       .long L$set$310
-LASFDE35:
-       .long   LASFDE35-EH_frame1
-       .quad   LFB33-.
-       .set L$set$311,LFE33-LFB33
-       .quad L$set$311
-       .byte   0x0
-       .byte   0x4
-       .set L$set$312,LCFI49-LFB33
-       .long L$set$312
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$313,LCFI50-LCFI49
-       .long L$set$313
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE35:
-.globl _Gasketclose.eh
-_Gasketclose.eh:
-LSFDE37:
-       .set L$set$314,LEFDE37-LASFDE37
-       .long L$set$314
-LASFDE37:
-       .long   LASFDE37-EH_frame1
-       .quad   LFB34-.
-       .set L$set$315,LFE34-LFB34
-       .quad L$set$315
-       .byte   0x0
-       .byte   0x4
-       .set L$set$316,LCFI52-LFB34
-       .long L$set$316
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$317,LCFI53-LCFI52
-       .long L$set$317
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE37:
-.globl _Gasketmkdir.eh
-_Gasketmkdir.eh:
-LSFDE39:
-       .set L$set$318,LEFDE39-LASFDE39
-       .long L$set$318
-LASFDE39:
-       .long   LASFDE39-EH_frame1
-       .quad   LFB35-.
-       .set L$set$319,LFE35-LFB35
-       .quad L$set$319
-       .byte   0x0
-       .byte   0x4
-       .set L$set$320,LCFI55-LFB35
-       .long L$set$320
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$321,LCFI56-LCFI55
-       .long L$set$321
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE39:
-.globl _Gasketunlink.eh
-_Gasketunlink.eh:
-LSFDE41:
-       .set L$set$322,LEFDE41-LASFDE41
-       .long L$set$322
-LASFDE41:
-       .long   LASFDE41-EH_frame1
-       .quad   LFB36-.
-       .set L$set$323,LFE36-LFB36
-       .quad L$set$323
-       .byte   0x0
-       .byte   0x4
-       .set L$set$324,LCFI58-LFB36
-       .long L$set$324
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$325,LCFI59-LCFI58
-       .long L$set$325
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE41:
-.globl _GasketGetErrno.eh
-_GasketGetErrno.eh:
-LSFDE43:
-       .set L$set$326,LEFDE43-LASFDE43
-       .long L$set$326
-LASFDE43:
-       .long   LASFDE43-EH_frame1
-       .quad   LFB37-.
-       .set L$set$327,LFE37-LFB37
-       .quad L$set$327
-       .byte   0x0
-       .byte   0x4
-       .set L$set$328,LCFI61-LFB37
-       .long L$set$328
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$329,LCFI62-LCFI61
-       .long L$set$329
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE43:
-.globl _Gasketrewinddir.eh
-_Gasketrewinddir.eh:
-LSFDE45:
-       .set L$set$330,LEFDE45-LASFDE45
-       .long L$set$330
-LASFDE45:
-       .long   LASFDE45-EH_frame1
-       .quad   LFB38-.
-       .set L$set$331,LFE38-LFB38
-       .quad L$set$331
-       .byte   0x0
-       .byte   0x4
-       .set L$set$332,LCFI63-LFB38
-       .long L$set$332
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$333,LCFI64-LCFI63
-       .long L$set$333
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE45:
-.globl _Gasketreaddir.eh
-_Gasketreaddir.eh:
-LSFDE47:
-       .set L$set$334,LEFDE47-LASFDE47
-       .long L$set$334
-LASFDE47:
-       .long   LASFDE47-EH_frame1
-       .quad   LFB39-.
-       .set L$set$335,LFE39-LFB39
-       .quad L$set$335
-       .byte   0x0
-       .byte   0x4
-       .set L$set$336,LCFI66-LFB39
-       .long L$set$336
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$337,LCFI67-LCFI66
-       .long L$set$337
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE47:
-.globl _Gasketclosedir.eh
-_Gasketclosedir.eh:
-LSFDE49:
-       .set L$set$338,LEFDE49-LASFDE49
-       .long L$set$338
-LASFDE49:
-       .long   LASFDE49-EH_frame1
-       .quad   LFB40-.
-       .set L$set$339,LFE40-LFB40
-       .quad L$set$339
-       .byte   0x0
-       .byte   0x4
-       .set L$set$340,LCFI69-LFB40
-       .long L$set$340
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$341,LCFI70-LCFI69
-       .long L$set$341
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE49:
-.globl _Gasketrename.eh
-_Gasketrename.eh:
-LSFDE51:
-       .set L$set$342,LEFDE51-LASFDE51
-       .long L$set$342
-LASFDE51:
-       .long   LASFDE51-EH_frame1
-       .quad   LFB41-.
-       .set L$set$343,LFE41-LFB41
-       .quad L$set$343
-       .byte   0x0
-       .byte   0x4
-       .set L$set$344,LCFI72-LFB41
-       .long L$set$344
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$345,LCFI73-LCFI72
-       .long L$set$345
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE51:
-.globl _Gasketmktime.eh
-_Gasketmktime.eh:
-LSFDE53:
-       .set L$set$346,LEFDE53-LASFDE53
-       .long L$set$346
-LASFDE53:
-       .long   LASFDE53-EH_frame1
-       .quad   LFB42-.
-       .set L$set$347,LFE42-LFB42
-       .quad L$set$347
-       .byte   0x0
-       .byte   0x4
-       .set L$set$348,LCFI75-LFB42
-       .long L$set$348
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$349,LCFI76-LCFI75
-       .long L$set$349
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE53:
-.globl _Gasketfsync.eh
-_Gasketfsync.eh:
-LSFDE55:
-       .set L$set$350,LEFDE55-LASFDE55
-       .long L$set$350
-LASFDE55:
-       .long   LASFDE55-EH_frame1
-       .quad   LFB43-.
-       .set L$set$351,LFE43-LFB43
-       .quad L$set$351
-       .byte   0x0
-       .byte   0x4
-       .set L$set$352,LCFI78-LFB43
-       .long L$set$352
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$353,LCFI79-LCFI78
-       .long L$set$353
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE55:
-.globl _Gasketchmod.eh
-_Gasketchmod.eh:
-LSFDE57:
-       .set L$set$354,LEFDE57-LASFDE57
-       .long L$set$354
-LASFDE57:
-       .long   LASFDE57-EH_frame1
-       .quad   LFB44-.
-       .set L$set$355,LFE44-LFB44
-       .quad L$set$355
-       .byte   0x0
-       .byte   0x4
-       .set L$set$356,LCFI81-LFB44
-       .long L$set$356
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$357,LCFI82-LCFI81
-       .long L$set$357
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE57:
-.globl _Gasketutime.eh
-_Gasketutime.eh:
-LSFDE59:
-       .set L$set$358,LEFDE59-LASFDE59
-       .long L$set$358
-LASFDE59:
-       .long   LASFDE59-EH_frame1
-       .quad   LFB45-.
-       .set L$set$359,LFE45-LFB45
-       .quad L$set$359
-       .byte   0x0
-       .byte   0x4
-       .set L$set$360,LCFI84-LFB45
-       .long L$set$360
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$361,LCFI85-LCFI84
-       .long L$set$361
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE59:
-.globl _Gaskettcflush.eh
-_Gaskettcflush.eh:
-LSFDE61:
-       .set L$set$362,LEFDE61-LASFDE61
-       .long L$set$362
-LASFDE61:
-       .long   LASFDE61-EH_frame1
-       .quad   LFB46-.
-       .set L$set$363,LFE46-LFB46
-       .quad L$set$363
-       .byte   0x0
-       .byte   0x4
-       .set L$set$364,LCFI87-LFB46
-       .long L$set$364
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$365,LCFI88-LCFI87
-       .long L$set$365
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE61:
-.globl _GasketUgaCreate.eh
-_GasketUgaCreate.eh:
-LSFDE63:
-       .set L$set$366,LEFDE63-LASFDE63
-       .long L$set$366
-LASFDE63:
-       .long   LASFDE63-EH_frame1
-       .quad   LFB47-.
-       .set L$set$367,LFE47-LFB47
-       .quad L$set$367
-       .byte   0x0
-       .byte   0x4
-       .set L$set$368,LCFI90-LFB47
-       .long L$set$368
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$369,LCFI91-LCFI90
-       .long L$set$369
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE63:
-.globl _Gasketperror.eh
-_Gasketperror.eh:
-LSFDE65:
-       .set L$set$370,LEFDE65-LASFDE65
-       .long L$set$370
-LASFDE65:
-       .long   LASFDE65-EH_frame1
-       .quad   LFB48-.
-       .set L$set$371,LFE48-LFB48
-       .quad L$set$371
-       .byte   0x0
-       .byte   0x4
-       .set L$set$372,LCFI93-LFB48
-       .long L$set$372
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$373,LCFI94-LCFI93
-       .long L$set$373
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE65:
-.globl _Gasketioctl.eh
-_Gasketioctl.eh:
-LSFDE67:
-       .set L$set$374,LEFDE67-LASFDE67
-       .long L$set$374
-LASFDE67:
-       .long   LASFDE67-EH_frame1
-       .quad   LFB49-.
-       .set L$set$375,LFE49-LFB49
-       .quad L$set$375
-       .byte   0x0
-       .byte   0x4
-       .set L$set$376,LCFI96-LFB49
-       .long L$set$376
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$377,LCFI97-LCFI96
-       .long L$set$377
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE67:
-.globl _Gasketfcntl.eh
-_Gasketfcntl.eh:
-LSFDE69:
-       .set L$set$378,LEFDE69-LASFDE69
-       .long L$set$378
-LASFDE69:
-       .long   LASFDE69-EH_frame1
-       .quad   LFB50-.
-       .set L$set$379,LFE50-LFB50
-       .quad L$set$379
-       .byte   0x0
-       .byte   0x4
-       .set L$set$380,LCFI99-LFB50
-       .long L$set$380
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$381,LCFI100-LCFI99
-       .long L$set$381
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE69:
-.globl _Gasketcfsetispeed.eh
-_Gasketcfsetispeed.eh:
-LSFDE71:
-       .set L$set$382,LEFDE71-LASFDE71
-       .long L$set$382
-LASFDE71:
-       .long   LASFDE71-EH_frame1
-       .quad   LFB51-.
-       .set L$set$383,LFE51-LFB51
-       .quad L$set$383
-       .byte   0x0
-       .byte   0x4
-       .set L$set$384,LCFI102-LFB51
-       .long L$set$384
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$385,LCFI103-LCFI102
-       .long L$set$385
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE71:
-.globl _Gasketcfsetospeed.eh
-_Gasketcfsetospeed.eh:
-LSFDE73:
-       .set L$set$386,LEFDE73-LASFDE73
-       .long L$set$386
-LASFDE73:
-       .long   LASFDE73-EH_frame1
-       .quad   LFB52-.
-       .set L$set$387,LFE52-LFB52
-       .quad L$set$387
-       .byte   0x0
-       .byte   0x4
-       .set L$set$388,LCFI105-LFB52
-       .long L$set$388
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$389,LCFI106-LCFI105
-       .long L$set$389
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE73:
-.globl _Gaskettcgetattr.eh
-_Gaskettcgetattr.eh:
-LSFDE75:
-       .set L$set$390,LEFDE75-LASFDE75
-       .long L$set$390
-LASFDE75:
-       .long   LASFDE75-EH_frame1
-       .quad   LFB53-.
-       .set L$set$391,LFE53-LFB53
-       .quad L$set$391
-       .byte   0x0
-       .byte   0x4
-       .set L$set$392,LCFI108-LFB53
-       .long L$set$392
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$393,LCFI109-LCFI108
-       .long L$set$393
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE75:
-.globl _Gaskettcsetattr.eh
-_Gaskettcsetattr.eh:
-LSFDE77:
-       .set L$set$394,LEFDE77-LASFDE77
-       .long L$set$394
-LASFDE77:
-       .long   LASFDE77-EH_frame1
-       .quad   LFB54-.
-       .set L$set$395,LFE54-LFB54
-       .quad L$set$395
-       .byte   0x0
-       .byte   0x4
-       .set L$set$396,LCFI111-LFB54
-       .long L$set$396
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$397,LCFI112-LCFI111
-       .long L$set$397
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE77:
-.globl _GasketUnixPeCoffGetEntryPoint.eh
-_GasketUnixPeCoffGetEntryPoint.eh:
-LSFDE79:
-       .set L$set$398,LEFDE79-LASFDE79
-       .long L$set$398
-LASFDE79:
-       .long   LASFDE79-EH_frame1
-       .quad   LFB55-.
-       .set L$set$399,LFE55-LFB55
-       .quad L$set$399
-       .byte   0x0
-       .byte   0x4
-       .set L$set$400,LCFI114-LFB55
-       .long L$set$400
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$401,LCFI115-LCFI114
-       .long L$set$401
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE79:
-.globl _GasketUnixPeCoffRelocateImageExtraAction.eh
-_GasketUnixPeCoffRelocateImageExtraAction.eh:
-LSFDE81:
-       .set L$set$402,LEFDE81-LASFDE81
-       .long L$set$402
-LASFDE81:
-       .long   LASFDE81-EH_frame1
-       .quad   LFB56-.
-       .set L$set$403,LFE56-LFB56
-       .quad L$set$403
-       .byte   0x0
-       .byte   0x4
-       .set L$set$404,LCFI117-LFB56
-       .long L$set$404
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$405,LCFI118-LCFI117
-       .long L$set$405
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE81:
-.globl _GasketUnixPeCoffUnloadImageExtraAction.eh
-_GasketUnixPeCoffUnloadImageExtraAction.eh:
-LSFDE83:
-       .set L$set$406,LEFDE83-LASFDE83
-       .long L$set$406
-LASFDE83:
-       .long   LASFDE83-EH_frame1
-       .quad   LFB57-.
-       .set L$set$407,LFE57-LFB57
-       .quad L$set$407
-       .byte   0x0
-       .byte   0x4
-       .set L$set$408,LCFI120-LFB57
-       .long L$set$408
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$409,LCFI121-LCFI120
-       .long L$set$409
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE83:
-.globl _GasketUgaClose.eh
-_GasketUgaClose.eh:
-LSFDE85:
-       .set L$set$410,LEFDE85-LASFDE85
-       .long L$set$410
-LASFDE85:
-       .long   LASFDE85-EH_frame1
-       .quad   LFB58-.
-       .set L$set$411,LFE58-LFB58
-       .quad L$set$411
-       .byte   0x0
-       .byte   0x4
-       .set L$set$412,LCFI123-LFB58
-       .long L$set$412
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$413,LCFI124-LCFI123
-       .long L$set$413
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE85:
-.globl _GasketUgaSize.eh
-_GasketUgaSize.eh:
-LSFDE87:
-       .set L$set$414,LEFDE87-LASFDE87
-       .long L$set$414
-LASFDE87:
-       .long   LASFDE87-EH_frame1
-       .quad   LFB59-.
-       .set L$set$415,LFE59-LFB59
-       .quad L$set$415
-       .byte   0x0
-       .byte   0x4
-       .set L$set$416,LCFI126-LFB59
-       .long L$set$416
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$417,LCFI127-LCFI126
-       .long L$set$417
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE87:
-.globl _GasketUgaCheckKey.eh
-_GasketUgaCheckKey.eh:
-LSFDE89:
-       .set L$set$418,LEFDE89-LASFDE89
-       .long L$set$418
-LASFDE89:
-       .long   LASFDE89-EH_frame1
-       .quad   LFB60-.
-       .set L$set$419,LFE60-LFB60
-       .quad L$set$419
-       .byte   0x0
-       .byte   0x4
-       .set L$set$420,LCFI129-LFB60
-       .long L$set$420
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$421,LCFI130-LCFI129
-       .long L$set$421
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE89:
-.globl _GasketUgaGetKey.eh
-_GasketUgaGetKey.eh:
-LSFDE91:
-       .set L$set$422,LEFDE91-LASFDE91
-       .long L$set$422
-LASFDE91:
-       .long   LASFDE91-EH_frame1
-       .quad   LFB61-.
-       .set L$set$423,LFE61-LFB61
-       .quad L$set$423
-       .byte   0x0
-       .byte   0x4
-       .set L$set$424,LCFI132-LFB61
-       .long L$set$424
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$425,LCFI133-LCFI132
-       .long L$set$425
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE91:
-.globl _GasketUgaBlt.eh
-_GasketUgaBlt.eh:
-LSFDE93:
-       .set L$set$426,LEFDE93-LASFDE93
-       .long L$set$426
-LASFDE93:
-       .long   LASFDE93-EH_frame1
-       .quad   LFB62-.
-       .set L$set$427,LFE62-LFB62
-       .quad L$set$427
-       .byte   0x0
-       .byte   0x4
-       .set L$set$428,LCFI135-LFB62
-       .long L$set$428
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$429,LCFI136-LCFI135
-       .long L$set$429
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE93:
-.globl _ReverseGasketUint64.eh
-_ReverseGasketUint64.eh:
-LSFDE95:
-       .set L$set$430,LEFDE95-LASFDE95
-       .long L$set$430
-LASFDE95:
-       .long   LASFDE95-EH_frame1
-       .quad   LFB63-.
-       .set L$set$431,LFE63-LFB63
-       .quad L$set$431
-       .byte   0x0
-       .byte   0x4
-       .set L$set$432,LCFI138-LFB63
-       .long L$set$432
-       .byte   0xe
-       .byte   0x10
-       .byte   0x86
-       .byte   0x2
-       .byte   0x4
-       .set L$set$433,LCFI139-LCFI138
-       .long L$set$433
-       .byte   0xd
-       .byte   0x6
-       .align 3
-LEFDE95:
-       .text
-Letext0:
-       .section __DWARF,__debug_loc,regular,debug
-Ldebug_loc0:
-LLST0:
-       .set L$set$434,LFB16-Ltext0
-       .quad L$set$434
-       .set L$set$435,LCFI0-Ltext0
-       .quad L$set$435
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$436,LCFI0-Ltext0
-       .quad L$set$436
-       .set L$set$437,LCFI1-Ltext0
-       .quad L$set$437
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$438,LCFI1-Ltext0
-       .quad L$set$438
-       .set L$set$439,LFE16-Ltext0
-       .quad L$set$439
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST1:
-       .set L$set$440,LFB17-Ltext0
-       .quad L$set$440
-       .set L$set$441,LCFI3-Ltext0
-       .quad L$set$441
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$442,LCFI3-Ltext0
-       .quad L$set$442
-       .set L$set$443,LCFI4-Ltext0
-       .quad L$set$443
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$444,LCFI4-Ltext0
-       .quad L$set$444
-       .set L$set$445,LFE17-Ltext0
-       .quad L$set$445
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST2:
-       .set L$set$446,LFB18-Ltext0
-       .quad L$set$446
-       .set L$set$447,LCFI6-Ltext0
-       .quad L$set$447
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$448,LCFI6-Ltext0
-       .quad L$set$448
-       .set L$set$449,LCFI7-Ltext0
-       .quad L$set$449
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$450,LCFI7-Ltext0
-       .quad L$set$450
-       .set L$set$451,LFE18-Ltext0
-       .quad L$set$451
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST3:
-       .set L$set$452,LFB19-Ltext0
-       .quad L$set$452
-       .set L$set$453,LCFI9-Ltext0
-       .quad L$set$453
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$454,LCFI9-Ltext0
-       .quad L$set$454
-       .set L$set$455,LCFI10-Ltext0
-       .quad L$set$455
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$456,LCFI10-Ltext0
-       .quad L$set$456
-       .set L$set$457,LFE19-Ltext0
-       .quad L$set$457
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST4:
-       .set L$set$458,LFB20-Ltext0
-       .quad L$set$458
-       .set L$set$459,LCFI12-Ltext0
-       .quad L$set$459
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$460,LCFI12-Ltext0
-       .quad L$set$460
-       .set L$set$461,LCFI13-Ltext0
-       .quad L$set$461
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$462,LCFI13-Ltext0
-       .quad L$set$462
-       .set L$set$463,LFE20-Ltext0
-       .quad L$set$463
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST5:
-       .set L$set$464,LFB21-Ltext0
-       .quad L$set$464
-       .set L$set$465,LCFI15-Ltext0
-       .quad L$set$465
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$466,LCFI15-Ltext0
-       .quad L$set$466
-       .set L$set$467,LCFI16-Ltext0
-       .quad L$set$467
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$468,LCFI16-Ltext0
-       .quad L$set$468
-       .set L$set$469,LFE21-Ltext0
-       .quad L$set$469
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST6:
-       .set L$set$470,LFB22-Ltext0
-       .quad L$set$470
-       .set L$set$471,LCFI18-Ltext0
-       .quad L$set$471
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$472,LCFI18-Ltext0
-       .quad L$set$472
-       .set L$set$473,LCFI19-Ltext0
-       .quad L$set$473
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$474,LCFI19-Ltext0
-       .quad L$set$474
-       .set L$set$475,LFE22-Ltext0
-       .quad L$set$475
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST7:
-       .set L$set$476,LFB23-Ltext0
-       .quad L$set$476
-       .set L$set$477,LCFI21-Ltext0
-       .quad L$set$477
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$478,LCFI21-Ltext0
-       .quad L$set$478
-       .set L$set$479,LCFI22-Ltext0
-       .quad L$set$479
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$480,LCFI22-Ltext0
-       .quad L$set$480
-       .set L$set$481,LFE23-Ltext0
-       .quad L$set$481
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST8:
-       .set L$set$482,LFB24-Ltext0
-       .quad L$set$482
-       .set L$set$483,LCFI24-Ltext0
-       .quad L$set$483
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$484,LCFI24-Ltext0
-       .quad L$set$484
-       .set L$set$485,LCFI25-Ltext0
-       .quad L$set$485
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$486,LCFI25-Ltext0
-       .quad L$set$486
-       .set L$set$487,LFE24-Ltext0
-       .quad L$set$487
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST9:
-       .set L$set$488,LFB25-Ltext0
-       .quad L$set$488
-       .set L$set$489,LCFI27-Ltext0
-       .quad L$set$489
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$490,LCFI27-Ltext0
-       .quad L$set$490
-       .set L$set$491,LCFI28-Ltext0
-       .quad L$set$491
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$492,LCFI28-Ltext0
-       .quad L$set$492
-       .set L$set$493,LFE25-Ltext0
-       .quad L$set$493
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST10:
-       .set L$set$494,LFB26-Ltext0
-       .quad L$set$494
-       .set L$set$495,LCFI29-Ltext0
-       .quad L$set$495
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$496,LCFI29-Ltext0
-       .quad L$set$496
-       .set L$set$497,LCFI30-Ltext0
-       .quad L$set$497
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$498,LCFI30-Ltext0
-       .quad L$set$498
-       .set L$set$499,LFE26-Ltext0
-       .quad L$set$499
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST11:
-       .set L$set$500,LFB27-Ltext0
-       .quad L$set$500
-       .set L$set$501,LCFI31-Ltext0
-       .quad L$set$501
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$502,LCFI31-Ltext0
-       .quad L$set$502
-       .set L$set$503,LCFI32-Ltext0
-       .quad L$set$503
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$504,LCFI32-Ltext0
-       .quad L$set$504
-       .set L$set$505,LFE27-Ltext0
-       .quad L$set$505
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST12:
-       .set L$set$506,LFB28-Ltext0
-       .quad L$set$506
-       .set L$set$507,LCFI34-Ltext0
-       .quad L$set$507
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$508,LCFI34-Ltext0
-       .quad L$set$508
-       .set L$set$509,LCFI35-Ltext0
-       .quad L$set$509
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$510,LCFI35-Ltext0
-       .quad L$set$510
-       .set L$set$511,LFE28-Ltext0
-       .quad L$set$511
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST13:
-       .set L$set$512,LFB29-Ltext0
-       .quad L$set$512
-       .set L$set$513,LCFI37-Ltext0
-       .quad L$set$513
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$514,LCFI37-Ltext0
-       .quad L$set$514
-       .set L$set$515,LCFI38-Ltext0
-       .quad L$set$515
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$516,LCFI38-Ltext0
-       .quad L$set$516
-       .set L$set$517,LFE29-Ltext0
-       .quad L$set$517
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST14:
-       .set L$set$518,LFB30-Ltext0
-       .quad L$set$518
-       .set L$set$519,LCFI40-Ltext0
-       .quad L$set$519
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$520,LCFI40-Ltext0
-       .quad L$set$520
-       .set L$set$521,LCFI41-Ltext0
-       .quad L$set$521
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$522,LCFI41-Ltext0
-       .quad L$set$522
-       .set L$set$523,LFE30-Ltext0
-       .quad L$set$523
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST15:
-       .set L$set$524,LFB31-Ltext0
-       .quad L$set$524
-       .set L$set$525,LCFI43-Ltext0
-       .quad L$set$525
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$526,LCFI43-Ltext0
-       .quad L$set$526
-       .set L$set$527,LCFI44-Ltext0
-       .quad L$set$527
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$528,LCFI44-Ltext0
-       .quad L$set$528
-       .set L$set$529,LFE31-Ltext0
-       .quad L$set$529
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST16:
-       .set L$set$530,LFB32-Ltext0
-       .quad L$set$530
-       .set L$set$531,LCFI46-Ltext0
-       .quad L$set$531
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$532,LCFI46-Ltext0
-       .quad L$set$532
-       .set L$set$533,LCFI47-Ltext0
-       .quad L$set$533
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$534,LCFI47-Ltext0
-       .quad L$set$534
-       .set L$set$535,LFE32-Ltext0
-       .quad L$set$535
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST17:
-       .set L$set$536,LFB33-Ltext0
-       .quad L$set$536
-       .set L$set$537,LCFI49-Ltext0
-       .quad L$set$537
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$538,LCFI49-Ltext0
-       .quad L$set$538
-       .set L$set$539,LCFI50-Ltext0
-       .quad L$set$539
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$540,LCFI50-Ltext0
-       .quad L$set$540
-       .set L$set$541,LFE33-Ltext0
-       .quad L$set$541
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST18:
-       .set L$set$542,LFB34-Ltext0
-       .quad L$set$542
-       .set L$set$543,LCFI52-Ltext0
-       .quad L$set$543
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$544,LCFI52-Ltext0
-       .quad L$set$544
-       .set L$set$545,LCFI53-Ltext0
-       .quad L$set$545
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$546,LCFI53-Ltext0
-       .quad L$set$546
-       .set L$set$547,LFE34-Ltext0
-       .quad L$set$547
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST19:
-       .set L$set$548,LFB35-Ltext0
-       .quad L$set$548
-       .set L$set$549,LCFI55-Ltext0
-       .quad L$set$549
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$550,LCFI55-Ltext0
-       .quad L$set$550
-       .set L$set$551,LCFI56-Ltext0
-       .quad L$set$551
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$552,LCFI56-Ltext0
-       .quad L$set$552
-       .set L$set$553,LFE35-Ltext0
-       .quad L$set$553
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST20:
-       .set L$set$554,LFB36-Ltext0
-       .quad L$set$554
-       .set L$set$555,LCFI58-Ltext0
-       .quad L$set$555
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$556,LCFI58-Ltext0
-       .quad L$set$556
-       .set L$set$557,LCFI59-Ltext0
-       .quad L$set$557
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$558,LCFI59-Ltext0
-       .quad L$set$558
-       .set L$set$559,LFE36-Ltext0
-       .quad L$set$559
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST21:
-       .set L$set$560,LFB37-Ltext0
-       .quad L$set$560
-       .set L$set$561,LCFI61-Ltext0
-       .quad L$set$561
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$562,LCFI61-Ltext0
-       .quad L$set$562
-       .set L$set$563,LCFI62-Ltext0
-       .quad L$set$563
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$564,LCFI62-Ltext0
-       .quad L$set$564
-       .set L$set$565,LFE37-Ltext0
-       .quad L$set$565
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST22:
-       .set L$set$566,LFB38-Ltext0
-       .quad L$set$566
-       .set L$set$567,LCFI63-Ltext0
-       .quad L$set$567
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$568,LCFI63-Ltext0
-       .quad L$set$568
-       .set L$set$569,LCFI64-Ltext0
-       .quad L$set$569
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$570,LCFI64-Ltext0
-       .quad L$set$570
-       .set L$set$571,LFE38-Ltext0
-       .quad L$set$571
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST23:
-       .set L$set$572,LFB39-Ltext0
-       .quad L$set$572
-       .set L$set$573,LCFI66-Ltext0
-       .quad L$set$573
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$574,LCFI66-Ltext0
-       .quad L$set$574
-       .set L$set$575,LCFI67-Ltext0
-       .quad L$set$575
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$576,LCFI67-Ltext0
-       .quad L$set$576
-       .set L$set$577,LFE39-Ltext0
-       .quad L$set$577
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST24:
-       .set L$set$578,LFB40-Ltext0
-       .quad L$set$578
-       .set L$set$579,LCFI69-Ltext0
-       .quad L$set$579
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$580,LCFI69-Ltext0
-       .quad L$set$580
-       .set L$set$581,LCFI70-Ltext0
-       .quad L$set$581
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$582,LCFI70-Ltext0
-       .quad L$set$582
-       .set L$set$583,LFE40-Ltext0
-       .quad L$set$583
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST25:
-       .set L$set$584,LFB41-Ltext0
-       .quad L$set$584
-       .set L$set$585,LCFI72-Ltext0
-       .quad L$set$585
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$586,LCFI72-Ltext0
-       .quad L$set$586
-       .set L$set$587,LCFI73-Ltext0
-       .quad L$set$587
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$588,LCFI73-Ltext0
-       .quad L$set$588
-       .set L$set$589,LFE41-Ltext0
-       .quad L$set$589
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST26:
-       .set L$set$590,LFB42-Ltext0
-       .quad L$set$590
-       .set L$set$591,LCFI75-Ltext0
-       .quad L$set$591
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$592,LCFI75-Ltext0
-       .quad L$set$592
-       .set L$set$593,LCFI76-Ltext0
-       .quad L$set$593
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$594,LCFI76-Ltext0
-       .quad L$set$594
-       .set L$set$595,LFE42-Ltext0
-       .quad L$set$595
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST27:
-       .set L$set$596,LFB43-Ltext0
-       .quad L$set$596
-       .set L$set$597,LCFI78-Ltext0
-       .quad L$set$597
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$598,LCFI78-Ltext0
-       .quad L$set$598
-       .set L$set$599,LCFI79-Ltext0
-       .quad L$set$599
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$600,LCFI79-Ltext0
-       .quad L$set$600
-       .set L$set$601,LFE43-Ltext0
-       .quad L$set$601
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST28:
-       .set L$set$602,LFB44-Ltext0
-       .quad L$set$602
-       .set L$set$603,LCFI81-Ltext0
-       .quad L$set$603
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$604,LCFI81-Ltext0
-       .quad L$set$604
-       .set L$set$605,LCFI82-Ltext0
-       .quad L$set$605
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$606,LCFI82-Ltext0
-       .quad L$set$606
-       .set L$set$607,LFE44-Ltext0
-       .quad L$set$607
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST29:
-       .set L$set$608,LFB45-Ltext0
-       .quad L$set$608
-       .set L$set$609,LCFI84-Ltext0
-       .quad L$set$609
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$610,LCFI84-Ltext0
-       .quad L$set$610
-       .set L$set$611,LCFI85-Ltext0
-       .quad L$set$611
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$612,LCFI85-Ltext0
-       .quad L$set$612
-       .set L$set$613,LFE45-Ltext0
-       .quad L$set$613
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST30:
-       .set L$set$614,LFB46-Ltext0
-       .quad L$set$614
-       .set L$set$615,LCFI87-Ltext0
-       .quad L$set$615
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$616,LCFI87-Ltext0
-       .quad L$set$616
-       .set L$set$617,LCFI88-Ltext0
-       .quad L$set$617
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$618,LCFI88-Ltext0
-       .quad L$set$618
-       .set L$set$619,LFE46-Ltext0
-       .quad L$set$619
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST31:
-       .set L$set$620,LFB47-Ltext0
-       .quad L$set$620
-       .set L$set$621,LCFI90-Ltext0
-       .quad L$set$621
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$622,LCFI90-Ltext0
-       .quad L$set$622
-       .set L$set$623,LCFI91-Ltext0
-       .quad L$set$623
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$624,LCFI91-Ltext0
-       .quad L$set$624
-       .set L$set$625,LFE47-Ltext0
-       .quad L$set$625
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST32:
-       .set L$set$626,LFB48-Ltext0
-       .quad L$set$626
-       .set L$set$627,LCFI93-Ltext0
-       .quad L$set$627
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$628,LCFI93-Ltext0
-       .quad L$set$628
-       .set L$set$629,LCFI94-Ltext0
-       .quad L$set$629
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$630,LCFI94-Ltext0
-       .quad L$set$630
-       .set L$set$631,LFE48-Ltext0
-       .quad L$set$631
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST33:
-       .set L$set$632,LFB49-Ltext0
-       .quad L$set$632
-       .set L$set$633,LCFI96-Ltext0
-       .quad L$set$633
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$634,LCFI96-Ltext0
-       .quad L$set$634
-       .set L$set$635,LCFI97-Ltext0
-       .quad L$set$635
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$636,LCFI97-Ltext0
-       .quad L$set$636
-       .set L$set$637,LFE49-Ltext0
-       .quad L$set$637
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST34:
-       .set L$set$638,LFB50-Ltext0
-       .quad L$set$638
-       .set L$set$639,LCFI99-Ltext0
-       .quad L$set$639
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$640,LCFI99-Ltext0
-       .quad L$set$640
-       .set L$set$641,LCFI100-Ltext0
-       .quad L$set$641
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$642,LCFI100-Ltext0
-       .quad L$set$642
-       .set L$set$643,LFE50-Ltext0
-       .quad L$set$643
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST35:
-       .set L$set$644,LFB51-Ltext0
-       .quad L$set$644
-       .set L$set$645,LCFI102-Ltext0
-       .quad L$set$645
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$646,LCFI102-Ltext0
-       .quad L$set$646
-       .set L$set$647,LCFI103-Ltext0
-       .quad L$set$647
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$648,LCFI103-Ltext0
-       .quad L$set$648
-       .set L$set$649,LFE51-Ltext0
-       .quad L$set$649
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST36:
-       .set L$set$650,LFB52-Ltext0
-       .quad L$set$650
-       .set L$set$651,LCFI105-Ltext0
-       .quad L$set$651
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$652,LCFI105-Ltext0
-       .quad L$set$652
-       .set L$set$653,LCFI106-Ltext0
-       .quad L$set$653
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$654,LCFI106-Ltext0
-       .quad L$set$654
-       .set L$set$655,LFE52-Ltext0
-       .quad L$set$655
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST37:
-       .set L$set$656,LFB53-Ltext0
-       .quad L$set$656
-       .set L$set$657,LCFI108-Ltext0
-       .quad L$set$657
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$658,LCFI108-Ltext0
-       .quad L$set$658
-       .set L$set$659,LCFI109-Ltext0
-       .quad L$set$659
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$660,LCFI109-Ltext0
-       .quad L$set$660
-       .set L$set$661,LFE53-Ltext0
-       .quad L$set$661
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST38:
-       .set L$set$662,LFB54-Ltext0
-       .quad L$set$662
-       .set L$set$663,LCFI111-Ltext0
-       .quad L$set$663
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$664,LCFI111-Ltext0
-       .quad L$set$664
-       .set L$set$665,LCFI112-Ltext0
-       .quad L$set$665
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$666,LCFI112-Ltext0
-       .quad L$set$666
-       .set L$set$667,LFE54-Ltext0
-       .quad L$set$667
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST39:
-       .set L$set$668,LFB55-Ltext0
-       .quad L$set$668
-       .set L$set$669,LCFI114-Ltext0
-       .quad L$set$669
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$670,LCFI114-Ltext0
-       .quad L$set$670
-       .set L$set$671,LCFI115-Ltext0
-       .quad L$set$671
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$672,LCFI115-Ltext0
-       .quad L$set$672
-       .set L$set$673,LFE55-Ltext0
-       .quad L$set$673
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST40:
-       .set L$set$674,LFB56-Ltext0
-       .quad L$set$674
-       .set L$set$675,LCFI117-Ltext0
-       .quad L$set$675
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$676,LCFI117-Ltext0
-       .quad L$set$676
-       .set L$set$677,LCFI118-Ltext0
-       .quad L$set$677
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$678,LCFI118-Ltext0
-       .quad L$set$678
-       .set L$set$679,LFE56-Ltext0
-       .quad L$set$679
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST41:
-       .set L$set$680,LFB57-Ltext0
-       .quad L$set$680
-       .set L$set$681,LCFI120-Ltext0
-       .quad L$set$681
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$682,LCFI120-Ltext0
-       .quad L$set$682
-       .set L$set$683,LCFI121-Ltext0
-       .quad L$set$683
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$684,LCFI121-Ltext0
-       .quad L$set$684
-       .set L$set$685,LFE57-Ltext0
-       .quad L$set$685
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST42:
-       .set L$set$686,LFB58-Ltext0
-       .quad L$set$686
-       .set L$set$687,LCFI123-Ltext0
-       .quad L$set$687
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$688,LCFI123-Ltext0
-       .quad L$set$688
-       .set L$set$689,LCFI124-Ltext0
-       .quad L$set$689
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$690,LCFI124-Ltext0
-       .quad L$set$690
-       .set L$set$691,LFE58-Ltext0
-       .quad L$set$691
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST43:
-       .set L$set$692,LFB59-Ltext0
-       .quad L$set$692
-       .set L$set$693,LCFI126-Ltext0
-       .quad L$set$693
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$694,LCFI126-Ltext0
-       .quad L$set$694
-       .set L$set$695,LCFI127-Ltext0
-       .quad L$set$695
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$696,LCFI127-Ltext0
-       .quad L$set$696
-       .set L$set$697,LFE59-Ltext0
-       .quad L$set$697
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST44:
-       .set L$set$698,LFB60-Ltext0
-       .quad L$set$698
-       .set L$set$699,LCFI129-Ltext0
-       .quad L$set$699
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$700,LCFI129-Ltext0
-       .quad L$set$700
-       .set L$set$701,LCFI130-Ltext0
-       .quad L$set$701
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$702,LCFI130-Ltext0
-       .quad L$set$702
-       .set L$set$703,LFE60-Ltext0
-       .quad L$set$703
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST45:
-       .set L$set$704,LFB61-Ltext0
-       .quad L$set$704
-       .set L$set$705,LCFI132-Ltext0
-       .quad L$set$705
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$706,LCFI132-Ltext0
-       .quad L$set$706
-       .set L$set$707,LCFI133-Ltext0
-       .quad L$set$707
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$708,LCFI133-Ltext0
-       .quad L$set$708
-       .set L$set$709,LFE61-Ltext0
-       .quad L$set$709
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST46:
-       .set L$set$710,LFB62-Ltext0
-       .quad L$set$710
-       .set L$set$711,LCFI135-Ltext0
-       .quad L$set$711
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$712,LCFI135-Ltext0
-       .quad L$set$712
-       .set L$set$713,LCFI136-Ltext0
-       .quad L$set$713
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$714,LCFI136-Ltext0
-       .quad L$set$714
-       .set L$set$715,LFE62-Ltext0
-       .quad L$set$715
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-LLST47:
-       .set L$set$716,LFB63-Ltext0
-       .quad L$set$716
-       .set L$set$717,LCFI138-Ltext0
-       .quad L$set$717
-       .word   0x2
-       .byte   0x77
-       .byte   0x8
-       .set L$set$718,LCFI138-Ltext0
-       .quad L$set$718
-       .set L$set$719,LCFI139-Ltext0
-       .quad L$set$719
-       .word   0x2
-       .byte   0x77
-       .byte   0x10
-       .set L$set$720,LCFI139-Ltext0
-       .quad L$set$720
-       .set L$set$721,LFE63-Ltext0
-       .quad L$set$721
-       .word   0x2
-       .byte   0x76
-       .byte   0x10
-       .quad   0x0
-       .quad   0x0
-       .file 2 "/Users/fish/work/edk2/MdePkg/Include/X64/ProcessorBind.h"
-       .file 3 "/Users/fish/work/edk2/MdePkg/Include/Base.h"
-       .file 4 "<built-in>"
-       .file 5 "/Users/fish/work/edk2/MdePkg/Include/Uefi/UefiBaseType.h"
-       .file 6 "/usr/include/sys/termios.h"
-       .file 7 "/usr/include/i386/_types.h"
-       .file 8 "/usr/include/sys/_types.h"
-       .file 9 "/usr/include/stdio.h"
-       .file 10 "/usr/include/sys/_structs.h"
-       .file 11 "/usr/include/sys/time.h"
-       .file 12 "/usr/include/time.h"
-       .file 13 "/usr/include/sys/dirent.h"
-       .file 14 "/usr/include/dirent.h"
-       .file 15 "/usr/include/unistd.h"
-       .file 16 "/usr/include/sys/poll.h"
-       .file 17 "/usr/include/i386/types.h"
-       .file 18 "/usr/include/sys/types.h"
-       .file 19 "/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdint.h"
-       .file 20 "/usr/include/sys/mount.h"
-       .file 21 "/usr/include/utime.h"
-       .file 22 "/Users/fish/work/edk2/MdePkg/Include/Library/PeCoffLib.h"
-       .file 23 "/Users/fish/work/edk2/UnixPkg/Include/Protocol/UnixThunk.h"
-       .file 24 "/Users/fish/work/edk2/UnixPkg/Include/Protocol/UnixUgaIo.h"
-       .file 25 "/Users/fish/work/edk2/MdePkg/Include/Protocol/UgaDraw.h"
-       .file 26 "/Users/fish/work/edk2/MdePkg/Include/Protocol/SimpleTextIn.h"
-       .section __DWARF,__debug_info,regular,debug
-       .long   0x20dc
-       .word   0x2
-       .set L$set$722,Ldebug_abbrev0-Lsection__debug_abbrev
-       .long L$set$722
-       .byte   0x8
-       .byte   0x1
-       .ascii "GNU C 4.2.1 (Apple Inc. build 5664)\0"
-       .byte   0x1
-       .ascii "/Users/fish/work/edk2/UnixPkg/Sec/X64/GasketEfiTemplate.c\0"
-       .quad   Ltext0
-       .quad   Letext0
-       .set L$set$723,Ldebug_line0-Lsection__debug_line
-       .long L$set$723
-       .byte   0x2
-       .ascii "UINT64\0"
-       .byte   0x2
-       .byte   0x9b
-       .long   0x8d
-       .byte   0x3
-       .byte   0x8
-       .byte   0x7
-       .ascii "long long unsigned int\0"
-       .byte   0x3
-       .byte   0x8
-       .byte   0x5
-       .ascii "long long int\0"
-       .byte   0x2
-       .ascii "UINT32\0"
-       .byte   0x2
-       .byte   0xa3
-       .long   0xc6
-       .byte   0x3
-       .byte   0x4
-       .byte   0x7
-       .ascii "unsigned int\0"
-       .byte   0x3
-       .byte   0x4
-       .byte   0x5
-       .ascii "int\0"
-       .byte   0x2
-       .ascii "UINT16\0"
-       .byte   0x2
-       .byte   0xab
-       .long   0xeb
-       .byte   0x3
-       .byte   0x2
-       .byte   0x7
-       .ascii "short unsigned int\0"
-       .byte   0x2
-       .ascii "CHAR16\0"
-       .byte   0x2
-       .byte   0xb0
-       .long   0xeb
-       .byte   0x2
-       .ascii "INT16\0"
-       .byte   0x2
-       .byte   0xb4
-       .long   0x11c
-       .byte   0x3
-       .byte   0x2
-       .byte   0x5
-       .ascii "short int\0"
-       .byte   0x2
-       .ascii "BOOLEAN\0"
-       .byte   0x2
-       .byte   0xb9
-       .long   0x138
-       .byte   0x3
-       .byte   0x1
-       .byte   0x8
-       .ascii "unsigned char\0"
-       .byte   0x2
-       .ascii "UINT8\0"
-       .byte   0x2
-       .byte   0xbd
-       .long   0x138
-       .byte   0x2
-       .ascii "CHAR8\0"
-       .byte   0x2
-       .byte   0xc1
-       .long   0x163
-       .byte   0x3
-       .byte   0x1
-       .byte   0x6
-       .ascii "char\0"
-       .byte   0x2
-       .ascii "UINTN\0"
-       .byte   0x2
-       .byte   0xcc
-       .long   0x7f
-       .byte   0x4
-       .byte   0x8
-       .byte   0x7
-       .byte   0x2
-       .ascii "PHYSICAL_ADDRESS\0"
-       .byte   0x3
-       .byte   0x84
-       .long   0x7f
-       .byte   0x5
-       .ascii "VA_LIST\0"
-       .byte   0x3
-       .word   0x1d2
-       .long   0x1a3
-       .byte   0x6
-       .long   0x1b3
-       .long   0x1b3
-       .byte   0x7
-       .long   0x178
-       .byte   0x0
-       .byte   0x0
-       .byte   0x8
-       .ascii "__va_list_tag\0"
-       .byte   0x18
-       .byte   0x4
-       .byte   0x0
-       .long   0x226
-       .byte   0x9
-       .ascii "gp_offset\0"
-       .byte   0x4
-       .byte   0x0
-       .long   0xc6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "fp_offset\0"
-       .byte   0x4
-       .byte   0x0
-       .long   0xc6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x4
-       .byte   0x9
-       .ascii "overflow_arg_area\0"
-       .byte   0x4
-       .byte   0x0
-       .long   0x226
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "reg_save_area\0"
-       .byte   0x4
-       .byte   0x0
-       .long   0x226
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x0
-       .byte   0xa
-       .byte   0x8
-       .byte   0xb
-       .byte   0x8
-       .long   0x16b
-       .byte   0x5
-       .ascii "RETURN_STATUS\0"
-       .byte   0x3
-       .word   0x2a6
-       .long   0x16b
-       .byte   0x2
-       .ascii "EFI_STATUS\0"
-       .byte   0x5
-       .byte   0x1f
-       .long   0x22e
-       .byte   0xc
-       .byte   0x10
-       .byte   0x5
-       .byte   0x46
-       .long   0x316
-       .byte   0x9
-       .ascii "Year\0"
-       .byte   0x5
-       .byte   0x47
-       .long   0xdd
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "Month\0"
-       .byte   0x5
-       .byte   0x48
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x2
-       .byte   0x9
-       .ascii "Day\0"
-       .byte   0x5
-       .byte   0x49
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x3
-       .byte   0x9
-       .ascii "Hour\0"
-       .byte   0x5
-       .byte   0x4a
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x4
-       .byte   0x9
-       .ascii "Minute\0"
-       .byte   0x5
-       .byte   0x4b
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x5
-       .byte   0x9
-       .ascii "Second\0"
-       .byte   0x5
-       .byte   0x4c
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x6
-       .byte   0x9
-       .ascii "Pad1\0"
-       .byte   0x5
-       .byte   0x4d
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x7
-       .byte   0x9
-       .ascii "Nanosecond\0"
-       .byte   0x5
-       .byte   0x4e
-       .long   0xb8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "TimeZone\0"
-       .byte   0x5
-       .byte   0x4f
-       .long   0x10f
-       .byte   0x2
-       .byte   0x23
-       .byte   0xc
-       .byte   0x9
-       .ascii "Daylight\0"
-       .byte   0x5
-       .byte   0x50
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0xe
-       .byte   0x9
-       .ascii "Pad2\0"
-       .byte   0x5
-       .byte   0x51
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0xf
-       .byte   0x0
-       .byte   0x2
-       .ascii "EFI_TIME\0"
-       .byte   0x5
-       .byte   0x52
-       .long   0x256
-       .byte   0xb
-       .byte   0x8
-       .long   0x226
-       .byte   0x5
-       .ascii "tcflag_t\0"
-       .byte   0x6
-       .word   0x109
-       .long   0x33d
-       .byte   0x3
-       .byte   0x8
-       .byte   0x7
-       .ascii "long unsigned int\0"
-       .byte   0x5
-       .ascii "cc_t\0"
-       .byte   0x6
-       .word   0x10a
-       .long   0x138
-       .byte   0x5
-       .ascii "speed_t\0"
-       .byte   0x6
-       .word   0x10b
-       .long   0x33d
-       .byte   0xd
-       .ascii "termios\0"
-       .byte   0x48
-       .byte   0x6
-       .word   0x10d
-       .long   0x405
-       .byte   0xe
-       .ascii "c_iflag\0"
-       .byte   0x6
-       .word   0x10e
-       .long   0x32c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0xe
-       .ascii "c_oflag\0"
-       .byte   0x6
-       .word   0x10f
-       .long   0x32c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0xe
-       .ascii "c_cflag\0"
-       .byte   0x6
-       .word   0x110
-       .long   0x32c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0xe
-       .ascii "c_lflag\0"
-       .byte   0x6
-       .word   0x111
-       .long   0x32c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x18
-       .byte   0xe
-       .ascii "c_cc\0"
-       .byte   0x6
-       .word   0x112
-       .long   0x405
-       .byte   0x2
-       .byte   0x23
-       .byte   0x20
-       .byte   0xe
-       .ascii "c_ispeed\0"
-       .byte   0x6
-       .word   0x113
-       .long   0x35f
-       .byte   0x2
-       .byte   0x23
-       .byte   0x38
-       .byte   0xe
-       .ascii "c_ospeed\0"
-       .byte   0x6
-       .word   0x114
-       .long   0x35f
-       .byte   0x2
-       .byte   0x23
-       .byte   0x40
-       .byte   0x0
-       .byte   0x6
-       .long   0x352
-       .long   0x415
-       .byte   0x7
-       .long   0x178
-       .byte   0x13
-       .byte   0x0
-       .byte   0x3
-       .byte   0x1
-       .byte   0x6
-       .ascii "signed char\0"
-       .byte   0x2
-       .ascii "__uint8_t\0"
-       .byte   0x7
-       .byte   0x29
-       .long   0x138
-       .byte   0x2
-       .ascii "__uint16_t\0"
-       .byte   0x7
-       .byte   0x2b
-       .long   0xeb
-       .byte   0x2
-       .ascii "__int32_t\0"
-       .byte   0x7
-       .byte   0x2c
-       .long   0xd6
-       .byte   0x2
-       .ascii "__uint32_t\0"
-       .byte   0x7
-       .byte   0x2d
-       .long   0xc6
-       .byte   0x2
-       .ascii "__int64_t\0"
-       .byte   0x7
-       .byte   0x2e
-       .long   0xa7
-       .byte   0x2
-       .ascii "__uint64_t\0"
-       .byte   0x7
-       .byte   0x2f
-       .long   0x8d
-       .byte   0x3
-       .byte   0x8
-       .byte   0x5
-       .ascii "long int\0"
-       .byte   0x2
-       .ascii "__darwin_time_t\0"
-       .byte   0x7
-       .byte   0x76
-       .long   0x48d
-       .byte   0x6
-       .long   0x163
-       .long   0x4c0
-       .byte   0x7
-       .long   0x178
-       .byte   0x37
-       .byte   0x0
-       .byte   0x8
-       .ascii "_opaque_pthread_mutex_t\0"
-       .byte   0x40
-       .byte   0x8
-       .byte   0x43
-       .long   0x504
-       .byte   0x9
-       .ascii "__sig\0"
-       .byte   0x8
-       .byte   0x43
-       .long   0x48d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "__opaque\0"
-       .byte   0x8
-       .byte   0x43
-       .long   0x4b0
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x0
-       .byte   0x6
-       .long   0x163
-       .long   0x514
-       .byte   0x7
-       .long   0x178
-       .byte   0xf
-       .byte   0x0
-       .byte   0x2
-       .ascii "__darwin_blkcnt_t\0"
-       .byte   0x8
-       .byte   0x5e
-       .long   0x46a
-       .byte   0x2
-       .ascii "__darwin_blksize_t\0"
-       .byte   0x8
-       .byte   0x5f
-       .long   0x447
-       .byte   0x2
-       .ascii "__darwin_dev_t\0"
-       .byte   0x8
-       .byte   0x60
-       .long   0x447
-       .byte   0x2
-       .ascii "__darwin_gid_t\0"
-       .byte   0x8
-       .byte   0x63
-       .long   0x458
-       .byte   0x2
-       .ascii "__darwin_ino64_t\0"
-       .byte   0x8
-       .byte   0x65
-       .long   0x47b
-       .byte   0x2
-       .ascii "__darwin_mode_t\0"
-       .byte   0x8
-       .byte   0x6d
-       .long   0x435
-       .byte   0x2
-       .ascii "__darwin_off_t\0"
-       .byte   0x8
-       .byte   0x6e
-       .long   0x46a
-       .byte   0x2
-       .ascii "__darwin_pthread_mutex_t\0"
-       .byte   0x8
-       .byte   0x78
-       .long   0x4c0
-       .byte   0x2
-       .ascii "__darwin_uid_t\0"
-       .byte   0x8
-       .byte   0x85
-       .long   0x458
-       .byte   0x2
-       .ascii "off_t\0"
-       .byte   0x9
-       .byte   0x4b
-       .long   0x5a2
-       .byte   0xb
-       .byte   0x8
-       .long   0x163
-       .byte   0xb
-       .byte   0x8
-       .long   0x607
-       .byte   0xf
-       .long   0x163
-       .byte   0x8
-       .ascii "timespec\0"
-       .byte   0x10
-       .byte   0xa
-       .byte   0x59
-       .long   0x641
-       .byte   0x9
-       .ascii "tv_sec\0"
-       .byte   0xa
-       .byte   0x5a
-       .long   0x499
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "tv_nsec\0"
-       .byte   0xa
-       .byte   0x5b
-       .long   0x48d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x0
-       .byte   0x2
-       .ascii "time_t\0"
-       .byte   0xb
-       .byte   0x51
-       .long   0x499
-       .byte   0x8
-       .ascii "tm\0"
-       .byte   0x38
-       .byte   0xc
-       .byte   0x5a
-       .long   0x721
-       .byte   0x9
-       .ascii "tm_sec\0"
-       .byte   0xc
-       .byte   0x5b
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "tm_min\0"
-       .byte   0xc
-       .byte   0x5c
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x4
-       .byte   0x9
-       .ascii "tm_hour\0"
-       .byte   0xc
-       .byte   0x5d
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "tm_mday\0"
-       .byte   0xc
-       .byte   0x5e
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0xc
-       .byte   0x9
-       .ascii "tm_mon\0"
-       .byte   0xc
-       .byte   0x5f
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x9
-       .ascii "tm_year\0"
-       .byte   0xc
-       .byte   0x60
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x14
-       .byte   0x9
-       .ascii "tm_wday\0"
-       .byte   0xc
-       .byte   0x61
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x18
-       .byte   0x9
-       .ascii "tm_yday\0"
-       .byte   0xc
-       .byte   0x62
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x1c
-       .byte   0x9
-       .ascii "tm_isdst\0"
-       .byte   0xc
-       .byte   0x63
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x20
-       .byte   0x9
-       .ascii "tm_gmtoff\0"
-       .byte   0xc
-       .byte   0x64
-       .long   0x48d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x28
-       .byte   0x9
-       .ascii "tm_zone\0"
-       .byte   0xc
-       .byte   0x65
-       .long   0x5fb
-       .byte   0x2
-       .byte   0x23
-       .byte   0x30
-       .byte   0x0
-       .byte   0x10
-       .ascii "dirent\0"
-       .word   0x418
-       .byte   0xd
-       .byte   0x73
-       .long   0x79e
-       .byte   0x9
-       .ascii "d_ino\0"
-       .byte   0xd
-       .byte   0x73
-       .long   0x47b
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "d_seekoff\0"
-       .byte   0xd
-       .byte   0x73
-       .long   0x47b
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "d_reclen\0"
-       .byte   0xd
-       .byte   0x73
-       .long   0x435
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x9
-       .ascii "d_namlen\0"
-       .byte   0xd
-       .byte   0x73
-       .long   0x435
-       .byte   0x2
-       .byte   0x23
-       .byte   0x12
-       .byte   0x9
-       .ascii "d_type\0"
-       .byte   0xd
-       .byte   0x73
-       .long   0x424
-       .byte   0x2
-       .byte   0x23
-       .byte   0x14
-       .byte   0x9
-       .ascii "d_name\0"
-       .byte   0xd
-       .byte   0x73
-       .long   0x79e
-       .byte   0x2
-       .byte   0x23
-       .byte   0x15
-       .byte   0x0
-       .byte   0x6
-       .long   0x163
-       .long   0x7af
-       .byte   0x11
-       .long   0x178
-       .word   0x3ff
-       .byte   0x0
-       .byte   0xc
-       .byte   0x88
-       .byte   0xe
-       .byte   0x47
-       .long   0x87d
-       .byte   0x9
-       .ascii "__dd_fd\0"
-       .byte   0xe
-       .byte   0x48
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "__dd_loc\0"
-       .byte   0xe
-       .byte   0x49
-       .long   0x48d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "__dd_size\0"
-       .byte   0xe
-       .byte   0x4a
-       .long   0x48d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x9
-       .ascii "__dd_buf\0"
-       .byte   0xe
-       .byte   0x4b
-       .long   0x5fb
-       .byte   0x2
-       .byte   0x23
-       .byte   0x18
-       .byte   0x9
-       .ascii "__dd_len\0"
-       .byte   0xe
-       .byte   0x4c
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x20
-       .byte   0x9
-       .ascii "__dd_seek\0"
-       .byte   0xe
-       .byte   0x4d
-       .long   0x48d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x28
-       .byte   0x9
-       .ascii "__dd_rewind\0"
-       .byte   0xe
-       .byte   0x4e
-       .long   0x48d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x30
-       .byte   0x9
-       .ascii "__dd_flags\0"
-       .byte   0xe
-       .byte   0x4f
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x38
-       .byte   0x9
-       .ascii "__dd_lock\0"
-       .byte   0xe
-       .byte   0x50
-       .long   0x5b8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x40
-       .byte   0x9
-       .ascii "__dd_td\0"
-       .byte   0xe
-       .byte   0x51
-       .long   0x888
-       .byte   0x3
-       .byte   0x23
-       .byte   0x80,0x1
-       .byte   0x0
-       .byte   0x12
-       .ascii "_telldir\0"
-       .byte   0x1
-       .byte   0xb
-       .byte   0x8
-       .long   0x87d
-       .byte   0x2
-       .ascii "DIR\0"
-       .byte   0xe
-       .byte   0x52
-       .long   0x7af
-       .byte   0x2
-       .ascii "dev_t\0"
-       .byte   0xf
-       .byte   0x4d
-       .long   0x547
-       .byte   0x2
-       .ascii "gid_t\0"
-       .byte   0xf
-       .byte   0x53
-       .long   0x55d
-       .byte   0x2
-       .ascii "mode_t\0"
-       .byte   0xf
-       .byte   0x5e
-       .long   0x58b
-       .byte   0x2
-       .ascii "uid_t\0"
-       .byte   0xf
-       .byte   0x7a
-       .long   0x5d8
-       .byte   0x8
-       .ascii "pollfd\0"
-       .byte   0x8
-       .byte   0x10
-       .byte   0x61
-       .long   0x90e
-       .byte   0x9
-       .ascii "fd\0"
-       .byte   0x10
-       .byte   0x62
-       .long   0xd6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "events\0"
-       .byte   0x10
-       .byte   0x63
-       .long   0x11c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x4
-       .byte   0x9
-       .ascii "revents\0"
-       .byte   0x10
-       .byte   0x64
-       .long   0x11c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x6
-       .byte   0x0
-       .byte   0x2
-       .ascii "int32_t\0"
-       .byte   0x11
-       .byte   0x58
-       .long   0xd6
-       .byte   0x2
-       .ascii "blkcnt_t\0"
-       .byte   0x12
-       .byte   0x6e
-       .long   0x514
-       .byte   0x2
-       .ascii "blksize_t\0"
-       .byte   0x12
-       .byte   0x73
-       .long   0x52d
-       .byte   0x2
-       .ascii "nlink_t\0"
-       .byte   0x12
-       .byte   0x9d
-       .long   0x435
-       .byte   0x6
-       .long   0x46a
-       .long   0x95d
-       .byte   0x7
-       .long   0x178
-       .byte   0x1
-       .byte   0x0
-       .byte   0x2
-       .ascii "uint32_t\0"
-       .byte   0x13
-       .byte   0x32
-       .long   0xc6
-       .byte   0x2
-       .ascii "uint64_t\0"
-       .byte   0x13
-       .byte   0x37
-       .long   0x8d
-       .byte   0x8
-       .ascii "fsid\0"
-       .byte   0x8
-       .byte   0x14
-       .byte   0x53
-       .long   0x999
-       .byte   0x9
-       .ascii "val\0"
-       .byte   0x14
-       .byte   0x53
-       .long   0x999
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x0
-       .byte   0x6
-       .long   0x90e
-       .long   0x9a9
-       .byte   0x7
-       .long   0x178
-       .byte   0x1
-       .byte   0x0
-       .byte   0x2
-       .ascii "fsid_t\0"
-       .byte   0x14
-       .byte   0x53
-       .long   0x97d
-       .byte   0x6
-       .long   0x95d
-       .long   0x9c7
-       .byte   0x7
-       .long   0x178
-       .byte   0x7
-       .byte   0x0
-       .byte   0x10
-       .ascii "statfs\0"
-       .word   0x878
-       .byte   0x14
-       .byte   0x7d
-       .long   0xb11
-       .byte   0x9
-       .ascii "f_bsize\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x95d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "f_iosize\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x90e
-       .byte   0x2
-       .byte   0x23
-       .byte   0x4
-       .byte   0x9
-       .ascii "f_blocks\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x96d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "f_bfree\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x96d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x9
-       .ascii "f_bavail\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x96d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x18
-       .byte   0x9
-       .ascii "f_files\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x96d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x20
-       .byte   0x9
-       .ascii "f_ffree\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x96d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x28
-       .byte   0x9
-       .ascii "f_fsid\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x9a9
-       .byte   0x2
-       .byte   0x23
-       .byte   0x30
-       .byte   0x9
-       .ascii "f_owner\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x8c1
-       .byte   0x2
-       .byte   0x23
-       .byte   0x38
-       .byte   0x9
-       .ascii "f_type\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x95d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x3c
-       .byte   0x9
-       .ascii "f_flags\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x95d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x40
-       .byte   0x9
-       .ascii "f_fssubtype\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x95d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x44
-       .byte   0x9
-       .ascii "f_fstypename\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x504
-       .byte   0x2
-       .byte   0x23
-       .byte   0x48
-       .byte   0x9
-       .ascii "f_mntonname\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x79e
-       .byte   0x2
-       .byte   0x23
-       .byte   0x58
-       .byte   0x9
-       .ascii "f_mntfromname\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x79e
-       .byte   0x3
-       .byte   0x23
-       .byte   0xd8,0x8
-       .byte   0x9
-       .ascii "f_reserved\0"
-       .byte   0x14
-       .byte   0x7d
-       .long   0x9b7
-       .byte   0x3
-       .byte   0x23
-       .byte   0xd8,0x10
-       .byte   0x0
-       .byte   0x8
-       .ascii "utimbuf\0"
-       .byte   0x10
-       .byte   0x15
-       .byte   0x44
-       .long   0xb45
-       .byte   0x9
-       .ascii "actime\0"
-       .byte   0x15
-       .byte   0x45
-       .long   0x641
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "modtime\0"
-       .byte   0x15
-       .byte   0x46
-       .long   0x641
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x0
-       .byte   0x2
-       .ascii "PE_COFF_LOADER_READ_FILE\0"
-       .byte   0x16
-       .byte   0x4b
-       .long   0xb65
-       .byte   0xb
-       .byte   0x8
-       .long   0xb6b
-       .byte   0x13
-       .byte   0x1
-       .long   0x22e
-       .long   0xb8a
-       .byte   0x14
-       .long   0x226
-       .byte   0x14
-       .long   0x16b
-       .byte   0x14
-       .long   0x228
-       .byte   0x14
-       .long   0x226
-       .byte   0x0
-       .byte   0xc
-       .byte   0x90
-       .byte   0x16
-       .byte   0x50
-       .long   0xdaa
-       .byte   0x9
-       .ascii "ImageAddress\0"
-       .byte   0x16
-       .byte   0x54
-       .long   0x17b
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "ImageSize\0"
-       .byte   0x16
-       .byte   0x59
-       .long   0x7f
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "DestinationAddress\0"
-       .byte   0x16
-       .byte   0x60
-       .long   0x17b
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x15
-       .set L$set$724,LASF0-Lsection__debug_str
-       .long L$set$724
-       .byte   0x16
-       .byte   0x64
-       .long   0x17b
-       .byte   0x2
-       .byte   0x23
-       .byte   0x18
-       .byte   0x9
-       .ascii "ImageRead\0"
-       .byte   0x16
-       .byte   0x69
-       .long   0xb45
-       .byte   0x2
-       .byte   0x23
-       .byte   0x20
-       .byte   0x9
-       .ascii "Handle\0"
-       .byte   0x16
-       .byte   0x6d
-       .long   0x226
-       .byte   0x2
-       .byte   0x23
-       .byte   0x28
-       .byte   0x9
-       .ascii "FixupData\0"
-       .byte   0x16
-       .byte   0x74
-       .long   0x226
-       .byte   0x2
-       .byte   0x23
-       .byte   0x30
-       .byte   0x9
-       .ascii "SectionAlignment\0"
-       .byte   0x16
-       .byte   0x79
-       .long   0xb8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x38
-       .byte   0x9
-       .ascii "PeCoffHeaderOffset\0"
-       .byte   0x16
-       .byte   0x7f
-       .long   0xb8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x3c
-       .byte   0x9
-       .ascii "DebugDirectoryEntryRva\0"
-       .byte   0x16
-       .byte   0x84
-       .long   0xb8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x40
-       .byte   0x9
-       .ascii "CodeView\0"
-       .byte   0x16
-       .byte   0x88
-       .long   0x226
-       .byte   0x2
-       .byte   0x23
-       .byte   0x48
-       .byte   0x9
-       .ascii "PdbPointer\0"
-       .byte   0x16
-       .byte   0x8e
-       .long   0xdaa
-       .byte   0x2
-       .byte   0x23
-       .byte   0x50
-       .byte   0x9
-       .ascii "SizeOfHeaders\0"
-       .byte   0x16
-       .byte   0x92
-       .long   0x16b
-       .byte   0x2
-       .byte   0x23
-       .byte   0x58
-       .byte   0x9
-       .ascii "ImageCodeMemoryType\0"
-       .byte   0x16
-       .byte   0x99
-       .long   0xb8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x60
-       .byte   0x9
-       .ascii "ImageDataMemoryType\0"
-       .byte   0x16
-       .byte   0xa0
-       .long   0xb8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x64
-       .byte   0x9
-       .ascii "ImageError\0"
-       .byte   0x16
-       .byte   0xa4
-       .long   0xb8
-       .byte   0x2
-       .byte   0x23
-       .byte   0x68
-       .byte   0x9
-       .ascii "FixupDataSize\0"
-       .byte   0x16
-       .byte   0xa9
-       .long   0x16b
-       .byte   0x2
-       .byte   0x23
-       .byte   0x70
-       .byte   0x9
-       .ascii "Machine\0"
-       .byte   0x16
-       .byte   0xad
-       .long   0xdd
-       .byte   0x2
-       .byte   0x23
-       .byte   0x78
-       .byte   0x9
-       .ascii "ImageType\0"
-       .byte   0x16
-       .byte   0xb1
-       .long   0xdd
-       .byte   0x2
-       .byte   0x23
-       .byte   0x7a
-       .byte   0x9
-       .ascii "RelocationsStripped\0"
-       .byte   0x16
-       .byte   0xb6
-       .long   0x129
-       .byte   0x2
-       .byte   0x23
-       .byte   0x7c
-       .byte   0x9
-       .ascii "IsTeImage\0"
-       .byte   0x16
-       .byte   0xbc
-       .long   0x129
-       .byte   0x2
-       .byte   0x23
-       .byte   0x7d
-       .byte   0x9
-       .ascii "HiiResourceData\0"
-       .byte   0x16
-       .byte   0xc2
-       .long   0x17b
-       .byte   0x3
-       .byte   0x23
-       .byte   0x80,0x1
-       .byte   0x9
-       .ascii "Context\0"
-       .byte   0x16
-       .byte   0xc6
-       .long   0x7f
-       .byte   0x3
-       .byte   0x23
-       .byte   0x88,0x1
-       .byte   0x0
-       .byte   0xb
-       .byte   0x8
-       .long   0x156
-       .byte   0x2
-       .ascii "PE_COFF_LOADER_IMAGE_CONTEXT\0"
-       .byte   0x16
-       .byte   0xc7
-       .long   0xb8a
-       .byte   0x8
-       .ascii "stat_fix\0"
-       .byte   0x90
-       .byte   0x17
-       .byte   0x53
-       .long   0xf49
-       .byte   0x9
-       .ascii "st_dev\0"
-       .byte   0x17
-       .byte   0x53
-       .long   0x899
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "st_mode\0"
-       .byte   0x17
-       .byte   0x55
-       .long   0x8b3
-       .byte   0x2
-       .byte   0x23
-       .byte   0x4
-       .byte   0x9
-       .ascii "st_nlink\0"
-       .byte   0x17
-       .byte   0x56
-       .long   0x93e
-       .byte   0x2
-       .byte   0x23
-       .byte   0x6
-       .byte   0x9
-       .ascii "st_ino\0"
-       .byte   0x17
-       .byte   0x57
-       .long   0x573
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "st_uid\0"
-       .byte   0x17
-       .byte   0x58
-       .long   0x8c1
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x9
-       .ascii "st_gid\0"
-       .byte   0x17
-       .byte   0x59
-       .long   0x8a6
-       .byte   0x2
-       .byte   0x23
-       .byte   0x14
-       .byte   0x9
-       .ascii "st_rdev\0"
-       .byte   0x17
-       .byte   0x5a
-       .long   0x899
-       .byte   0x2
-       .byte   0x23
-       .byte   0x18
-       .byte   0x9
-       .ascii "st_atimespec\0"
-       .byte   0x17
-       .byte   0x5b
-       .long   0x60c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x20
-       .byte   0x9
-       .ascii "st_mtimespec\0"
-       .byte   0x17
-       .byte   0x5b
-       .long   0x60c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x30
-       .byte   0x9
-       .ascii "st_ctimespec\0"
-       .byte   0x17
-       .byte   0x5b
-       .long   0x60c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x40
-       .byte   0x9
-       .ascii "st_birthtimespec\0"
-       .byte   0x17
-       .byte   0x5b
-       .long   0x60c
-       .byte   0x2
-       .byte   0x23
-       .byte   0x50
-       .byte   0x9
-       .ascii "st_size\0"
-       .byte   0x17
-       .byte   0x5c
-       .long   0x5ee
-       .byte   0x2
-       .byte   0x23
-       .byte   0x60
-       .byte   0x9
-       .ascii "st_blocks\0"
-       .byte   0x17
-       .byte   0x5d
-       .long   0x91d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x68
-       .byte   0x9
-       .ascii "st_blksize\0"
-       .byte   0x17
-       .byte   0x5e
-       .long   0x92d
-       .byte   0x2
-       .byte   0x23
-       .byte   0x70
-       .byte   0x9
-       .ascii "st_flags\0"
-       .byte   0x17
-       .byte   0x5f
-       .long   0x458
-       .byte   0x2
-       .byte   0x23
-       .byte   0x74
-       .byte   0x9
-       .ascii "st_gen\0"
-       .byte   0x17
-       .byte   0x60
-       .long   0x458
-       .byte   0x2
-       .byte   0x23
-       .byte   0x78
-       .byte   0x9
-       .ascii "st_lspare\0"
-       .byte   0x17
-       .byte   0x61
-       .long   0x447
-       .byte   0x2
-       .byte   0x23
-       .byte   0x7c
-       .byte   0x9
-       .ascii "st_qspare\0"
-       .byte   0x17
-       .byte   0x62
-       .long   0x94d
-       .byte   0x3
-       .byte   0x23
-       .byte   0x80,0x1
-       .byte   0x0
-       .byte   0x2
-       .ascii "STAT_FIX\0"
-       .byte   0x17
-       .byte   0x63
-       .long   0xdd4
-       .byte   0xb
-       .byte   0x8
-       .long   0xf5f
-       .byte   0x16
-       .byte   0x1
-       .long   0xf6b
-       .byte   0x14
-       .long   0x7f
-       .byte   0x0
-       .byte   0xb
-       .byte   0x8
-       .long   0x316
-       .byte   0xb
-       .byte   0x8
-       .long   0x64f
-       .byte   0xb
-       .byte   0x8
-       .long   0xf7d
-       .byte   0xf
-       .long   0x641
-       .byte   0xb
-       .byte   0x8
-       .long   0x8ce
-       .byte   0xb
-       .byte   0x8
-       .long   0xf8e
-       .byte   0x17
-       .byte   0x2
-       .ascii "UnixRmDir\0"
-       .byte   0x17
-       .byte   0xf2
-       .long   0xfa0
-       .byte   0xb
-       .byte   0x8
-       .long   0xfa6
-       .byte   0x13
-       .byte   0x1
-       .long   0xd6
-       .long   0xfb6
-       .byte   0x14
-       .long   0x601
-       .byte   0x0
-       .byte   0x2
-       .ascii "UnixOpenDir\0"
-       .byte   0x17
-       .byte   0xfe
-       .long   0xfc9
-       .byte   0xb
-       .byte   0x8
-       .long   0xfcf
-       .byte   0x13
-       .byte   0x1
-       .long   0xfdf
-       .long   0xfdf
-       .byte   0x14
-       .long   0x601
-       .byte   0x0
-       .byte   0xb
-       .byte   0x8
-       .long   0x88e
-       .byte   0xb
-       .byte   0x8
-       .long   0x721
-       .byte   0x5
-       .ascii "UnixStat\0"
-       .byte   0x17
-       .word   0x10e
-       .long   0xffc
-       .byte   0xb
-       .byte   0x8
-       .long   0x1002
-       .byte   0x13
-       .byte   0x1
-       .long   0xd6
-       .long   0x1017
-       .byte   0x14
-       .long   0x601
-       .byte   0x14
-       .long   0x1017
-       .byte   0x0
-       .byte   0xb
-       .byte   0x8
-       .long   0xf49
-       .byte   0x5
-       .ascii "UnixStatFs\0"
-       .byte   0x17
-       .word   0x112
-       .long   0x1030
-       .byte   0xb
-       .byte   0x8
-       .long   0x1036
-       .byte   0x13
-       .byte   0x1
-       .long   0xd6
-       .long   0x104b
-       .byte   0x14
-       .long   0x601
-       .byte   0x14
-       .long   0x104b
-       .byte   0x0
-       .byte   0xb
-       .byte   0x8
-       .long   0x9c7
-       .byte   0xb
-       .byte   0x8
-       .long   0x1057
-       .byte   0x18
-       .ascii "utimbuf\0"
-       .long   0xb11
-       .byte   0xb
-       .byte   0x8
-       .long   0x106a
-       .byte   0xb
-       .byte   0x8
-       .long   0x1070
-       .byte   0xd
-       .ascii "_EFI_UNIX_UGA_IO_PROTOCOL\0"
-       .byte   0x30
-       .byte   0x17
-       .word   0x128
-       .long   0x1106
-       .byte   0x9
-       .ascii "Private\0"
-       .byte   0x18
-       .byte   0x46
-       .long   0x226
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "UgaClose\0"
-       .byte   0x18
-       .byte   0x47
-       .long   0x128f
-       .byte   0x2
-       .byte   0x23
-       .byte   0x8
-       .byte   0x9
-       .ascii "UgaSize\0"
-       .byte   0x18
-       .byte   0x48
-       .long   0x12bb
-       .byte   0x2
-       .byte   0x23
-       .byte   0x10
-       .byte   0x9
-       .ascii "UgaCheckKey\0"
-       .byte   0x18
-       .byte   0x49
-       .long   0x12ea
-       .byte   0x2
-       .byte   0x23
-       .byte   0x18
-       .byte   0x9
-       .ascii "UgaGetKey\0"
-       .byte   0x18
-       .byte   0x4a
-       .long   0x12fd
-       .byte   0x2
-       .byte   0x23
-       .byte   0x20
-       .byte   0x9
-       .ascii "UgaBlt\0"
-       .byte   0x18
-       .byte   0x4b
-       .long   0x1329
-       .byte   0x2
-       .byte   0x23
-       .byte   0x28
-       .byte   0x0
-       .byte   0xb
-       .byte   0x8
-       .long   0x110c
-       .byte   0xf
-       .long   0x101
-       .byte   0xb
-       .byte   0x8
-       .long   0x36f
-       .byte   0xb
-       .byte   0x8
-       .long   0x111d
-       .byte   0x18
-       .ascii "termios\0"
-       .long   0x36f
-       .byte   0xb
-       .byte   0x8
-       .long   0xdb0
-       .byte   0xc
-       .byte   0x4
-       .byte   0x19
-       .byte   0x4b
-       .long   0x1179
-       .byte   0x9
-       .ascii "Blue\0"
-       .byte   0x19
-       .byte   0x4c
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "Green\0"
-       .byte   0x19
-       .byte   0x4d
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x1
-       .byte   0x9
-       .ascii "Red\0"
-       .byte   0x19
-       .byte   0x4e
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x2
-       .byte   0x9
-       .ascii "Reserved\0"
-       .byte   0x19
-       .byte   0x4f
-       .long   0x149
-       .byte   0x2
-       .byte   0x23
-       .byte   0x3
-       .byte   0x0
-       .byte   0x2
-       .ascii "EFI_UGA_PIXEL\0"
-       .byte   0x19
-       .byte   0x50
-       .long   0x1130
-       .byte   0x19
-       .byte   0x4
-       .byte   0x19
-       .byte   0x5a
-       .long   0x11ff
-       .byte   0x1a
-       .ascii "EfiUgaVideoFill\0"
-       .byte   0x0
-       .byte   0x1a
-       .ascii "EfiUgaVideoToBltBuffer\0"
-       .byte   0x1
-       .byte   0x1a
-       .ascii "EfiUgaBltBufferToVideo\0"
-       .byte   0x2
-       .byte   0x1a
-       .ascii "EfiUgaVideoToVideo\0"
-       .byte   0x3
-       .byte   0x1a
-       .ascii "EfiUgaBltMax\0"
-       .byte   0x4
-       .byte   0x0
-       .byte   0x2
-       .ascii "EFI_UGA_BLT_OPERATION\0"
-       .byte   0x19
-       .byte   0x75
-       .long   0x118e
-       .byte   0xb
-       .byte   0x8
-       .long   0x1179
-       .byte   0xc
-       .byte   0x4
-       .byte   0x1a
-       .byte   0x29
-       .long   0x1254
-       .byte   0x9
-       .ascii "ScanCode\0"
-       .byte   0x1a
-       .byte   0x2a
-       .long   0xdd
-       .byte   0x2
-       .byte   0x23
-       .byte   0x0
-       .byte   0x9
-       .ascii "UnicodeChar\0"
-       .byte   0x1a
-       .byte   0x2b
-       .long   0x101
-       .byte   0x2
-       .byte   0x23
-       .byte   0x2
-       .byte   0x0
-       .byte   0x2
-       .ascii "EFI_INPUT_KEY\0"
-       .byte   0x1a
-       .byte   0x2c
-       .long   0x1222
-       .byte   0xb
-       .byte   0x8
-       .long   0x1254
-       .byte   0x2
-       .ascii "EFI_UNIX_UGA_IO_PROTOCOL\0"
-       .byte   0x18
-       .byte   0x19
-       .long   0x1070
-       .byte   0x2
-       .ascii "UGAClose\0"
-       .byte   0x18
-       .byte   0x1f
-       .long   0x129f
-       .byte   0xb
-       .byte   0x8
-       .long   0x12a5
-       .byte   0x13
-       .byte   0x1
-       .long   0x244
-       .long   0x12b5
-       .byte   0x14
-       .long   0x12b5
-       .byte   0x0
-       .byte   0xb
-       .byte   0x8
-       .long   0x126f
-       .byte   0x2
-       .ascii "UGASize\0"
-       .byte   0x18
-       .byte   0x27
-       .long   0x12ca
-       .byte   0xb
-       .byte   0x8
-       .long   0x12d0
-       .byte   0x13
-       .byte   0x1
-       .long   0x244
-       .long   0x12ea
-       .byte   0x14
-       .long   0x12b5
-       .byte   0x14
-       .long   0xb8
-       .byte   0x14
-       .long   0xb8
-       .byte   0x0
-       .byte   0x2
-       .ascii "UGACheckKey\0"
-       .byte   0x18
-       .byte   0x2d
-       .long   0x129f
-       .byte   0x2
-       .ascii "UGAGetKey\0"
-       .byte   0x18
-       .byte   0x34
-       .long   0x130e
-       .byte   0xb
-       .byte   0x8
-       .long   0x1314
-       .byte   0x13
-       .byte   0x1
-       .long   0x244
-       .long   0x1329
-       .byte   0x14
-       .long   0x12b5
-       .byte   0x14
-       .long   0x1269
-       .byte   0x0
-       .byte   0x2
-       .ascii "UGABlt\0"
-       .byte   0x18
-       .byte   0x43
-       .long   0x1337
-       .byte   0xb
-       .byte   0x8
-       .long   0x133d
-       .byte   0x13
-       .byte   0x1
-       .long   0x244
-       .long   0x137a
-       .byte   0x14
-       .long   0x12b5
-       .byte   0x14
-       .long   0x121c
-       .byte   0x14
-       .long   0x11ff
-       .byte   0x14
-       .long   0x16b
-       .byte   0x14
-       .long   0x16b
-       .byte   0x14
-       .long   0x16b
-       .byte   0x14
-       .long   0x16b
-       .byte   0x14
-       .long   0x16b
-       .byte   0x14
-       .long   0x16b
-       .byte   0x14
-       .long   0x16b
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$725,LASF1-Lsection__debug_str
-       .long L$set$725
-       .byte   0x1
-       .byte   0x23
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB16
-       .quad   LFE16
-       .set L$set$726,LLST0-Lsection__debug_loc
-       .long L$set$726
-       .long   0x13ae
-       .byte   0x1c
-       .set L$set$727,LASF3-Lsection__debug_str
-       .long L$set$727
-       .byte   0x1
-       .byte   0x22
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$728,LASF2-Lsection__debug_str
-       .long L$set$728
-       .byte   0x1
-       .byte   0x2a
-       .byte   0x1
-       .long   0xfdf
-       .quad   LFB17
-       .quad   LFE17
-       .set L$set$729,LLST1-Lsection__debug_loc
-       .long L$set$729
-       .long   0x13e2
-       .byte   0x1c
-       .set L$set$730,LASF3-Lsection__debug_str
-       .long L$set$730
-       .byte   0x1
-       .byte   0x29
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$731,LASF4-Lsection__debug_str
-       .long L$set$731
-       .byte   0x1
-       .byte   0x31
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB18
-       .quad   LFE18
-       .set L$set$732,LLST2-Lsection__debug_loc
-       .long L$set$732
-       .long   0x1425
-       .byte   0x1d
-       .ascii "path\0"
-       .byte   0x1
-       .byte   0x30
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "buf\0"
-       .byte   0x1
-       .byte   0x30
-       .long   0x1017
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$733,LASF5-Lsection__debug_str
-       .long L$set$733
-       .byte   0x1
-       .byte   0x38
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB19
-       .quad   LFE19
-       .set L$set$734,LLST3-Lsection__debug_loc
-       .long L$set$734
-       .long   0x1468
-       .byte   0x1d
-       .ascii "path\0"
-       .byte   0x1
-       .byte   0x37
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "buf\0"
-       .byte   0x1
-       .byte   0x37
-       .long   0x104b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1e
-       .byte   0x1
-       .set L$set$735,LASF6-Lsection__debug_str
-       .long L$set$735
-       .byte   0x1
-       .byte   0x41
-       .byte   0x1
-       .quad   LFB20
-       .quad   LFE20
-       .set L$set$736,LLST4-Lsection__debug_loc
-       .long L$set$736
-       .long   0x14a1
-       .byte   0x1d
-       .ascii "Milliseconds\0"
-       .byte   0x1
-       .byte   0x40
-       .long   0x33d
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1e
-       .byte   0x1
-       .set L$set$737,LASF7-Lsection__debug_str
-       .long L$set$737
-       .byte   0x1
-       .byte   0x48
-       .byte   0x1
-       .quad   LFB21
-       .quad   LFE21
-       .set L$set$738,LLST5-Lsection__debug_loc
-       .long L$set$738
-       .long   0x14d4
-       .byte   0x1d
-       .ascii "status\0"
-       .byte   0x1
-       .byte   0x47
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x0
-       .byte   0x1e
-       .byte   0x1
-       .set L$set$739,LASF8-Lsection__debug_str
-       .long L$set$739
-       .byte   0x1
-       .byte   0x50
-       .byte   0x1
-       .quad   LFB22
-       .quad   LFE22
-       .set L$set$740,LLST6-Lsection__debug_loc
-       .long L$set$740
-       .long   0x151c
-       .byte   0x1d
-       .ascii "PeriodMs\0"
-       .byte   0x1
-       .byte   0x4f
-       .long   0x7f
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "CallBack\0"
-       .byte   0x1
-       .byte   0x4f
-       .long   0xf59
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1e
-       .byte   0x1
-       .set L$set$741,LASF9-Lsection__debug_str
-       .long L$set$741
-       .byte   0x1
-       .byte   0x58
-       .byte   0x1
-       .quad   LFB23
-       .quad   LFE23
-       .set L$set$742,LLST7-Lsection__debug_loc
-       .long L$set$742
-       .long   0x154d
-       .byte   0x1d
-       .ascii "Time\0"
-       .byte   0x1
-       .byte   0x57
-       .long   0xf6b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$743,LASF10-Lsection__debug_str
-       .long L$set$743
-       .byte   0x1
-       .byte   0x60
-       .byte   0x1
-       .long   0xf71
-       .quad   LFB24
-       .quad   LFE24
-       .set L$set$744,LLST8-Lsection__debug_loc
-       .long L$set$744
-       .long   0x1583
-       .byte   0x1d
-       .ascii "clock\0"
-       .byte   0x1
-       .byte   0x5f
-       .long   0xf77
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1f
-       .byte   0x1
-       .set L$set$745,LASF11-Lsection__debug_str
-       .long L$set$745
-       .byte   0x1
-       .byte   0x67
-       .byte   0x1
-       .long   0x48d
-       .quad   LFB25
-       .quad   LFE25
-       .set L$set$746,LLST9-Lsection__debug_loc
-       .long L$set$746
-       .byte   0x1f
-       .byte   0x1
-       .set L$set$747,LASF12-Lsection__debug_str
-       .long L$set$747
-       .byte   0x1
-       .byte   0x6e
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB26
-       .quad   LFE26
-       .set L$set$748,LLST10-Lsection__debug_loc
-       .long L$set$748
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$749,LASF13-Lsection__debug_str
-       .long L$set$749
-       .byte   0x1
-       .byte   0x75
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB27
-       .quad   LFE27
-       .set L$set$750,LLST11-Lsection__debug_loc
-       .long L$set$750
-       .long   0x161a
-       .byte   0x1d
-       .ascii "pfd\0"
-       .byte   0x1
-       .byte   0x74
-       .long   0xf82
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "nfds\0"
-       .byte   0x1
-       .byte   0x74
-       .long   0xc6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x64
-       .byte   0x1d
-       .ascii "timeout\0"
-       .byte   0x1
-       .byte   0x74
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$751,LASF14-Lsection__debug_str
-       .long L$set$751
-       .byte   0x1
-       .byte   0x7c
-       .byte   0x1
-       .long   0x48d
-       .quad   LFB28
-       .quad   LFE28
-       .set L$set$752,LLST12-Lsection__debug_loc
-       .long L$set$752
-       .long   0x166b
-       .byte   0x1d
-       .ascii "fd\0"
-       .byte   0x1
-       .byte   0x7b
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x1d
-       .ascii "buf\0"
-       .byte   0x1
-       .byte   0x7b
-       .long   0x226
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x1d
-       .ascii "count\0"
-       .byte   0x1
-       .byte   0x7b
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x5c
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$753,LASF15-Lsection__debug_str
-       .long L$set$753
-       .byte   0x1
-       .byte   0x83
-       .byte   0x1
-       .long   0x48d
-       .quad   LFB29
-       .quad   LFE29
-       .set L$set$754,LLST13-Lsection__debug_loc
-       .long L$set$754
-       .long   0x16bc
-       .byte   0x1d
-       .ascii "fd\0"
-       .byte   0x1
-       .byte   0x82
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x1d
-       .ascii "buf\0"
-       .byte   0x1
-       .byte   0x82
-       .long   0xf88
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x1d
-       .ascii "count\0"
-       .byte   0x1
-       .byte   0x82
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x5c
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$755,LASF16-Lsection__debug_str
-       .long L$set$755
-       .byte   0x1
-       .byte   0x8a
-       .byte   0x1
-       .long   0x5fb
-       .quad   LFB30
-       .quad   LFE30
-       .set L$set$756,LLST14-Lsection__debug_loc
-       .long L$set$756
-       .long   0x16f1
-       .byte   0x1d
-       .ascii "name\0"
-       .byte   0x1
-       .byte   0x89
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$757,LASF17-Lsection__debug_str
-       .long L$set$757
-       .byte   0x1
-       .byte   0x91
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB31
-       .quad   LFE31
-       .set L$set$758,LLST15-Lsection__debug_loc
-       .long L$set$758
-       .long   0x1745
-       .byte   0x1d
-       .ascii "name\0"
-       .byte   0x1
-       .byte   0x90
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "flags\0"
-       .byte   0x1
-       .byte   0x90
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x64
-       .byte   0x1d
-       .ascii "mode\0"
-       .byte   0x1
-       .byte   0x90
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$759,LASF18-Lsection__debug_str
-       .long L$set$759
-       .byte   0x1
-       .byte   0x98
-       .byte   0x1
-       .long   0x5ee
-       .quad   LFB32
-       .quad   LFE32
-       .set L$set$760,LLST16-Lsection__debug_loc
-       .long L$set$760
-       .long   0x1797
-       .byte   0x1d
-       .ascii "fd\0"
-       .byte   0x1
-       .byte   0x97
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x1d
-       .ascii "off\0"
-       .byte   0x1
-       .byte   0x97
-       .long   0x5ee
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x1d
-       .ascii "whence\0"
-       .byte   0x1
-       .byte   0x97
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x5c
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$761,LASF19-Lsection__debug_str
-       .long L$set$761
-       .byte   0x1
-       .byte   0x9f
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB33
-       .quad   LFE33
-       .set L$set$762,LLST17-Lsection__debug_loc
-       .long L$set$762
-       .long   0x17d8
-       .byte   0x1d
-       .ascii "fd\0"
-       .byte   0x1
-       .byte   0x9e
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x1d
-       .ascii "len\0"
-       .byte   0x1
-       .byte   0x9e
-       .long   0x48d
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$763,LASF20-Lsection__debug_str
-       .long L$set$763
-       .byte   0x1
-       .byte   0xa6
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB34
-       .quad   LFE34
-       .set L$set$764,LLST18-Lsection__debug_loc
-       .long L$set$764
-       .long   0x180b
-       .byte   0x1d
-       .ascii "fd\0"
-       .byte   0x1
-       .byte   0xa5
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$765,LASF21-Lsection__debug_str
-       .long L$set$765
-       .byte   0x1
-       .byte   0xad
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB35
-       .quad   LFE35
-       .set L$set$766,LLST19-Lsection__debug_loc
-       .long L$set$766
-       .long   0x184e
-       .byte   0x1c
-       .set L$set$767,LASF3-Lsection__debug_str
-       .long L$set$767
-       .byte   0x1
-       .byte   0xac
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "mode\0"
-       .byte   0x1
-       .byte   0xac
-       .long   0x8b3
-       .byte   0x2
-       .byte   0x91
-       .byte   0x64
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$768,LASF22-Lsection__debug_str
-       .long L$set$768
-       .byte   0x1
-       .byte   0xb4
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB36
-       .quad   LFE36
-       .set L$set$769,LLST20-Lsection__debug_loc
-       .long L$set$769
-       .long   0x1882
-       .byte   0x1c
-       .set L$set$770,LASF3-Lsection__debug_str
-       .long L$set$770
-       .byte   0x1
-       .byte   0xb3
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1f
-       .byte   0x1
-       .set L$set$771,LASF23-Lsection__debug_str
-       .long L$set$771
-       .byte   0x1
-       .byte   0xbb
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB37
-       .quad   LFE37
-       .set L$set$772,LLST21-Lsection__debug_loc
-       .long L$set$772
-       .byte   0x1e
-       .byte   0x1
-       .set L$set$773,LASF24-Lsection__debug_str
-       .long L$set$773
-       .byte   0x1
-       .byte   0xc2
-       .byte   0x1
-       .quad   LFB38
-       .quad   LFE38
-       .set L$set$774,LLST22-Lsection__debug_loc
-       .long L$set$774
-       .long   0x18d3
-       .byte   0x1d
-       .ascii "dir\0"
-       .byte   0x1
-       .byte   0xc1
-       .long   0xfdf
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$775,LASF25-Lsection__debug_str
-       .long L$set$775
-       .byte   0x1
-       .byte   0xca
-       .byte   0x1
-       .long   0xfe5
-       .quad   LFB39
-       .quad   LFE39
-       .set L$set$776,LLST23-Lsection__debug_loc
-       .long L$set$776
-       .long   0x1907
-       .byte   0x1d
-       .ascii "dir\0"
-       .byte   0x1
-       .byte   0xc9
-       .long   0xfdf
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$777,LASF26-Lsection__debug_str
-       .long L$set$777
-       .byte   0x1
-       .byte   0xd1
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB40
-       .quad   LFE40
-       .set L$set$778,LLST24-Lsection__debug_loc
-       .long L$set$778
-       .long   0x193b
-       .byte   0x1d
-       .ascii "dir\0"
-       .byte   0x1
-       .byte   0xd0
-       .long   0xfdf
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$779,LASF27-Lsection__debug_str
-       .long L$set$779
-       .byte   0x1
-       .byte   0xd8
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB41
-       .quad   LFE41
-       .set L$set$780,LLST25-Lsection__debug_loc
-       .long L$set$780
-       .long   0x1985
-       .byte   0x1d
-       .ascii "oldpath\0"
-       .byte   0x1
-       .byte   0xd7
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "newpath\0"
-       .byte   0x1
-       .byte   0xd7
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$781,LASF28-Lsection__debug_str
-       .long L$set$781
-       .byte   0x1
-       .byte   0xdf
-       .byte   0x1
-       .long   0x641
-       .quad   LFB42
-       .quad   LFE42
-       .set L$set$782,LLST26-Lsection__debug_loc
-       .long L$set$782
-       .long   0x19b8
-       .byte   0x1d
-       .ascii "tm\0"
-       .byte   0x1
-       .byte   0xde
-       .long   0xf71
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$783,LASF29-Lsection__debug_str
-       .long L$set$783
-       .byte   0x1
-       .byte   0xe6
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB43
-       .quad   LFE43
-       .set L$set$784,LLST27-Lsection__debug_loc
-       .long L$set$784
-       .long   0x19eb
-       .byte   0x1d
-       .ascii "fd\0"
-       .byte   0x1
-       .byte   0xe5
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$785,LASF30-Lsection__debug_str
-       .long L$set$785
-       .byte   0x1
-       .byte   0xed
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB44
-       .quad   LFE44
-       .set L$set$786,LLST28-Lsection__debug_loc
-       .long L$set$786
-       .long   0x1a2f
-       .byte   0x1d
-       .ascii "path\0"
-       .byte   0x1
-       .byte   0xec
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "mode\0"
-       .byte   0x1
-       .byte   0xec
-       .long   0x8b3
-       .byte   0x2
-       .byte   0x91
-       .byte   0x64
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$787,LASF31-Lsection__debug_str
-       .long L$set$787
-       .byte   0x1
-       .byte   0xf4
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB45
-       .quad   LFE45
-       .set L$set$788,LLST29-Lsection__debug_loc
-       .long L$set$788
-       .long   0x1a76
-       .byte   0x1d
-       .ascii "filename\0"
-       .byte   0x1
-       .byte   0xf3
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x1d
-       .ascii "buf\0"
-       .byte   0x1
-       .byte   0xf3
-       .long   0x1051
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x1
-       .set L$set$789,LASF32-Lsection__debug_str
-       .long L$set$789
-       .byte   0x1
-       .byte   0xfb
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB46
-       .quad   LFE46
-       .set L$set$790,LLST30-Lsection__debug_loc
-       .long L$set$790
-       .long   0x1ac6
-       .byte   0x1d
-       .ascii "fildes\0"
-       .byte   0x1
-       .byte   0xfa
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x1d
-       .ascii "queue_selector\0"
-       .byte   0x1
-       .byte   0xfa
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$791,LASF33-Lsection__debug_str
-       .long L$set$791
-       .byte   0x1
-       .word   0x102
-       .byte   0x1
-       .long   0x244
-       .quad   LFB47
-       .quad   LFE47
-       .set L$set$792,LLST31-Lsection__debug_loc
-       .long L$set$792
-       .long   0x1b0d
-       .byte   0x21
-       .set L$set$793,LASF34-Lsection__debug_str
-       .long L$set$793
-       .byte   0x1
-       .word   0x101
-       .long   0x1064
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x22
-       .ascii "Title\0"
-       .byte   0x1
-       .word   0x101
-       .long   0x1106
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x23
-       .byte   0x1
-       .set L$set$794,LASF35-Lsection__debug_str
-       .long L$set$794
-       .byte   0x1
-       .word   0x109
-       .byte   0x1
-       .quad   LFB48
-       .quad   LFE48
-       .set L$set$795,LLST32-Lsection__debug_loc
-       .long L$set$795
-       .long   0x1b3f
-       .byte   0x22
-       .ascii "__s\0"
-       .byte   0x1
-       .word   0x108
-       .long   0x601
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$796,LASF36-Lsection__debug_str
-       .long L$set$796
-       .byte   0x1
-       .word   0x115
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB49
-       .quad   LFE49
-       .set L$set$797,LLST33-Lsection__debug_loc
-       .long L$set$797
-       .long   0x1b9f
-       .byte   0x22
-       .ascii "fd\0"
-       .byte   0x1
-       .word   0x114
-       .long   0xd6
-       .byte   0x3
-       .byte   0x91
-       .byte   0x9c,0x7e
-       .byte   0x22
-       .ascii "__request\0"
-       .byte   0x1
-       .word   0x114
-       .long   0x33d
-       .byte   0x3
-       .byte   0x91
-       .byte   0x90,0x7e
-       .byte   0x24
-       .byte   0x25
-       .ascii "Marker\0"
-       .byte   0x1
-       .word   0x116
-       .long   0x193
-       .byte   0x3
-       .byte   0x91
-       .byte   0xa0,0x7e
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$798,LASF37-Lsection__debug_str
-       .long L$set$798
-       .byte   0x1
-       .word   0x11f
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB50
-       .quad   LFE50
-       .set L$set$799,LLST34-Lsection__debug_loc
-       .long L$set$799
-       .long   0x1bfd
-       .byte   0x22
-       .ascii "__fd\0"
-       .byte   0x1
-       .word   0x11e
-       .long   0xd6
-       .byte   0x3
-       .byte   0x91
-       .byte   0x9c,0x7e
-       .byte   0x22
-       .ascii "__cmd\0"
-       .byte   0x1
-       .word   0x11e
-       .long   0xd6
-       .byte   0x3
-       .byte   0x91
-       .byte   0x98,0x7e
-       .byte   0x24
-       .byte   0x25
-       .ascii "Marker\0"
-       .byte   0x1
-       .word   0x120
-       .long   0x193
-       .byte   0x3
-       .byte   0x91
-       .byte   0xa0,0x7e
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$800,LASF38-Lsection__debug_str
-       .long L$set$800
-       .byte   0x1
-       .word   0x12a
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB51
-       .quad   LFE51
-       .set L$set$801,LLST35-Lsection__debug_loc
-       .long L$set$801
-       .long   0x1c46
-       .byte   0x21
-       .set L$set$802,LASF39-Lsection__debug_str
-       .long L$set$802
-       .byte   0x1
-       .word   0x129
-       .long   0x1111
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x22
-       .ascii "__speed\0"
-       .byte   0x1
-       .word   0x129
-       .long   0x35f
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$803,LASF40-Lsection__debug_str
-       .long L$set$803
-       .byte   0x1
-       .word   0x131
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB52
-       .quad   LFE52
-       .set L$set$804,LLST36-Lsection__debug_loc
-       .long L$set$804
-       .long   0x1c8f
-       .byte   0x21
-       .set L$set$805,LASF39-Lsection__debug_str
-       .long L$set$805
-       .byte   0x1
-       .word   0x130
-       .long   0x1111
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x22
-       .ascii "__speed\0"
-       .byte   0x1
-       .word   0x130
-       .long   0x35f
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$806,LASF41-Lsection__debug_str
-       .long L$set$806
-       .byte   0x1
-       .word   0x138
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB53
-       .quad   LFE53
-       .set L$set$807,LLST37-Lsection__debug_loc
-       .long L$set$807
-       .long   0x1cd5
-       .byte   0x22
-       .ascii "__fd\0"
-       .byte   0x1
-       .word   0x137
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x21
-       .set L$set$808,LASF39-Lsection__debug_str
-       .long L$set$808
-       .byte   0x1
-       .word   0x137
-       .long   0x1111
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$809,LASF42-Lsection__debug_str
-       .long L$set$809
-       .byte   0x1
-       .word   0x13f
-       .byte   0x1
-       .long   0xd6
-       .quad   LFB54
-       .quad   LFE54
-       .set L$set$810,LLST38-Lsection__debug_loc
-       .long L$set$810
-       .long   0x1d39
-       .byte   0x22
-       .ascii "__fd\0"
-       .byte   0x1
-       .word   0x13e
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x6c
-       .byte   0x22
-       .ascii "__optional_actions\0"
-       .byte   0x1
-       .word   0x13e
-       .long   0xd6
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x21
-       .set L$set$811,LASF39-Lsection__debug_str
-       .long L$set$811
-       .byte   0x1
-       .word   0x13e
-       .long   0x1117
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$812,LASF43-Lsection__debug_str
-       .long L$set$812
-       .byte   0x1
-       .word   0x14b
-       .byte   0x1
-       .long   0x22e
-       .quad   LFB55
-       .quad   LFE55
-       .set L$set$813,LLST39-Lsection__debug_loc
-       .long L$set$813
-       .long   0x1d83
-       .byte   0x22
-       .ascii "Pe32Data\0"
-       .byte   0x1
-       .word   0x148
-       .long   0x226
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x21
-       .set L$set$814,LASF0-Lsection__debug_str
-       .long L$set$814
-       .byte   0x1
-       .word   0x14a
-       .long   0x326
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x23
-       .byte   0x1
-       .set L$set$815,LASF44-Lsection__debug_str
-       .long L$set$815
-       .byte   0x1
-       .word   0x155
-       .byte   0x1
-       .quad   LFB56
-       .quad   LFE56
-       .set L$set$816,LLST40-Lsection__debug_loc
-       .long L$set$816
-       .long   0x1db5
-       .byte   0x21
-       .set L$set$817,LASF45-Lsection__debug_str
-       .long L$set$817
-       .byte   0x1
-       .word   0x154
-       .long   0x112a
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x23
-       .byte   0x1
-       .set L$set$818,LASF46-Lsection__debug_str
-       .long L$set$818
-       .byte   0x1
-       .word   0x160
-       .byte   0x1
-       .quad   LFB57
-       .quad   LFE57
-       .set L$set$819,LLST41-Lsection__debug_loc
-       .long L$set$819
-       .long   0x1de7
-       .byte   0x21
-       .set L$set$820,LASF45-Lsection__debug_str
-       .long L$set$820
-       .byte   0x1
-       .word   0x15f
-       .long   0x112a
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$821,LASF47-Lsection__debug_str
-       .long L$set$821
-       .byte   0x1
-       .word   0x16d
-       .byte   0x1
-       .long   0x244
-       .quad   LFB58
-       .quad   LFE58
-       .set L$set$822,LLST42-Lsection__debug_loc
-       .long L$set$822
-       .long   0x1e1d
-       .byte   0x21
-       .set L$set$823,LASF34-Lsection__debug_str
-       .long L$set$823
-       .byte   0x1
-       .word   0x16c
-       .long   0x12b5
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$824,LASF48-Lsection__debug_str
-       .long L$set$824
-       .byte   0x1
-       .word   0x174
-       .byte   0x1
-       .long   0x244
-       .quad   LFB59
-       .quad   LFE59
-       .set L$set$825,LLST43-Lsection__debug_loc
-       .long L$set$825
-       .long   0x1e76
-       .byte   0x21
-       .set L$set$826,LASF34-Lsection__debug_str
-       .long L$set$826
-       .byte   0x1
-       .word   0x173
-       .long   0x12b5
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x22
-       .ascii "Width\0"
-       .byte   0x1
-       .word   0x173
-       .long   0xb8
-       .byte   0x2
-       .byte   0x91
-       .byte   0x64
-       .byte   0x22
-       .ascii "Height\0"
-       .byte   0x1
-       .word   0x173
-       .long   0xb8
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$827,LASF49-Lsection__debug_str
-       .long L$set$827
-       .byte   0x1
-       .word   0x17b
-       .byte   0x1
-       .long   0x244
-       .quad   LFB60
-       .quad   LFE60
-       .set L$set$828,LLST44-Lsection__debug_loc
-       .long L$set$828
-       .long   0x1eac
-       .byte   0x21
-       .set L$set$829,LASF34-Lsection__debug_str
-       .long L$set$829
-       .byte   0x1
-       .word   0x17a
-       .long   0x12b5
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$830,LASF50-Lsection__debug_str
-       .long L$set$830
-       .byte   0x1
-       .word   0x182
-       .byte   0x1
-       .long   0x244
-       .quad   LFB61
-       .quad   LFE61
-       .set L$set$831,LLST45-Lsection__debug_loc
-       .long L$set$831
-       .long   0x1ef1
-       .byte   0x21
-       .set L$set$832,LASF34-Lsection__debug_str
-       .long L$set$832
-       .byte   0x1
-       .word   0x181
-       .long   0x12b5
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x22
-       .ascii "key\0"
-       .byte   0x1
-       .word   0x181
-       .long   0x1269
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x0
-       .byte   0x20
-       .byte   0x1
-       .set L$set$833,LASF51-Lsection__debug_str
-       .long L$set$833
-       .byte   0x1
-       .word   0x194
-       .byte   0x1
-       .long   0x244
-       .quad   LFB62
-       .quad   LFE62
-       .set L$set$834,LLST46-Lsection__debug_loc
-       .long L$set$834
-       .long   0x1fde
-       .byte   0x21
-       .set L$set$835,LASF34-Lsection__debug_str
-       .long L$set$835
-       .byte   0x1
-       .word   0x189
-       .long   0x12b5
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x22
-       .ascii "BltBuffer\0"
-       .byte   0x1
-       .word   0x18a
-       .long   0x121c
-       .byte   0x2
-       .byte   0x91
-       .byte   0x60
-       .byte   0x22
-       .ascii "BltOperation\0"
-       .byte   0x1
-       .word   0x18b
-       .long   0x11ff
-       .byte   0x2
-       .byte   0x91
-       .byte   0x5c
-       .byte   0x22
-       .ascii "SourceX\0"
-       .byte   0x1
-       .word   0x18c
-       .long   0x16b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x50
-       .byte   0x22
-       .ascii "SourceY\0"
-       .byte   0x1
-       .word   0x18d
-       .long   0x16b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x48
-       .byte   0x22
-       .ascii "DestinationX\0"
-       .byte   0x1
-       .word   0x18e
-       .long   0x16b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x40
-       .byte   0x22
-       .ascii "DestinationY\0"
-       .byte   0x1
-       .word   0x18f
-       .long   0x16b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x0
-       .byte   0x22
-       .ascii "Width\0"
-       .byte   0x1
-       .word   0x190
-       .long   0x16b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x8
-       .byte   0x22
-       .ascii "Height\0"
-       .byte   0x1
-       .word   0x191
-       .long   0x16b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x10
-       .byte   0x22
-       .ascii "Delta\0"
-       .byte   0x1
-       .word   0x193
-       .long   0x16b
-       .byte   0x2
-       .byte   0x91
-       .byte   0x18
-       .byte   0x0
-       .byte   0x5
-       .ascii "SET_TIMER_CALLBACK\0"
-       .byte   0x1
-       .word   0x198
-       .long   0xf59
-       .byte   0x20
-       .byte   0x1
-       .set L$set$836,LASF52-Lsection__debug_str
-       .long L$set$836
-       .byte   0x1
-       .word   0x19d
-       .byte   0x1
-       .long   0x16b
-       .quad   LFB63
-       .quad   LFE63
-       .set L$set$837,LLST47-Lsection__debug_loc
-       .long L$set$837
-       .long   0x2059
-       .byte   0x22
-       .ascii "api\0"
-       .byte   0x1
-       .word   0x19c
-       .long   0x226
-       .byte   0x2
-       .byte   0x91
-       .byte   0x58
-       .byte   0x22
-       .ascii "a\0"
-       .byte   0x1
-       .word   0x19c
-       .long   0x7f
-       .byte   0x2
-       .byte   0x91
-       .byte   0x50
-       .byte   0x25
-       .ascii "settimer_callback\0"
-       .byte   0x1
-       .word   0x19e
-       .long   0x1fde
-       .byte   0x2
-       .byte   0x91
-       .byte   0x68
-       .byte   0x0
-       .byte   0x6
-       .long   0xd6
-       .long   0x2064
-       .byte   0x26
-       .byte   0x0
-       .byte   0x27
-       .ascii "__CFConstantStringClassReference\0"
-       .long   0x2059
-       .byte   0x1
-       .byte   0x1
-       .byte   0x1
-       .byte   0x28
-       .ascii "gUnixRmDir\0"
-       .byte   0x1
-       .byte   0x18
-       .long   0xf8f
-       .byte   0x1
-       .byte   0x1
-       .byte   0x28
-       .ascii "gUnixOpenDir\0"
-       .byte   0x1
-       .byte   0x19
-       .long   0xfb6
-       .byte   0x1
-       .byte   0x1
-       .byte   0x28
-       .ascii "gUnixStat\0"
-       .byte   0x1
-       .byte   0x1a
-       .long   0xfeb
-       .byte   0x1
-       .byte   0x1
-       .byte   0x28
-       .ascii "gUnixStatFs\0"
-       .byte   0x1
-       .byte   0x1b
-       .long   0x101d
-       .byte   0x1
-       .byte   0x1
-       .byte   0x0
-       .section __DWARF,__debug_abbrev,regular,debug
-       .byte   0x1
-       .byte   0x11
-       .byte   0x1
-       .byte   0x25
-       .byte   0x8
-       .byte   0x13
-       .byte   0xb
-       .byte   0x3
-       .byte   0x8
-       .byte   0x11
-       .byte   0x1
-       .byte   0x12
-       .byte   0x1
-       .byte   0x10
-       .byte   0x6
-       .byte   0x0
-       .byte   0x0
-       .byte   0x2
-       .byte   0x16
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x49
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x3
-       .byte   0x24
-       .byte   0x0
-       .byte   0xb
-       .byte   0xb
-       .byte   0x3e
-       .byte   0xb
-       .byte   0x3
-       .byte   0x8
-       .byte   0x0
-       .byte   0x0
-       .byte   0x4
-       .byte   0x24
-       .byte   0x0
-       .byte   0xb
-       .byte   0xb
-       .byte   0x3e
-       .byte   0xb
-       .byte   0x0
-       .byte   0x0
-       .byte   0x5
-       .byte   0x16
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x49
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x6
-       .byte   0x1
-       .byte   0x1
-       .byte   0x49
-       .byte   0x13
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x7
-       .byte   0x21
-       .byte   0x0
-       .byte   0x49
-       .byte   0x13
-       .byte   0x2f
-       .byte   0xb
-       .byte   0x0
-       .byte   0x0
-       .byte   0x8
-       .byte   0x13
-       .byte   0x1
-       .byte   0x3
-       .byte   0x8
-       .byte   0xb
-       .byte   0xb
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x9
-       .byte   0xd
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x49
-       .byte   0x13
-       .byte   0x38
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0xa
-       .byte   0xf
-       .byte   0x0
-       .byte   0xb
-       .byte   0xb
-       .byte   0x0
-       .byte   0x0
-       .byte   0xb
-       .byte   0xf
-       .byte   0x0
-       .byte   0xb
-       .byte   0xb
-       .byte   0x49
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0xc
-       .byte   0x13
-       .byte   0x1
-       .byte   0xb
-       .byte   0xb
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0xd
-       .byte   0x13
-       .byte   0x1
-       .byte   0x3
-       .byte   0x8
-       .byte   0xb
-       .byte   0xb
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0xe
-       .byte   0xd
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x49
-       .byte   0x13
-       .byte   0x38
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0xf
-       .byte   0x26
-       .byte   0x0
-       .byte   0x49
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x10
-       .byte   0x13
-       .byte   0x1
-       .byte   0x3
-       .byte   0x8
-       .byte   0xb
-       .byte   0x5
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x11
-       .byte   0x21
-       .byte   0x0
-       .byte   0x49
-       .byte   0x13
-       .byte   0x2f
-       .byte   0x5
-       .byte   0x0
-       .byte   0x0
-       .byte   0x12
-       .byte   0x13
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3c
-       .byte   0xc
-       .byte   0x0
-       .byte   0x0
-       .byte   0x13
-       .byte   0x15
-       .byte   0x1
-       .byte   0x27
-       .byte   0xc
-       .byte   0x49
-       .byte   0x13
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x14
-       .byte   0x5
-       .byte   0x0
-       .byte   0x49
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x15
-       .byte   0xd
-       .byte   0x0
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x49
-       .byte   0x13
-       .byte   0x38
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0x16
-       .byte   0x15
-       .byte   0x1
-       .byte   0x27
-       .byte   0xc
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x17
-       .byte   0x26
-       .byte   0x0
-       .byte   0x0
-       .byte   0x0
-       .byte   0x18
-       .byte   0x26
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x49
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x19
-       .byte   0x4
-       .byte   0x1
-       .byte   0xb
-       .byte   0xb
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x1a
-       .byte   0x28
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x1c
-       .byte   0xd
-       .byte   0x0
-       .byte   0x0
-       .byte   0x1b
-       .byte   0x2e
-       .byte   0x1
-       .byte   0x3f
-       .byte   0xc
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x27
-       .byte   0xc
-       .byte   0x49
-       .byte   0x13
-       .byte   0x11
-       .byte   0x1
-       .byte   0x12
-       .byte   0x1
-       .byte   0x40
-       .byte   0x6
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x1c
-       .byte   0x5
-       .byte   0x0
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x49
-       .byte   0x13
-       .byte   0x2
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0x1d
-       .byte   0x5
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x49
-       .byte   0x13
-       .byte   0x2
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0x1e
-       .byte   0x2e
-       .byte   0x1
-       .byte   0x3f
-       .byte   0xc
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x27
-       .byte   0xc
-       .byte   0x11
-       .byte   0x1
-       .byte   0x12
-       .byte   0x1
-       .byte   0x40
-       .byte   0x6
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x1f
-       .byte   0x2e
-       .byte   0x0
-       .byte   0x3f
-       .byte   0xc
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x27
-       .byte   0xc
-       .byte   0x49
-       .byte   0x13
-       .byte   0x11
-       .byte   0x1
-       .byte   0x12
-       .byte   0x1
-       .byte   0x40
-       .byte   0x6
-       .byte   0x0
-       .byte   0x0
-       .byte   0x20
-       .byte   0x2e
-       .byte   0x1
-       .byte   0x3f
-       .byte   0xc
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x27
-       .byte   0xc
-       .byte   0x49
-       .byte   0x13
-       .byte   0x11
-       .byte   0x1
-       .byte   0x12
-       .byte   0x1
-       .byte   0x40
-       .byte   0x6
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x21
-       .byte   0x5
-       .byte   0x0
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x49
-       .byte   0x13
-       .byte   0x2
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0x22
-       .byte   0x5
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x49
-       .byte   0x13
-       .byte   0x2
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0x23
-       .byte   0x2e
-       .byte   0x1
-       .byte   0x3f
-       .byte   0xc
-       .byte   0x3
-       .byte   0xe
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x27
-       .byte   0xc
-       .byte   0x11
-       .byte   0x1
-       .byte   0x12
-       .byte   0x1
-       .byte   0x40
-       .byte   0x6
-       .byte   0x1
-       .byte   0x13
-       .byte   0x0
-       .byte   0x0
-       .byte   0x24
-       .byte   0x18
-       .byte   0x0
-       .byte   0x0
-       .byte   0x0
-       .byte   0x25
-       .byte   0x34
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0x5
-       .byte   0x49
-       .byte   0x13
-       .byte   0x2
-       .byte   0xa
-       .byte   0x0
-       .byte   0x0
-       .byte   0x26
-       .byte   0x21
-       .byte   0x0
-       .byte   0x0
-       .byte   0x0
-       .byte   0x27
-       .byte   0x34
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x49
-       .byte   0x13
-       .byte   0x3f
-       .byte   0xc
-       .byte   0x34
-       .byte   0xc
-       .byte   0x3c
-       .byte   0xc
-       .byte   0x0
-       .byte   0x0
-       .byte   0x28
-       .byte   0x34
-       .byte   0x0
-       .byte   0x3
-       .byte   0x8
-       .byte   0x3a
-       .byte   0xb
-       .byte   0x3b
-       .byte   0xb
-       .byte   0x49
-       .byte   0x13
-       .byte   0x3f
-       .byte   0xc
-       .byte   0x3c
-       .byte   0xc
-       .byte   0x0
-       .byte   0x0
-       .byte   0x0
-       .section __DWARF,__debug_pubnames,regular,debug
-       .long   0x3b6
-       .word   0x2
-       .set L$set$838,Ldebug_info0-Lsection__debug_info
-       .long L$set$838
-       .long   0x20e0
-       .long   0x137a
-       .ascii "Gasketrmdir\0"
-       .long   0x13ae
-       .ascii "Gasketopendir\0"
-       .long   0x13e2
-       .ascii "Gasketstat\0"
-       .long   0x1425
-       .ascii "Gasketstatfs\0"
-       .long   0x1468
-       .ascii "GasketmsSleep\0"
-       .long   0x14a1
-       .ascii "Gasketexit\0"
-       .long   0x14d4
-       .ascii "GasketSetTimer\0"
-       .long   0x151c
-       .ascii "GasketGetLocalTime\0"
-       .long   0x154d
-       .ascii "Gasketgmtime\0"
-       .long   0x1583
-       .ascii "GasketGetTimeZone\0"
-       .long   0x15a4
-       .ascii "GasketGetDayLight\0"
-       .long   0x15c5
-       .ascii "Gasketpoll\0"
-       .long   0x161a
-       .ascii "Gasketread\0"
-       .long   0x166b
-       .ascii "Gasketwrite\0"
-       .long   0x16bc
-       .ascii "Gasketgetenv\0"
-       .long   0x16f1
-       .ascii "Gasketopen\0"
-       .long   0x1745
-       .ascii "Gasketlseek\0"
-       .long   0x1797
-       .ascii "Gasketftruncate\0"
-       .long   0x17d8
-       .ascii "Gasketclose\0"
-       .long   0x180b
-       .ascii "Gasketmkdir\0"
-       .long   0x184e
-       .ascii "Gasketunlink\0"
-       .long   0x1882
-       .ascii "GasketGetErrno\0"
-       .long   0x18a3
-       .ascii "Gasketrewinddir\0"
-       .long   0x18d3
-       .ascii "Gasketreaddir\0"
-       .long   0x1907
-       .ascii "Gasketclosedir\0"
-       .long   0x193b
-       .ascii "Gasketrename\0"
-       .long   0x1985
-       .ascii "Gasketmktime\0"
-       .long   0x19b8
-       .ascii "Gasketfsync\0"
-       .long   0x19eb
-       .ascii "Gasketchmod\0"
-       .long   0x1a2f
-       .ascii "Gasketutime\0"
-       .long   0x1a76
-       .ascii "Gaskettcflush\0"
-       .long   0x1ac6
-       .ascii "GasketUgaCreate\0"
-       .long   0x1b0d
-       .ascii "Gasketperror\0"
-       .long   0x1b3f
-       .ascii "Gasketioctl\0"
-       .long   0x1b9f
-       .ascii "Gasketfcntl\0"
-       .long   0x1bfd
-       .ascii "Gasketcfsetispeed\0"
-       .long   0x1c46
-       .ascii "Gasketcfsetospeed\0"
-       .long   0x1c8f
-       .ascii "Gaskettcgetattr\0"
-       .long   0x1cd5
-       .ascii "Gaskettcsetattr\0"
-       .long   0x1d39
-       .ascii "GasketUnixPeCoffGetEntryPoint\0"
-       .long   0x1d83
-       .ascii "GasketUnixPeCoffRelocateImageExtraAction\0"
-       .long   0x1db5
-       .ascii "GasketUnixPeCoffUnloadImageExtraAction\0"
-       .long   0x1de7
-       .ascii "GasketUgaClose\0"
-       .long   0x1e1d
-       .ascii "GasketUgaSize\0"
-       .long   0x1e76
-       .ascii "GasketUgaCheckKey\0"
-       .long   0x1eac
-       .ascii "GasketUgaGetKey\0"
-       .long   0x1ef1
-       .ascii "GasketUgaBlt\0"
-       .long   0x1ff9
-       .ascii "ReverseGasketUint64\0"
-       .long   0x0
-       .section __DWARF,__debug_pubtypes,regular,debug
-       .long   0x472
-       .word   0x2
-       .set L$set$839,Ldebug_info0-Lsection__debug_info
-       .long L$set$839
-       .long   0x20e0
-       .long   0x7f
-       .ascii "UINT64\0"
-       .long   0xb8
-       .ascii "UINT32\0"
-       .long   0xdd
-       .ascii "UINT16\0"
-       .long   0x101
-       .ascii "CHAR16\0"
-       .long   0x10f
-       .ascii "INT16\0"
-       .long   0x129
-       .ascii "BOOLEAN\0"
-       .long   0x149
-       .ascii "UINT8\0"
-       .long   0x156
-       .ascii "CHAR8\0"
-       .long   0x16b
-       .ascii "UINTN\0"
-       .long   0x17b
-       .ascii "PHYSICAL_ADDRESS\0"
-       .long   0x1b3
-       .ascii "__va_list_tag\0"
-       .long   0x193
-       .ascii "VA_LIST\0"
-       .long   0x22e
-       .ascii "RETURN_STATUS\0"
-       .long   0x244
-       .ascii "EFI_STATUS\0"
-       .long   0x316
-       .ascii "EFI_TIME\0"
-       .long   0x32c
-       .ascii "tcflag_t\0"
-       .long   0x352
-       .ascii "cc_t\0"
-       .long   0x35f
-       .ascii "speed_t\0"
-       .long   0x36f
-       .ascii "termios\0"
-       .long   0x424
-       .ascii "__uint8_t\0"
-       .long   0x435
-       .ascii "__uint16_t\0"
-       .long   0x447
-       .ascii "__int32_t\0"
-       .long   0x458
-       .ascii "__uint32_t\0"
-       .long   0x46a
-       .ascii "__int64_t\0"
-       .long   0x47b
-       .ascii "__uint64_t\0"
-       .long   0x499
-       .ascii "__darwin_time_t\0"
-       .long   0x4c0
-       .ascii "_opaque_pthread_mutex_t\0"
-       .long   0x514
-       .ascii "__darwin_blkcnt_t\0"
-       .long   0x52d
-       .ascii "__darwin_blksize_t\0"
-       .long   0x547
-       .ascii "__darwin_dev_t\0"
-       .long   0x55d
-       .ascii "__darwin_gid_t\0"
-       .long   0x573
-       .ascii "__darwin_ino64_t\0"
-       .long   0x58b
-       .ascii "__darwin_mode_t\0"
-       .long   0x5a2
-       .ascii "__darwin_off_t\0"
-       .long   0x5b8
-       .ascii "__darwin_pthread_mutex_t\0"
-       .long   0x5d8
-       .ascii "__darwin_uid_t\0"
-       .long   0x5ee
-       .ascii "off_t\0"
-       .long   0x60c
-       .ascii "timespec\0"
-       .long   0x641
-       .ascii "time_t\0"
-       .long   0x64f
-       .ascii "tm\0"
-       .long   0x721
-       .ascii "dirent\0"
-       .long   0x88e
-       .ascii "DIR\0"
-       .long   0x899
-       .ascii "dev_t\0"
-       .long   0x8a6
-       .ascii "gid_t\0"
-       .long   0x8b3
-       .ascii "mode_t\0"
-       .long   0x8c1
-       .ascii "uid_t\0"
-       .long   0x8ce
-       .ascii "pollfd\0"
-       .long   0x90e
-       .ascii "int32_t\0"
-       .long   0x91d
-       .ascii "blkcnt_t\0"
-       .long   0x92d
-       .ascii "blksize_t\0"
-       .long   0x93e
-       .ascii "nlink_t\0"
-       .long   0x95d
-       .ascii "uint32_t\0"
-       .long   0x96d
-       .ascii "uint64_t\0"
-       .long   0x97d
-       .ascii "fsid\0"
-       .long   0x9a9
-       .ascii "fsid_t\0"
-       .long   0x9c7
-       .ascii "statfs\0"
-       .long   0xb11
-       .ascii "utimbuf\0"
-       .long   0xb45
-       .ascii "PE_COFF_LOADER_READ_FILE\0"
-       .long   0xdb0
-       .ascii "PE_COFF_LOADER_IMAGE_CONTEXT\0"
-       .long   0xdd4
-       .ascii "stat_fix\0"
-       .long   0xf49
-       .ascii "STAT_FIX\0"
-       .long   0xf8f
-       .ascii "UnixRmDir\0"
-       .long   0xfb6
-       .ascii "UnixOpenDir\0"
-       .long   0xfeb
-       .ascii "UnixStat\0"
-       .long   0x101d
-       .ascii "UnixStatFs\0"
-       .long   0x1179
-       .ascii "EFI_UGA_PIXEL\0"
-       .long   0x11ff
-       .ascii "EFI_UGA_BLT_OPERATION\0"
-       .long   0x1254
-       .ascii "EFI_INPUT_KEY\0"
-       .long   0x128f
-       .ascii "UGAClose\0"
-       .long   0x12bb
-       .ascii "UGASize\0"
-       .long   0x12ea
-       .ascii "UGACheckKey\0"
-       .long   0x12fd
-       .ascii "UGAGetKey\0"
-       .long   0x1329
-       .ascii "UGABlt\0"
-       .long   0x1070
-       .ascii "_EFI_UNIX_UGA_IO_PROTOCOL\0"
-       .long   0x1fde
-       .ascii "SET_TIMER_CALLBACK\0"
-       .long   0x0
-       .section __DWARF,__debug_aranges,regular,debug
-       .long   0x2c
-       .word   0x2
-       .set L$set$840,Ldebug_info0-Lsection__debug_info
-       .long L$set$840
-       .byte   0x8
-       .byte   0x0
-       .word   0x0
-       .word   0x0
-       .quad   Ltext0
-       .set L$set$841,Letext0-Ltext0
-       .quad L$set$841
-       .quad   0x0
-       .quad   0x0
-       .section __DWARF,__debug_str,regular,debug
-LASF17:
-       .ascii "Gasketopen\0"
-LASF18:
-       .ascii "Gasketlseek\0"
-LASF48:
-       .ascii "GasketUgaSize\0"
-LASF52:
-       .ascii "ReverseGasketUint64\0"
-LASF40:
-       .ascii "Gasketcfsetospeed\0"
-LASF31:
-       .ascii "Gasketutime\0"
-LASF41:
-       .ascii "Gaskettcgetattr\0"
-LASF38:
-       .ascii "Gasketcfsetispeed\0"
-LASF42:
-       .ascii "Gaskettcsetattr\0"
-LASF15:
-       .ascii "Gasketwrite\0"
-LASF1:
-       .ascii "Gasketrmdir\0"
-LASF43:
-       .ascii "GasketUnixPeCoffGetEntryPoint\0"
-LASF36:
-       .ascii "Gasketioctl\0"
-LASF39:
-       .ascii "__termios_p\0"
-LASF23:
-       .ascii "GasketGetErrno\0"
-LASF26:
-       .ascii "Gasketclosedir\0"
-LASF44:
-       .ascii "GasketUnixPeCoffRelocateImageExtraAction\0"
-LASF13:
-       .ascii "Gasketpoll\0"
-LASF49:
-       .ascii "GasketUgaCheckKey\0"
-LASF50:
-       .ascii "GasketUgaGetKey\0"
-LASF11:
-       .ascii "GasketGetTimeZone\0"
-LASF25:
-       .ascii "Gasketreaddir\0"
-LASF46:
-       .ascii "GasketUnixPeCoffUnloadImageExtraAction\0"
-LASF34:
-       .ascii "UgaIo\0"
-LASF12:
-       .ascii "GasketGetDayLight\0"
-LASF6:
-       .ascii "GasketmsSleep\0"
-LASF51:
-       .ascii "GasketUgaBlt\0"
-LASF32:
-       .ascii "Gaskettcflush\0"
-LASF22:
-       .ascii "Gasketunlink\0"
-LASF27:
-       .ascii "Gasketrename\0"
-LASF8:
-       .ascii "GasketSetTimer\0"
-LASF24:
-       .ascii "Gasketrewinddir\0"
-LASF21:
-       .ascii "Gasketmkdir\0"
-LASF4:
-       .ascii "Gasketstat\0"
-LASF7:
-       .ascii "Gasketexit\0"
-LASF9:
-       .ascii "GasketGetLocalTime\0"
-LASF20:
-       .ascii "Gasketclose\0"
-LASF35:
-       .ascii "Gasketperror\0"
-LASF45:
-       .ascii "ImageContext\0"
-LASF2:
-       .ascii "Gasketopendir\0"
-LASF28:
-       .ascii "Gasketmktime\0"
-LASF30:
-       .ascii "Gasketchmod\0"
-LASF37:
-       .ascii "Gasketfcntl\0"
-LASF3:
-       .ascii "pathname\0"
-LASF0:
-       .ascii "EntryPoint\0"
-LASF5:
-       .ascii "Gasketstatfs\0"
-LASF33:
-       .ascii "GasketUgaCreate\0"
-LASF19:
-       .ascii "Gasketftruncate\0"
-LASF16:
-       .ascii "Gasketgetenv\0"
-LASF47:
-       .ascii "GasketUgaClose\0"
-LASF14:
-       .ascii "Gasketread\0"
-LASF10:
-       .ascii "Gasketgmtime\0"
-LASF29:
-       .ascii "Gasketfsync\0"
-       .subsections_via_symbols
-
-#endif
-
diff --git a/UnixPkg/Sec/X64/GasketTemplate.c b/UnixPkg/Sec/X64/GasketTemplate.c
deleted file mode 100644 (file)
index 7345e23..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/** @file
-  Template file used to create Gasket.S
-
-  This file is built on the command line via gcc GasketTemplate.c -S 
-  and it will create GasketTemplate.s and this was used to create 
-  Gasket.S. This builds code for Unix ABI on both sides. To convert 
-  to EFI ABI will require changing the code by hand
-
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-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
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-
-#include <stdint.h>
-#include <sys/stat.h>
-
-typedef int8_t    INT8;
-typedef uint8_t   UINT8;
-typedef int16_t   INT16;
-typedef uint16_t  UINT16;
-typedef int32_t   INT32;
-typedef uint32_t  UINT32;
-typedef int64_t   INT64;
-typedef uint64_t  UINT64;
-typedef UINT64    UINTN; 
-
-
-typedef UINTN (*GASKET_VOID) ();
-typedef UINTN (*GASKET_UINTN) (UINTN);
-typedef UINTN (*GASKET_UINT64) (UINT64);
-typedef UINTN (*GASKET_UINTN_UINTN) (UINTN, UINTN);
-typedef UINTN (*GASKET_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN);
-typedef UINTN (*GASKET_UINTN_UINTN_UINTN_UINTN) (UINTN, UINTN, UINTN, UINTN);
-typedef UINTN (*GASKET_UINTN_10ARGS) (UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN, UINTN);
-typedef UINTN (*GASKET_UINT64_UINTN) (UINT64, UINTN);
-typedef UINT64 (*GASKET_UINTN_UINT64_UINTN) (UINTN, UINT64, UINTN);
-typedef UINTN (*GASKET_UINTN_UINT16) (UINTN, UINT16);
-
-UINTN GasketVoid (void *api);
-UINTN GasketUintn (void *api, UINTN a);
-UINTN GasketUintnUintn (void *api, UINTN a, UINTN b);
-UINTN GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c);
-UINTN GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d);
-UINTN GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j);
-UINTN GasketUint64Uintn (void *api, UINT64 a, UINTN b);
-UINT64 GasketUintnUiny64Uintn (void *api, UINTN a, UINT64 b, UINTN c);
-UINTN GasketUintnUint16 (void *api, UINTN a, UINT16 b);
-
-
-
-UINTN
-GasketVoid (void *api)
-{
-  GASKET_VOID func;
-  
-  func = (GASKET_VOID)api;
-  return func ();
-}
-
-UINTN
-GasketUintn (void *api, UINTN a)
-{
-  GASKET_UINTN func;
-  
-  func = (GASKET_UINTN)api;
-  return func (a);
-}
-
-UINTN
-GasketUintnUintn (void *api, UINTN a, UINTN b)
-{
-  GASKET_UINTN_UINTN func;
-  
-  func = (GASKET_UINTN_UINTN)api;
-  return func (a, b);
-}
-
-
-UINTN
-GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c)
-{
-  GASKET_UINTN_UINTN_UINTN func;
-  
-  func = (GASKET_UINTN_UINTN_UINTN)api;
-  return func (a, b, c);
-}
-
-UINTN
-GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d)
-{
-  GASKET_UINTN_UINTN_UINTN_UINTN func;
-  
-  func = (GASKET_UINTN_UINTN_UINTN_UINTN)api;
-  return func (a, b, c, d);
-}
-
-UINTN
-GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j)
-{
-  GASKET_UINTN_10ARGS func;
-  
-  func = (GASKET_UINTN_10ARGS)api;
-  return func (a, b, c, d, e, f, g, h, i, j);
-}
-
-
-UINTN
-GasketUint64Uintn (void *api, UINT64 a, UINTN b)
-{
-  GASKET_UINT64_UINTN func;
-  
-  func = (GASKET_UINT64_UINTN)api;
-  return func (a, b);
-}
-
-UINT64
-GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c)
-{
-  GASKET_UINTN_UINT64_UINTN func;
-  
-  func = (GASKET_UINTN_UINT64_UINTN)api;
-  return func (a, b, c);
-}
-
-UINTN
-GasketUintnUint16 (void *api, UINTN a, UINT16 b)
-{
-  GASKET_UINTN_UINT16 func;
-  
-  func = (GASKET_UINTN_UINT16)api;
-  return func (a, b);
-}
-
-void
-ReverseGasketUint64 (void *api, UINT64 a)
-{
-  GASKET_UINT64 func;
-  
-  func = (GASKET_UINT64)api;
-  func (a);
-  return;
-}
-
-
-
-
index 383a8830dae47bc1bf89eaf35e4b902717bb57be..532585b608c037803b9278e3f6bcc7214a4dfc69 100644 (file)
@@ -2,14 +2,14 @@
 #
 # This template was generated from GasketEfiTemplate.c Unix x86_64 ABI
 #
-# The EFI_UNIX_THUNK_PROTOCOL member functions call these these generic assembly
-# routines.
+# The EFI_UNIX_THUNK_PROTOCOL member functions call these these generic assembly 
+# routines.  
 #
 # Some OS X POSIX calls get name mangled in C code and we need to fill in a C global
 # to get the correct binding (does not work from assembly). So we have 4 functions
 # that do an indirect call, while the others call POSIX APIs directly
 #
-# movq _gUnixRmDir@GOTPCREL(%rip), %rax
+# movq _gUnixRmDir@GOTPCREL(%rip), %rax 
 #
 #
 # UNIX Arg passing: RCX, RDX,  R8,  R9
 
 // 32 byte shadow to spill rcx-r9, 8 bytes to align stack on 16 byte boundry
 // Any call with 0 - 4 arguments allocates 40 bytes on the stack.
-// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56,
+// For more than 4 args you always have to increase in quanta of 16 so 5 or 6 args is 56, 
 // 7 or 8 args is 72, and 9 or 10 args is 88
-#define EFI_STACK_SHADOW_SPACE          40
-#define EFI_STACK_SHADOW_SPACE_5_6      56
-#define EFI_STACK_SHADOW_SPACE_7_8      72
-#define EFI_STACK_SHADOW_SPACE_9_10     88
+#define EFI_STACK_SHADOW_SPACE          40  
+#define EFI_STACK_SHADOW_SPACE_5_6      56  
+#define EFI_STACK_SHADOW_SPACE_7_8      72 
+#define EFI_STACK_SHADOW_SPACE_9_10     88 
 
 
 
 
 ASM_GLOBAL ASM_PFX(Gasketrmdir)
 ASM_PFX(Gasketrmdir):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
        pushq     %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
+  movq    %rcx, %rdi    // Swizzle args 
 
        movq    ASM_PFX(gUnixRmDir)@GOTPCREL(%rip), %rax  // Get function name mangled by C
        movq    (%rax), %rax
        call    *%rax
 
-       pushq     %rdi          // restore state
-       pushq     %rsi
+
+       popq  %rdi          // restore state
+       popq  %rsi
+       popq  %rbp
        ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketopendir)
 ASM_PFX(Gasketopendir):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
        pushq     %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
+  movq    %rcx, %rdi    // Swizzle args 
 
        movq    ASM_PFX(gUnixOpenDir)@GOTPCREL(%rip), %rax  // Get function name mangled by C
        movq    (%rax), %rax
        call    *%rax
-
+       
        popq  %rdi             // restore state
        popq  %rsi
+       popq  %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(Gasketstat)
 ASM_PFX(Gasketstat):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
        pushq     %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        movq    ASM_PFX(gUnixStat)@GOTPCREL(%rip), %rax   // Get function name mangled by C
        movq    (%rax), %rax
        call    *%rax
+       
 
        popq  %rdi            // restore state
        popq  %rsi
+       popq  %rbp
   ret
-
-
+       
+       
 ASM_GLOBAL ASM_PFX(Gasketstatfs)
 ASM_PFX(Gasketstatfs):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
        pushq     %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        movq    ASM_PFX(gUnixStatFs)@GOTPCREL(%rip), %rax   // Get function name mangled by C
        movq    (%rax), %rax
        call    *%rax
-
+       
        popq  %rdi            // restore state
        popq  %rsi
+       popq  %rbp
   ret
-
+       
 ASM_GLOBAL ASM_PFX(Gasketrewinddir)
 ASM_PFX(Gasketrewinddir):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+       pushq     %rdi
+  
+  movq    %rcx, %rdi    // Swizzle args 
 
        movq    ASM_PFX(gUnixRewinddir)@GOTPCREL(%rip), %rax   // Get function name mangled by C
        movq    (%rax), %rax
        call    *%rax
-
+       
        popq  %rdi            // restore state
        popq  %rsi
+       popq  %rbp
   ret
-
+       
 ASM_GLOBAL ASM_PFX(Gasketreaddir)
 ASM_PFX(Gasketreaddir):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+       pushq     %rdi
+  
+  movq    %rcx, %rdi    // Swizzle args 
 
        movq    ASM_PFX(gUnixReaddir)@GOTPCREL(%rip), %rax   // Get function name mangled by C
        movq    (%rax), %rax
        call    *%rax
-
+       
        popq  %rdi            // restore state
        popq  %rsi
+       popq  %rbp
   ret
-
+       
 
 ASM_GLOBAL ASM_PFX(GasketmsSleep)
 ASM_PFX(GasketmsSleep):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
        pushq     %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
+  movq    %rcx, %rdi    // Swizzle args 
 
        call    ASM_PFX(msSleep)
-
+       
        popq  %rdi            // restore state
        popq  %rsi
+       popq  %rbp
   ret
-
-
+       
+       
 ASM_GLOBAL ASM_PFX(Gasketexit)
 ASM_PFX(Gasketexit):
-  movq    %rcx, %rdi    // Swizzle args
+  movq    %rcx, %rdi    // Swizzle args 
        call    ASM_PFX(exit)           // Less to do as we will never return to EFI ABI world
 LDEAD_LOOP:
   jmp  LDEAD_LOOP       // _exit should never return
@@ -172,695 +202,1071 @@ LDEAD_LOOP:
 
 ASM_GLOBAL ASM_PFX(GasketSetTimer)
 ASM_PFX(GasketSetTimer):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+       pushq     %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
        pushq     %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        call    ASM_PFX(SetTimer)
-
+       
        popq  %rdi            // restore state
        popq  %rsi
+       popq  %rbp
   ret
 
-
+       
 ASM_GLOBAL ASM_PFX(GasketGetLocalTime)
 ASM_PFX(GasketGetLocalTime):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
+  movq    %rcx, %rdi    // Swizzle args 
 
        call    ASM_PFX(GetLocalTime)
 
-       popq  %rdi            // restore state
-       popq  %rsi
+  popq  %rdi            // restore state
+  popq  %rsi
+       popq  %rbp
   ret
 
-
+  
 
 ASM_GLOBAL ASM_PFX(Gasketgmtime)
 ASM_PFX(Gasketgmtime):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
 
        call    ASM_PFX(localtime)
 
-       popq  %rdi            // restore state
-       popq  %rsi
+  popq  %rdi            // restore state
+  popq  %rsi
+       popq  %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(GasketGetTimeZone)
 ASM_PFX(GasketGetTimeZone):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
        call    ASM_PFX(GetTimeZone)
 
-       popq  %rdi            // restore state
-       popq  %rsi
+  popq  %rdi            // restore state
+  popq  %rsi
+       popq  %rbp
   ret
 
-
+  
 ASM_GLOBAL ASM_PFX(GasketGetDayLight)
 ASM_PFX(GasketGetDayLight):
-LFB26:
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
        call    ASM_PFX(GetDayLight)
 
-       popq  %rdi            // restore state
-       popq  %rsi
+  popq  %rdi            // restore state
+  popq  %rsi
+       popq  %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketpoll)
 ASM_PFX(Gasketpoll):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(poll)
 
-       popq  %rdi            // restore state
-       popq  %rsi
+  popq  %rdi            // restore state
+  popq  %rsi
+       popq  %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(Gasketread)
 ASM_PFX(Gasketread):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(read)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketwrite)
 ASM_PFX(Gasketwrite):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(write)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketgetenv)
 ASM_PFX(Gasketgetenv):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(getenv)
+  movq    %rcx, %rdi    // Swizzle args 
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(getenv)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketopen)
 ASM_PFX(Gasketopen):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(open)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketlseek)
 ASM_PFX(Gasketlseek):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(lseek)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketftruncate)
 ASM_PFX(Gasketftruncate):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(ftruncate)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketclose)
 ASM_PFX(Gasketclose):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(close)
+  movq    %rcx, %rdi    // Swizzle args 
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(close)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(Gasketmkdir)
 ASM_PFX(Gasketmkdir):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        call      ASM_PFX(mkdir)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketunlink)
 ASM_PFX(Gasketunlink):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(unlink)
+  movq    %rcx, %rdi    // Swizzle args 
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(unlink)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketGetErrno)
 ASM_PFX(GasketGetErrno):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-       call    ASM_PFX(GetErrno)
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call    ASM_PFX(GetErrno)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 ASM_GLOBAL ASM_PFX(Gasketclosedir)
 ASM_PFX(Gasketclosedir):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
 
        call      ASM_PFX(closedir)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketrename)
 ASM_PFX(Gasketrename):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        call      ASM_PFX(rename)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketmktime)
 ASM_PFX(Gasketmktime):
-LFB42:
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        call      ASM_PFX(mktime)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketfsync)
 ASM_PFX(Gasketfsync):
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        call      ASM_PFX(fsync)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketchmod)
 ASM_PFX(Gasketchmod):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        call      ASM_PFX(chmod)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketutime)
 ASM_PFX(Gasketutime):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(utime)
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(utime)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gaskettcflush)
 ASM_PFX(Gaskettcflush):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(tcflush)
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(tcflush)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketUgaCreate)
 ASM_PFX(GasketUgaCreate):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(UgaCreate)
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(UgaCreate)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketperror)
 ASM_PFX(Gasketperror):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(perror)
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(perror)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketioctl)
 ASM_PFX(Gasketioctl):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(UnixIoCtl1)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gasketfcntl)
 ASM_PFX(Gasketfcntl):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(UnixFcntl1)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(Gasketcfsetispeed)
 ASM_PFX(Gasketcfsetispeed):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(cfsetispeed)
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(cfsetispeed)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(Gasketcfsetospeed)
 ASM_PFX(Gasketcfsetospeed):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(cfsetospeed)
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(cfsetospeed)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gaskettcgetattr)
 ASM_PFX(Gaskettcgetattr):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(tcgetattr)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(Gaskettcsetattr)
 ASM_PFX(Gaskettcsetattr):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(tcsetattr)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketUnixPeCoffGetEntryPoint)
 ASM_PFX(GasketUnixPeCoffGetEntryPoint):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(SecPeCoffGetEntryPoint)
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(SecPeCoffGetEntryPoint)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction)
 ASM_PFX(GasketUnixPeCoffRelocateImageExtraAction):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(SecPeCoffRelocateImageExtraAction)
+  movq    %rcx, %rdi    // Swizzle args 
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(SecPeCoffRelocateImageExtraAction)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction)
 ASM_PFX(GasketUnixPeCoffUnloadImageExtraAction):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
 
        call      ASM_PFX(SecPeCoffLoaderUnloadImageExtraAction)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
 
-       popq    %rdi          // restore state
-       popq    %rsi
+
+
+
+
+ASM_GLOBAL ASM_PFX(Gasketsocket)
+ASM_PFX(Gasketsocket):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
+  movq    %r8,  %rdx
+
+  call    ASM_PFX(socket)
+  
+
+  popq  %rdi            // restore state
+  popq  %rsi
+       popq  %rbp
+  ret
+
+
+
+ASM_GLOBAL ASM_PFX(Gasketgetifaddrs)
+ASM_PFX(Gasketgetifaddrs):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+
+  call    ASM_PFX(getifaddrs)
+  
+
+       popq  %rbp
+       popq  %rsi
+       popq  %rbp
   ret
 
 
+
+ASM_GLOBAL _Gasketfreeifaddrs
+_Gasketfreeifaddrs:
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+
+  call    _freeifaddrs
+  
+
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
+
+
+
+
+
 ASM_GLOBAL ASM_PFX(GasketUgaClose)
 ASM_PFX(GasketUgaClose):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(UgaClose)
+  movq    %rcx, %rdi    // Swizzle args 
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(UgaClose)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
+
+
 ASM_GLOBAL ASM_PFX(GasketUgaSize)
 ASM_PFX(GasketUgaSize):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(UgaSize)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketUgaCheckKey)
 ASM_PFX(GasketUgaCheckKey):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-       call      ASM_PFX(UgaCheckKey)
+  movq    %rcx, %rdi    // Swizzle args 
 
-       popq    %rdi          // restore state
-       popq    %rsi
+       call      ASM_PFX(UgaCheckKey)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketUgaGetKey)
 ASM_PFX(GasketUgaGetKey):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
 
        call      ASM_PFX(UgaGetKey)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
 
-       popq    %rdi          // restore state
-       popq    %rsi
+ASM_GLOBAL ASM_PFX(GasketUgaKeySetState)
+ASM_PFX(GasketUgaKeySetState):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
+
+  call    ASM_PFX(UgaKeySetState)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
+
+
+ASM_GLOBAL ASM_PFX(GasketUgaRegisterKeyNotify)
+ASM_PFX(GasketUgaRegisterKeyNotify):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
+  movq    %r8,  %rdx
+
+  call    ASM_PFX(UgaRegisterKeyNotify)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
+
+
+
 ASM_GLOBAL ASM_PFX(GasketUgaBlt)
 ASM_PFX(GasketUgaBlt):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
        call      ASM_PFX(UgaBlt)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
 
-       popq    %rdi          // restore state
-       popq    %rsi
+
+ASM_GLOBAL ASM_PFX(GasketUgaCheckPointer)
+ASM_PFX(GasketUgaCheckPointer):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+
+  call    ASM_PFX(UgaCheckPointer)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
+ASM_GLOBAL ASM_PFX(GasketUgaGetPointerState)
+ASM_PFX(GasketUgaGetPointerState):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
+
+  call    ASM_PFX(UgaGetPointerState)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
+
+
+ASM_GLOBAL ASM_PFX(GasketUnixEnableInterrupt)
+ASM_PFX(GasketUnixEnableInterrupt):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  call    ASM_PFX(UnixEnableInterrupt)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
+
+ASM_GLOBAL ASM_PFX(GasketUnixDisableInterrupt)
+ASM_PFX(GasketUnixDisableInterrupt):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  call    ASM_PFX(UnixDisableInterrupt)
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
+  ret
+
 //
 // UNIX ABI to EFI ABI call
 //
 // UINTN
 // ReverseGasketUint64 (
 //   void *Api,
-//   UINTN Arg1,
-//   UINTN Arg2,
-//   UINTN Arg3
+//   UINTN Arg1
 //   );
 ASM_GLOBAL ASM_PFX(ReverseGasketUint64)
 ASM_PFX(ReverseGasketUint64):
-  movq    %rdi, %rax    // Swizzle args
-  movq    %rsi, %r9
-//  movq    %rdx, %rdx
-  movq    %rcx, %r8
-  movq    %r9,  %rcx
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-       subq  $40, %rsp              // 32-byte shadow space plus alignment pad
-       call    *%rax
-  addq  $40, %rsp
+  movq    %rdi, %rax    // Swizzle args 
+  movq    %rsi, %rcx     
 
-       ret
+  subq  $32, %rsp        // 32-byte shadow space
+  call  *%rax
+  addq  $32, %rsp
 
+       popq   %rbp          
+  ret
+
+//
+// UNIX ABI to EFI ABI call
+//
+// UINTN
+// ReverseGasketUint64Uint64 (
+//   void *Api,
+//   UINTN Arg1
+//   UINTN Arg2
+//   );
+ASM_GLOBAL ASM_PFX(ReverseGasketUint64Uint64)
+ASM_PFX(ReverseGasketUint64Uint64):
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  movq    %rdi, %rax    // Swizzle args 
+  movq    %rsi, %rcx     
+
+  subq  $32, %rsp        // 32-byte shadow space
+  call  *%rax
+  addq  $32, %rsp
+
+       popq   %rbp          
+  ret
+  
 
 // Sec PPI Callbacks
 
 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiLoadFile)
 ASM_PFX(GasketSecUnixPeiLoadFile):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
        call      ASM_PFX(SecUnixPeiLoadFile)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+  popq    %rbp
   ret
 
 
 
 ASM_GLOBAL ASM_PFX(GasketSecUnixPeiAutoScan)
 ASM_PFX(GasketSecUnixPeiAutoScan):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
 
        call      ASM_PFX(SecUnixPeiAutoScan)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 ASM_GLOBAL ASM_PFX(GasketSecUnixUnixThunkAddress)
 ASM_PFX(GasketSecUnixUnixThunkAddress):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
        call      ASM_PFX(SecUnixUnixThunkAddress)
+  
 
-       popq    %rdi          // restore state
+       popq    %rdi
        popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketSecPeiReportStatusCode)
 ASM_PFX(GasketSecPeiReportStatusCode):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
   movq    %r9,  %rcx
   movq    $0,   %r8     // BugBug: This should come from the stack
   movq    $0,   %r9     //         But we can cheat since they are optional for bringup....
 
        call      ASM_PFX(SecPeiReportStatusCode)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
 ASM_GLOBAL ASM_PFX(GasketSecUnixFdAddress)
 ASM_PFX(GasketSecUnixFdAddress):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
+
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
        call      ASM_PFX(SecUnixFdAddress)
 
-       popq    %rdi          // restore state
-       popq    %rsi
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
@@ -868,18 +1274,22 @@ ASM_PFX(GasketSecUnixFdAddress):
 
 ASM_GLOBAL ASM_PFX(GasketSecTemporaryRamSupport)
 ASM_PFX(GasketSecTemporaryRamSupport):
-       pushq     %rsi          // %rsi & %rdi are volatie in Unix and callee-save in EFI ABI
-       pushq     %rdi
+       pushq   %rbp            // stack frame is for the debugger
+  movq    %rsp, %rbp
+
+  pushq   %rsi          // %rsi & %rdi are volatile in Unix and callee-save in EFI ABI
+  pushq   %rdi
 
-  movq    %rcx, %rdi    // Swizzle args
-  movq    %rdx, %rsi
+  movq    %rcx, %rdi    // Swizzle args 
+  movq    %rdx, %rsi     
   movq    %r8,  %rdx
   movq    %r9,  %rcx
 
        call      ASM_PFX(SecTemporaryRamSupport)
-
-       popq    %rdi          // restore state
-       popq    %rsi
+  
+  popq    %rdi          // restore state
+  popq    %rsi
+       popq    %rbp
   ret
 
 
index dfb618b39572bc504bc1010d6ef74fcfba484a7b..e964e4d178b950bb521b4fa4ca60eb5cbd1d303e 100644 (file)
@@ -39,7 +39,9 @@
 #------------------------------------------------------------------------------\r
 ASM_GLOBAL ASM_PFX(PeiSwitchStacks)\r
 ASM_PFX(PeiSwitchStacks):\r
-//  movq    %rdx, %rdx   \r
+         pushq   %rbp            // stack frame is for the debugger\r
+       movq    %rsp, %rbp\r
+\r
     movq    %r8,  %rsp\r
     \r
     movq    %rdi, %rax\r
@@ -50,7 +52,7 @@ ASM_PFX(PeiSwitchStacks):
     # Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,\r
     # in case the callee wishes to spill them.\r
     #\r
-         subq    $40, %rsp  // 32-byte shadow space plus alignment pad\r
+         subq    $32, %rsp  // 32-byte shadow space plus alignment pad\r
     call    *%rax\r
 \r
 \r
@@ -74,6 +76,9 @@ ASM_PFX(PeiSwitchStacks):
 #------------------------------------------------------------------------------\r
 ASM_GLOBAL ASM_PFX(UnixPeiSwitchStacks)\r
 ASM_PFX(UnixPeiSwitchStacks):\r
+         pushq   %rbp            // stack frame is for the debugger\r
+       movq    %rsp, %rbp\r
+\r
     mov     %rdi, %rax\r
     mov     %rsi, %rdi\r
     mov     %rdx, %rsi\r
@@ -100,12 +105,16 @@ ASM_PFX(UnixPeiSwitchStacks):
 #------------------------------------------------------------------------------    \r
 ASM_GLOBAL ASM_PFX(SecSwitchStack)\r
 ASM_PFX(SecSwitchStack):\r
+       pushq   %rbp            // stack frame is for the debugger\r
+  movq    %rsp, %rbp\r
 \r
   mov     %rsp, %rax\r
   sub     %rdi, %rax\r
   add     %rsi, %rax\r
   mov    (%rip), %r10\r
   mov    %r10, (%rax) \r
+  \r
+  popq   %rbp\r
   ret\r
   \r
   
\ No newline at end of file
index 00c0414211c1e7a603ed0fedaa630ceac1c3f876..52618d73a09222b6c5dcd43602f4d489aa8371d0 100644 (file)
@@ -15,7 +15,7 @@ Module Name:
 \r
 Abstract:\r
 \r
-This following section documents the envirnoment variables for the Win UNIX \r
+This following section documents the environment variables for the UNIX \r
 build.  These variables are used to define the (virtual) hardware \r
 configuration of the UNIX environment\r
 \r
@@ -118,15 +118,17 @@ EFI_DRIVER_BINDING_PROTOCOL           gUnixBusDriverBinding = {
 // device path.\r
 //\r
 UNIX_PCD_ENTRY  mPcdEnvironment[] = {\r
-  {PcdToken(PcdUnixConsole),       &gEfiUnixConsoleGuid},\r
-  {PcdToken(PcdUnixUga),           &gEfiUnixUgaGuid},\r
-  {PcdToken(PcdUnixFileSystem),    &gEfiUnixFileSystemGuid},\r
-  {PcdToken(PcdUnixSerialPort),    &gEfiUnixSerialPortGuid},\r
-  {PcdToken(PcdUnixVirtualDisk),   &gEfiUnixVirtualDisksGuid},\r
-  {PcdToken(PcdUnixPhysicalDisk),  &gEfiUnixPhysicalDisksGuid},\r
-  {PcdToken(PcdUnixCpuModel),      &gEfiUnixCPUModelGuid},\r
-  {PcdToken(PcdUnixCpuSpeed),      &gEfiUnixCPUSpeedGuid},\r
-  {PcdToken(PcdUnixMemorySize),    &gEfiUnixMemoryGuid}\r
+  {PcdToken(PcdUnixConsole),           &gEfiUnixConsoleGuid},\r
+  {PcdToken(PcdUnixUga),               &gEfiUnixUgaGuid},\r
+  {PcdToken(PcdUnixGop),               &gEfiUnixGopGuid},\r
+  {PcdToken(PcdUnixFileSystem),        &gEfiUnixFileSystemGuid},\r
+  {PcdToken(PcdUnixSerialPort),        &gEfiUnixSerialPortGuid},\r
+  {PcdToken(PcdUnixVirtualDisk),       &gEfiUnixVirtualDisksGuid},\r
+  {PcdToken(PcdUnixPhysicalDisk),      &gEfiUnixPhysicalDisksGuid},\r
+  {PcdToken(PcdUnixCpuModel),          &gEfiUnixCPUModelGuid},\r
+  {PcdToken(PcdUnixCpuSpeed),          &gEfiUnixCPUSpeedGuid},\r
+  {PcdToken(PcdUnixMemorySize),        &gEfiUnixMemoryGuid},\r
+  {PcdToken(PcdUnixNetworkInterface),  &gEfiUnixNetworkGuid}\r
 };\r
 \r
 VOID *\r
@@ -168,13 +170,6 @@ Returns:
   None\r
 \r
 --*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    ControllerHandle - add argument and description to function comment\r
-// TODO:    RemainingDevicePath - add argument and description to function comment\r
-// TODO:    EFI_UNSUPPORTED - add return value to function comment\r
-// TODO:    EFI_UNSUPPORTED - add return value to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   EFI_STATUS                Status;\r
   EFI_DEVICE_PATH_PROTOCOL  *ParentDevicePath;\r
@@ -300,12 +295,6 @@ Returns:
   None\r
 \r
 --*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    ControllerHandle - add argument and description to function comment\r
-// TODO:    RemainingDevicePath - add argument and description to function comment\r
-// TODO:    EFI_OUT_OF_RESOURCES - add return value to function comment\r
-// TODO:    EFI_OUT_OF_RESOURCES - add return value to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   EFI_STATUS                      Status;\r
   EFI_STATUS                      InstallStatus;\r
@@ -403,7 +392,7 @@ Returns:
     StartString = TempStr;\r
 \r
     //\r
-    // Parse the envirnment variable into sub strings using '!' as a delimator.\r
+    // Parse the environment variable into sub strings using '!' as a delimator.\r
     // Each substring needs it's own handle to be added to the system. This code\r
     // does not understand the sub string. Thats the device drivers job.\r
     //\r
@@ -566,13 +555,6 @@ Returns:
     None\r
 \r
 --*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    ControllerHandle - add argument and description to function comment\r
-// TODO:    NumberOfChildren - add argument and description to function comment\r
-// TODO:    ChildHandleBuffer - add argument and description to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
-// TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   EFI_STATUS                Status;\r
   UINTN                     Index;\r
index bf83906cb29ef39e83ea4486a48e9516da1de3c7..b5eb940f42c559f81c276502def18419bc0a16a7 100644 (file)
@@ -61,6 +61,7 @@
 [Guids]\r
   gEfiUnixConsoleGuid                          # ALWAYS_CONSUMED\r
   gEfiUnixUgaGuid                              # ALWAYS_CONSUMED\r
+  gEfiUnixGopGuid                              # ALWAYS_CONSUMED\r
   gEfiUnixSerialPortGuid                       # ALWAYS_CONSUMED\r
   gEfiUnixFileSystemGuid                       # ALWAYS_CONSUMED\r
   gEfiUnixPhysicalDisksGuid                    # ALWAYS_CONSUMED\r
@@ -68,6 +69,7 @@
   gEfiUnixCPUModelGuid\r
   gEfiUnixCPUSpeedGuid\r
   gEfiUnixMemoryGuid\r
+  gEfiUnixNetworkGuid\r
 \r
 \r
 [Protocols]\r
@@ -86,5 +88,7 @@
   gEfiUnixPkgTokenSpaceGuid.PcdUnixVirtualDisk\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixFileSystem\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixUga\r
+  gEfiUnixPkgTokenSpaceGuid.PcdUnixGop\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixConsole\r
+  gEfiUnixPkgTokenSpaceGuid.PcdUnixNetworkInterface\r
 \r
diff --git a/UnixPkg/UnixGopDxe/ComponentName.c b/UnixPkg/UnixGopDxe/ComponentName.c
new file mode 100644 (file)
index 0000000..e57e85d
--- /dev/null
@@ -0,0 +1,251 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Portions copyright (c) 2010, Apple, Inc. All rights reserved.\r
+This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  ComponentName.c\r
+\r
+Abstract:\r
+\r
+--*/\r
+\r
+#include "UnixGop.h"\r
+\r
+//\r
+// EFI Component Name Functions\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+UnixGopComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UnixGopComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  );\r
+\r
+//\r
+// EFI Component Name Protocol\r
+//\r
+EFI_COMPONENT_NAME_PROTOCOL     gUnixGopComponentName = {\r
+  UnixGopComponentNameGetDriverName,\r
+  UnixGopComponentNameGetControllerName,\r
+  "eng"\r
+};\r
+\r
+//\r
+// EFI Component Name 2 Protocol\r
+//\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUnixGopComponentName2 = {\r
+  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) UnixGopComponentNameGetDriverName,\r
+  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) UnixGopComponentNameGetControllerName,\r
+  "en"\r
+};\r
+\r
+\r
+EFI_UNICODE_STRING_TABLE mUnixGopDriverNameTable[] = {\r
+  { "eng", L"Unix GOP Driver" },\r
+  { NULL , NULL }\r
+};\r
+\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the driver.\r
+\r
+  This function retrieves the user readable name of a driver in the form of a\r
+  Unicode string. If the driver specified by This has a user readable name in\r
+  the language specified by Language, then a pointer to the driver name is\r
+  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
+  by This does not support the language specified by Language,\r
+  then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language. This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  DriverName[out]       A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                driver specified by This in the language\r
+                                specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
+                                This and the language specified by Language was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixGopComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  )\r
+{\r
+  return LookupUnicodeString2 (\r
+           Language,\r
+           This->SupportedLanguages,\r
+           mUnixGopDriverNameTable,\r
+           DriverName,\r
+           (BOOLEAN)(This == &gUnixGopComponentName)\r
+           );\r
+}\r
+\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by a driver.\r
+\r
+  This function retrieves the user readable name of the controller specified by\r
+  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
+  driver specified by This has a user readable name in the language specified by\r
+  Language, then a pointer to the controller name is returned in ControllerName,\r
+  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
+  managing the controller specified by ControllerHandle and ChildHandle,\r
+  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  ControllerHandle[in]  The handle of a controller that the driver\r
+                                specified by This is managing.  This handle\r
+                                specifies the controller whose name is to be\r
+                                returned.\r
+\r
+  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
+                                the name of.  This is an optional parameter that\r
+                                may be NULL.  It will be NULL for device\r
+                                drivers.  It will also be NULL for a bus drivers\r
+                                that wish to retrieve the name of the bus\r
+                                controller.  It will not be NULL for a bus\r
+                                driver that wishes to retrieve the name of a\r
+                                child controller.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language.  This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified in\r
+                                RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                controller specified by ControllerHandle and\r
+                                ChildHandle in the language specified by\r
+                                Language from the point of view of the driver\r
+                                specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
+                                the language specified by Language for the\r
+                                driver specified by This was returned in\r
+                                DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixGopComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  )\r
+{\r
+  EFI_STATUS                    Status;\r
+  EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput;\r
+  GOP_PRIVATE_DATA              *Private;\r
+\r
+  //\r
+  // This is a device driver, so ChildHandle must be NULL.\r
+  //\r
+  if (ChildHandle != NULL) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
+  //\r
+  // Make sure this driver is currently managing ControllerHandle\r
+  //\r
+  Status = EfiTestManagedDevice (\r
+             ControllerHandle,\r
+             gUnixGopDriverBinding.DriverBindingHandle,\r
+             &gEfiUnixIoProtocolGuid\r
+             );\r
+  if (EFI_ERROR (Status)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+  //\r
+  // Get our context back\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  ControllerHandle,\r
+                  &gEfiGraphicsOutputProtocolGuid,\r
+                  (VOID **)&GraphicsOutput,\r
+                  gUnixGopDriverBinding.DriverBindingHandle,\r
+                  ControllerHandle,\r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
+  Private = GOP_PRIVATE_DATA_FROM_THIS (GraphicsOutput);\r
+\r
+  return LookupUnicodeString2 (\r
+           Language,\r
+           This->SupportedLanguages,\r
+           Private->ControllerNameTable,\r
+           ControllerName,\r
+           (BOOLEAN)(This == &gUnixGopComponentName)\r
+           );\r
+\r
+}\r
diff --git a/UnixPkg/UnixGopDxe/UnixGop.h b/UnixPkg/UnixGopDxe/UnixGop.h
new file mode 100644 (file)
index 0000000..16232e5
--- /dev/null
@@ -0,0 +1,377 @@
+/*++
+
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Portions copyright (c) 2010, Apple, Inc. 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        
+http://opensource.org/licenses/bsd-license.php                                            
+                                                                                          
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
+
+Module Name:
+
+  UnixGop.h
+
+Abstract:
+
+  Private data for the Gop driver that is bound to the Unix Thunk protocol 
+
+--*/
+
+#ifndef _UNIX_UGA_H_
+#define _UNIX_UGA_H_
+
+#include <PiDxe.h>
+#include "UnixDxe.h"
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+#include <Protocol/GraphicsOutput.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Protocol/SimpleTextInEx.h>
+#include <Protocol/SimplePointer.h>
+#include "Protocol/UnixUgaIo.h"
+
+#include <Guid/EventGroup.h>
+
+
+
+#define MAX_Q 256
+
+typedef struct {
+  UINTN         Front;
+  UINTN         Rear;
+  UINTN         Count;
+  EFI_INPUT_KEY Q[MAX_Q];
+} GOP_QUEUE_FIXED;
+
+#define UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('U', 'g', 'S', 'n')
+typedef struct _UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
+  UINTN                                 Signature;
+  EFI_HANDLE                            NotifyHandle;
+  EFI_KEY_DATA                          KeyData;
+  EFI_KEY_NOTIFY_FUNCTION               KeyNotificationFn;
+  EFI_EVENT                             Event;
+  LIST_ENTRY                            NotifyEntry;
+} UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY;
+  
+#define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff
+
+typedef struct {
+  UINT32                     HorizontalResolution;
+  UINT32                     VerticalResolution;
+  UINT32                     ColorDepth;
+  UINT32                     RefreshRate;
+} GOP_MODE_DATA;
+
+
+
+extern EFI_DRIVER_BINDING_PROTOCOL gUnixGopDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gUnixGopComponentName;
+
+#define UNIX_UGA_CLASS_NAME       L"UnixGopWindow"
+
+#define GOP_PRIVATE_DATA_SIGNATURE  SIGNATURE_32 ('G', 'o', 'p', 'N')
+typedef struct {
+  UINT64                      Signature;
+
+  EFI_HANDLE                        Handle;
+  EFI_GRAPHICS_OUTPUT_PROTOCOL      GraphicsOutput;
+  EFI_SIMPLE_TEXT_INPUT_PROTOCOL    SimpleTextIn;
+  EFI_SIMPLE_POINTER_PROTOCOL       SimplePointer;
+
+  EFI_UNIX_THUNK_PROTOCOL         *UnixThunk;
+  EFI_UNIX_UGA_IO_PROTOCOL        *UgaIo;
+
+  EFI_UNICODE_STRING_TABLE        *ControllerNameTable;
+
+  EFI_SIMPLE_POINTER_MODE         PointerMode;
+  //
+  // GOP Private Data for QueryMode ()
+  //
+  GOP_MODE_DATA                   *ModeData;
+
+
+  //
+  // UGA Private Data knowing when to start hardware
+  //
+  BOOLEAN                           HardwareNeedsStarting;
+
+  CHAR16                            *WindowName;
+
+  GOP_QUEUE_FIXED                   Queue;
+
+  EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInEx;
+  EFI_KEY_STATE                     KeyState;
+  LIST_ENTRY                        NotifyList;
+
+
+} GOP_PRIVATE_DATA;
+
+
+#define GOP_PRIVATE_DATA_FROM_THIS(a)  \
+         CR(a, GOP_PRIVATE_DATA, GraphicsOutput, GOP_PRIVATE_DATA_SIGNATURE)
+
+#define GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS(a)  \
+         CR(a, GOP_PRIVATE_DATA, SimpleTextIn, GOP_PRIVATE_DATA_SIGNATURE)
+
+#define GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS(a)  \
+         CR(a, GOP_PRIVATE_DATA, SimpleTextInEx, GOP_PRIVATE_DATA_SIGNATURE)
+
+#define GOP_PRIVATE_DATA_FROM_POINTER_MODE_THIS(a)  \
+         CR(a, GOP_PRIVATE_DATA, SimplePointer, GOP_PRIVATE_DATA_SIGNATURE)
+
+
+//
+// Global Protocol Variables
+//
+extern EFI_DRIVER_BINDING_PROTOCOL  gUnixGopDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL  gUnixGopComponentName;
+extern EFI_COMPONENT_NAME2_PROTOCOL gUnixGopComponentName2;
+
+//
+// Gop Hardware abstraction internal worker functions
+//
+EFI_STATUS
+UnixGopSupported (
+  IN  EFI_UNIX_IO_PROTOCOL  *UnixIo
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  UnixIo - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+UnixGopConstructor (
+  IN  GOP_PRIVATE_DATA    *Private
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Private - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+UnixGopDestructor (
+  IN  GOP_PRIVATE_DATA    *Private
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Private - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+//
+// EFI 1.1 driver model prototypes for Win UNIX UGA
+//
+
+EFI_STATUS
+EFIAPI
+UnixGopInitialize (
+  IN EFI_HANDLE            ImageHandle,
+  IN EFI_SYSTEM_TABLE      *SystemTable
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  ImageHandle - TODO: add argument description
+  SystemTable - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+EFIAPI
+UnixGopDriverBindingSupported (
+  IN  EFI_DRIVER_BINDING_PROTOCOL     *This,
+  IN  EFI_HANDLE                      Handle,
+  IN  EFI_DEVICE_PATH_PROTOCOL        *RemainingDevicePath
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  This                - TODO: add argument description
+  Handle              - TODO: add argument description
+  RemainingDevicePath - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+EFIAPI
+UnixGopDriverBindingStart (
+  IN  EFI_DRIVER_BINDING_PROTOCOL     *This,
+  IN  EFI_HANDLE                      Handle,
+  IN  EFI_DEVICE_PATH_PROTOCOL        *RemainingDevicePath
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  This                - TODO: add argument description
+  Handle              - TODO: add argument description
+  RemainingDevicePath - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+EFIAPI
+UnixGopDriverBindingStop (
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,
+  IN  EFI_HANDLE                   Handle,
+  IN  UINTN                        NumberOfChildren,
+  IN  EFI_HANDLE                   *ChildHandleBuffer
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  This              - TODO: add argument description
+  Handle            - TODO: add argument description
+  NumberOfChildren  - TODO: add argument description
+  ChildHandleBuffer - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+GopPrivateAddQ (
+  IN  GOP_PRIVATE_DATA    *Private,
+  IN  EFI_INPUT_KEY       Key
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Private - TODO: add argument description
+  Key     - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+UnixGopInitializeSimpleTextInForWindow (
+  IN  GOP_PRIVATE_DATA    *Private
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Private - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+UnixGopInitializeSimplePointerForWindow (
+  IN  GOP_PRIVATE_DATA    *Private
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Private - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+#endif
diff --git a/UnixPkg/UnixGopDxe/UnixGop.inf b/UnixPkg/UnixGopDxe/UnixGop.inf
new file mode 100644 (file)
index 0000000..1dd33bd
--- /dev/null
@@ -0,0 +1,73 @@
+## @file\r
+# Uga driver\r
+#\r
+# UGA is short hand for Universal Graphics Abstraction protocol.\r
+#  This file is a verision of UgaIo the uses UnixThunk system calls as an IO\r
+#  abstraction. For a PCI device UnixIo would be replaced with\r
+#  a PCI IO abstraction that abstracted a specific PCI device.\r
+# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Portions copyright (c) 2010, Apple, Inc. All rights reserved.\r
+#\r
+#  This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = UnixUga\r
+  FILE_GUID                      = f33cad86-8985-11db-8040-0040d02b1835\r
+  MODULE_TYPE                    = UEFI_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+\r
+  ENTRY_POINT                    = InitializeUnixGop\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+#  DRIVER_BINDING                =  gUnixUgaDriverBinding                        \r
+#  COMPONENT_NAME                =  gUnixUgaComponentName                        \r
+#\r
+\r
+[Sources]\r
+  ComponentName.c\r
+  UnixGopScreen.c\r
+  UnixGopDriver.c\r
+  UnixGopInput.c\r
+  UnixGop.h\r
+\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  UnixPkg/UnixPkg.dec\r
+\r
+\r
+[LibraryClasses]\r
+  UefiBootServicesTableLib\r
+  MemoryAllocationLib\r
+  BaseMemoryLib\r
+  UefiLib\r
+  UefiDriverEntryPoint\r
+  BaseLib\r
+  DebugLib\r
+\r
+\r
+[Guids]\r
+  gEfiEventExitBootServicesGuid                 # SOMETIMES_CONSUMED  Create Event: EVENT_GROUP_GUID\r
+  gEfiUnixGopGuid                              # ALWAYS_CONSUMED\r
+\r
+\r
+[Protocols]\r
+  gEfiGraphicsOutputProtocolGuid\r
+  gEfiSimpleTextInProtocolGuid                  # PROTOCOL BY_START\r
+  gEfiSimpleTextInputExProtocolGuid             # PROTOCOL BY_START\r
+  gEfiSimplePointerProtocolGuid                 # PROTOCOL BY_START\r
+  gEfiUnixIoProtocolGuid                        # PROTOCOL TO_START\r
+\r
diff --git a/UnixPkg/UnixGopDxe/UnixGopDriver.c b/UnixPkg/UnixGopDxe/UnixGopDriver.c
new file mode 100644 (file)
index 0000000..dcc79d9
--- /dev/null
@@ -0,0 +1,396 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Portions copyright (c) 2010, Apple, Inc. All rights reserved.\r
+This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  UnixGopDriver.c\r
+\r
+Abstract:\r
+\r
+  This file implements the EFI 1.1 Device Driver model requirements for UGA\r
+\r
+  UGA is short hand for Universal Graphics Abstraction protocol.\r
+\r
+  This file is a verision of UgaIo the uses UnixThunk system calls as an IO \r
+  abstraction. For a PCI device UnixIo would be replaced with\r
+  a PCI IO abstraction that abstracted a specific PCI device. \r
+\r
+--*/\r
+\r
+#include "UnixGop.h"\r
+\r
+\r
+EFI_STATUS\r
+FreeNotifyList (\r
+  IN OUT LIST_ENTRY           *ListHead\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+  ListHead   - The list head\r
+\r
+Returns:\r
+\r
+  EFI_SUCCESS           - Free the notify list successfully\r
+  EFI_INVALID_PARAMETER - ListHead is invalid.\r
+\r
+--*/\r
+{\r
+  UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY *NotifyNode;\r
+\r
+  if (ListHead == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+  while (!IsListEmpty (ListHead)) {\r
+    NotifyNode = CR (\r
+                   ListHead->ForwardLink, \r
+                   UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY, \r
+                   NotifyEntry, \r
+                   UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE\r
+                   );\r
+    RemoveEntryList (ListHead->ForwardLink);\r
+    gBS->FreePool (NotifyNode);\r
+  }\r
+  \r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UnixGopDriverBindingSupported (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL     *This,\r
+  IN  EFI_HANDLE                      Handle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL        *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+// TODO:    This - add argument and description to function comment\r
+// TODO:    Handle - add argument and description to function comment\r
+// TODO:    RemainingDevicePath - add argument and description to function comment\r
+{\r
+  EFI_STATUS              Status;\r
+  EFI_UNIX_IO_PROTOCOL  *UnixIo;\r
+\r
+  //\r
+  // Open the IO Abstraction(s) needed to perform the supported test\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  Handle,\r
+                  &gEfiUnixIoProtocolGuid,\r
+                  (VOID **)&UnixIo,\r
+                  This->DriverBindingHandle,\r
+                  Handle,\r
+                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  Status = UnixGopSupported (UnixIo);\r
+\r
+  //\r
+  // Close the I/O Abstraction(s) used to perform the supported test\r
+  //\r
+  gBS->CloseProtocol (\r
+        Handle,\r
+        &gEfiUnixIoProtocolGuid,\r
+        This->DriverBindingHandle,\r
+        Handle\r
+        );\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UnixGopDriverBindingStart (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL     *This,\r
+  IN  EFI_HANDLE                      Handle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL        *RemainingDevicePath\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+// TODO:    This - add argument and description to function comment\r
+// TODO:    Handle - add argument and description to function comment\r
+// TODO:    RemainingDevicePath - add argument and description to function comment\r
+// TODO:    EFI_UNSUPPORTED - add return value to function comment\r
+{\r
+  EFI_UNIX_IO_PROTOCOL  *UnixIo;\r
+  EFI_STATUS              Status;\r
+  GOP_PRIVATE_DATA        *Private;\r
+\r
+  //\r
+  // Grab the protocols we need\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  Handle,\r
+                  &gEfiUnixIoProtocolGuid,\r
+                  (VOID **)&UnixIo,\r
+                  This->DriverBindingHandle,\r
+                  Handle,\r
+                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
+  //\r
+  // Allocate Private context data for SGO inteface.\r
+  //\r
+  Private = NULL;\r
+  Status = gBS->AllocatePool (\r
+                  EfiBootServicesData,\r
+                  sizeof (GOP_PRIVATE_DATA),\r
+                  (VOID **)&Private\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    goto Done;\r
+  }\r
+  //\r
+  // Set up context record\r
+  //\r
+  Private->Signature           = GOP_PRIVATE_DATA_SIGNATURE;\r
+  Private->Handle              = Handle;\r
+  Private->UnixThunk           = UnixIo->UnixThunk;\r
+\r
+  Private->ControllerNameTable  = NULL;\r
+\r
+  AddUnicodeString (\r
+    "eng",\r
+    gUnixGopComponentName.SupportedLanguages,\r
+    &Private->ControllerNameTable,\r
+    UnixIo->EnvString\r
+    );\r
+  AddUnicodeString2 (\r
+    "en",\r
+    gUnixGopComponentName2.SupportedLanguages,\r
+    &Private->ControllerNameTable,\r
+    UnixIo->EnvString,\r
+    FALSE\r
+    );\r
+\r
+  Private->WindowName = UnixIo->EnvString;\r
+\r
+  Status              = UnixGopConstructor (Private);\r
+  if (EFI_ERROR (Status)) {\r
+    goto Done;\r
+  }\r
+  //\r
+  // Publish the Gop interface to the world\r
+  //\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &Private->Handle,\r
+                  &gEfiGraphicsOutputProtocolGuid,    &Private->GraphicsOutput,\r
+                  &gEfiSimpleTextInProtocolGuid,      &Private->SimpleTextIn,\r
+                  &gEfiSimplePointerProtocolGuid,     &Private->SimplePointer,\r
+//                  &gEfiSimpleTextInputExProtocolGuid, &Private->SimpleTextInEx,\r
+                  NULL\r
+                  );\r
+\r
+Done:\r
+  if (EFI_ERROR (Status)) {\r
+\r
+    gBS->CloseProtocol (\r
+          Handle,\r
+          &gEfiUnixIoProtocolGuid,\r
+          This->DriverBindingHandle,\r
+          Handle\r
+          );\r
+\r
+    if (Private != NULL) {\r
+      //\r
+      // On Error Free back private data\r
+      //\r
+      if (Private->ControllerNameTable != NULL) {\r
+        FreeUnicodeStringTable (Private->ControllerNameTable);\r
+      }\r
+      if (Private->SimpleTextIn.WaitForKey != NULL) {\r
+        gBS->CloseEvent (Private->SimpleTextIn.WaitForKey);\r
+      }\r
+      if (Private->SimpleTextInEx.WaitForKeyEx != NULL) {\r
+        gBS->CloseEvent (Private->SimpleTextInEx.WaitForKeyEx);\r
+      }\r
+      FreeNotifyList (&Private->NotifyList);\r
+\r
+      gBS->FreePool (Private);\r
+    }\r
+  }\r
+\r
+  return Status;\r
+}\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UnixGopDriverBindingStop (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   Handle,\r
+  IN  UINTN                        NumberOfChildren,\r
+  IN  EFI_HANDLE                   *ChildHandleBuffer\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+  None\r
+\r
+--*/\r
+// TODO:    This - add argument and description to function comment\r
+// TODO:    Handle - add argument and description to function comment\r
+// TODO:    NumberOfChildren - add argument and description to function comment\r
+// TODO:    ChildHandleBuffer - add argument and description to function comment\r
+// TODO:    EFI_NOT_STARTED - add return value to function comment\r
+// TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
+{\r
+  EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
+  EFI_STATUS                   Status;\r
+  GOP_PRIVATE_DATA             *Private;\r
+\r
+  Status = gBS->OpenProtocol (\r
+                  Handle,\r
+                  &gEfiGraphicsOutputProtocolGuid,\r
+                  (VOID **)&GraphicsOutput,\r
+                  This->DriverBindingHandle,\r
+                  Handle,\r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                  );\r
+  if (EFI_ERROR (Status)) {\r
+    //\r
+    // If the GOP interface does not exist the driver is not started\r
+    //\r
+    return EFI_NOT_STARTED;\r
+  }\r
+\r
+  //\r
+  // Get our private context information\r
+  //\r
+  Private = GOP_PRIVATE_DATA_FROM_THIS (GraphicsOutput);\r
+\r
+  //\r
+  // Remove the SGO interface from the system\r
+  //\r
+  Status = gBS->UninstallMultipleProtocolInterfaces (\r
+                  Private->Handle,\r
+                  &gEfiGraphicsOutputProtocolGuid,    &Private->GraphicsOutput,\r
+                  &gEfiSimpleTextInProtocolGuid,      &Private->SimpleTextIn,\r
+                  &gEfiSimplePointerProtocolGuid,     &Private->SimplePointer,\r
+//                  &gEfiSimpleTextInputExProtocolGuid, &Private->SimpleTextInEx,\r
+                  NULL\r
+                  );\r
+  if (!EFI_ERROR (Status)) {\r
+    //\r
+    // Shutdown the hardware\r
+    //\r
+    Status = UnixGopDestructor (Private);\r
+    if (EFI_ERROR (Status)) {\r
+      return EFI_DEVICE_ERROR;\r
+    }\r
+\r
+    gBS->CloseProtocol (\r
+          Handle,\r
+          &gEfiUnixIoProtocolGuid,\r
+          This->DriverBindingHandle,\r
+          Handle\r
+          );\r
+\r
+    //\r
+    // Free our instance data\r
+    //\r
+    FreeUnicodeStringTable (Private->ControllerNameTable);\r
+    \r
+    Status = gBS->CloseEvent (Private->SimpleTextIn.WaitForKey);\r
+    ASSERT_EFI_ERROR (Status);\r
+    \r
+    Status = gBS->CloseEvent (Private->SimpleTextInEx.WaitForKeyEx);\r
+    ASSERT_EFI_ERROR (Status);\r
+    \r
+    FreeNotifyList (&Private->NotifyList);\r
+\r
+    gBS->FreePool (Private);\r
+\r
+  }\r
+\r
+  return Status;\r
+}\r
+\r
+\r
+\r
+\r
+EFI_DRIVER_BINDING_PROTOCOL gUnixGopDriverBinding = {\r
+  UnixGopDriverBindingSupported,\r
+  UnixGopDriverBindingStart,\r
+  UnixGopDriverBindingStop,\r
+  0xa,\r
+  NULL,\r
+  NULL\r
+};\r
+\r
+\r
+\r
+/**\r
+  The user Entry Point for module UnixGop. The user code starts with this function.\r
+\r
+  @param[in] ImageHandle    The firmware allocated handle for the EFI image.  \r
+  @param[in] SystemTable    A pointer to the EFI System Table.\r
+  \r
+  @retval EFI_SUCCESS       The entry point is executed successfully.\r
+  @retval other             Some error occurs when executing this entry point.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeUnixGop (\r
+  IN EFI_HANDLE           ImageHandle,\r
+  IN EFI_SYSTEM_TABLE     *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS              Status;\r
+\r
+  Status = EfiLibInstallDriverBindingComponentName2 (\r
+             ImageHandle,\r
+             SystemTable,\r
+             &gUnixGopDriverBinding,\r
+             ImageHandle,\r
+             &gUnixGopComponentName,\r
+             &gUnixGopComponentName2\r
+             );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+\r
+  return Status;\r
+}\r
+\r
diff --git a/UnixPkg/UnixGopDxe/UnixGopInput.c b/UnixPkg/UnixGopDxe/UnixGopInput.c
new file mode 100644 (file)
index 0000000..e681fc9
--- /dev/null
@@ -0,0 +1,885 @@
+/*++
+
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Portions copyright (c) 2010, Apple, Inc. All rights reserved.
+Portions copyright (c) 2010, Apple Inc. 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
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+
+--*/
+
+#include "UnixGop.h"
+
+
+BOOLEAN
+GopPrivateIsKeyRegistered (
+  IN EFI_KEY_DATA  *RegsiteredData,
+  IN EFI_KEY_DATA  *InputData
+  )
+/*++
+
+Routine Description:
+
+Arguments:
+
+  RegsiteredData    - A pointer to a buffer that is filled in with the keystroke 
+                      state data for the key that was registered.
+  InputData         - A pointer to a buffer that is filled in with the keystroke 
+                      state data for the key that was pressed.
+
+Returns:
+  TRUE              - Key be pressed matches a registered key.
+  FLASE             - Match failed. 
+  
+--*/
+{
+  ASSERT (RegsiteredData != NULL && InputData != NULL);
+  
+  if ((RegsiteredData->Key.ScanCode    != InputData->Key.ScanCode) ||
+      (RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) {
+    return FALSE;  
+  }      
+  
+  //
+  // Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored.
+  //
+  if (RegsiteredData->KeyState.KeyShiftState != 0 &&
+      RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) {
+    return FALSE;    
+  }   
+  if (RegsiteredData->KeyState.KeyToggleState != 0 &&
+      RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) {
+    return FALSE;    
+  }     
+  
+  return TRUE;
+
+}
+
+
+VOID
+EFIAPI
+GopPrivateInvokeRegisteredFunction (
+  IN VOID           *Context,
+  IN EFI_KEY_DATA   *KeyData
+  )
+{ 
+  LIST_ENTRY                        *Link;
+  UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY  *CurrentNotify;
+  GOP_PRIVATE_DATA                  *Private = (GOP_PRIVATE_DATA *)Context;
+  
+  for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
+    CurrentNotify = CR (
+                      Link, 
+                      UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY, 
+                      NotifyEntry, 
+                      UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
+                      );
+    if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { 
+      // We could be called at a high TPL so signal an event to call the registered function 
+      // at a lower TPL.
+      gBS->SignalEvent (CurrentNotify->Event);
+    }
+  }    
+}
+
+
+
+//
+// Simple Text In implementation.
+//
+
+/**
+  Reset the input device and optionally run diagnostics
+
+  @param  This                 Protocol instance pointer.
+  @param  ExtendedVerification Driver may perform diagnostics on reset.
+
+  @retval EFI_SUCCESS          The device was reset.
+  @retval EFI_DEVICE_ERROR     The device is not functioning properly and could not be reset.
+
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimpleTextInReset (
+  IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL       *This,
+  IN BOOLEAN                              ExtendedVerification
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+  EFI_KEY_DATA      KeyData;
+  EFI_TPL           OldTpl;
+
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
+
+  //
+  // A reset is draining the Queue
+  //
+  while (Private->UgaIo->UgaGetKey (Private->UgaIo, &KeyData) == EFI_SUCCESS)
+    ;
+
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+  return EFI_SUCCESS;
+}
+
+
+/**
+  Reads the next keystroke from the input device. The WaitForKey Event can
+  be used to test for existence of a keystroke via WaitForEvent () call.
+
+  @param  This  Protocol instance pointer.
+  @param  Key   A pointer to a buffer that is filled in with the keystroke
+                information for the key that was pressed.
+
+  @retval EFI_SUCCESS      The keystroke information was returned.
+  @retval EFI_NOT_READY    There was no keystroke data available.
+  @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
+                           hardware errors.
+
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimpleTextInReadKeyStroke (
+  IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL       *This,
+  OUT EFI_INPUT_KEY                       *Key
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+  EFI_STATUS        Status;
+  EFI_TPL           OldTpl;
+  EFI_KEY_DATA      KeyData;
+
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_NOT_READY;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaGetKey(Private->UgaIo, &KeyData);
+  CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+
+  return Status;
+}
+
+
+
+/**
+  SimpleTextIn and SimpleTextInEx Notify Wait Event 
+
+  @param  Event                 Event whose notification function is being invoked.
+  @param  Context               Pointer to GOP_PRIVATE_DATA.
+
+**/
+VOID
+EFIAPI
+UnixGopSimpleTextInWaitForKey (
+  IN EFI_EVENT          Event,
+  IN VOID               *Context
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+  EFI_STATUS        Status;
+  EFI_TPL           OldTpl;
+
+  Private = (GOP_PRIVATE_DATA *) Context;
+  if (Private->UgaIo == NULL) {
+    return;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaCheckKey (Private->UgaIo);
+  if (!EFI_ERROR (Status)) {
+    //
+    // If a there is a key in the queue signal our event.
+    //
+    gBS->SignalEvent (Event);
+  }
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+}
+
+
+//
+// Simple Text Input Ex protocol functions
+//
+
+
+/**
+  The Reset() function resets the input device hardware. As part
+  of initialization process, the firmware/device will make a quick
+  but reasonable attempt to verify that the device is functioning.
+  If the ExtendedVerification flag is TRUE the firmware may take
+  an extended amount of time to verify the device is operating on
+  reset. Otherwise the reset operation is to occur as quickly as
+  possible. The hardware verification process is not defined by
+  this specification and is left up to the platform firmware or
+  driver to implement.
+
+  @param This                 A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
+
+  @param ExtendedVerification Indicates that the driver may
+                              perform a more exhaustive
+                              verification operation of the
+                              device during reset.
+
+
+  @retval EFI_SUCCESS       The device was reset.
+  
+  @retval EFI_DEVICE_ERROR  The device is not functioning
+                            correctly and could not be reset.
+
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimpleTextInExResetEx (
+  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,
+  IN BOOLEAN                            ExtendedVerification
+  )
+/*++
+
+  Routine Description:
+    Reset the input device and optionaly run diagnostics
+
+  Arguments:
+    This                 - Protocol instance pointer.
+    ExtendedVerification - Driver may perform diagnostics on reset.
+
+  Returns:
+    EFI_SUCCESS           - The device was reset.
+
+--*/
+{
+  GOP_PRIVATE_DATA *Private;
+
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
+  
+  return EFI_SUCCESS;
+}
+
+
+
+/**
+  The function reads the next keystroke from the input device. If
+  there is no pending keystroke the function returns
+  EFI_NOT_READY. If there is a pending keystroke, then
+  KeyData.Key.ScanCode is the EFI scan code defined in Error!
+  Reference source not found. The KeyData.Key.UnicodeChar is the
+  actual printable character or is zero if the key does not
+  represent a printable character (control key, function key,
+  etc.). The KeyData.KeyState is shift state for the character
+  reflected in KeyData.Key.UnicodeChar or KeyData.Key.ScanCode .
+  When interpreting the data from this function, it should be
+  noted that if a class of printable characters that are
+  normally adjusted by shift modifiers (e.g. Shift Key + "f"
+  key) would be presented solely as a KeyData.Key.UnicodeChar
+  without the associated shift state. So in the previous example
+  of a Shift Key + "f" key being pressed, the only pertinent
+  data returned would be KeyData.Key.UnicodeChar with the value
+  of "F". This of course would not typically be the case for
+  non-printable characters such as the pressing of the Right
+  Shift Key + F10 key since the corresponding returned data
+  would be reflected both in the KeyData.KeyState.KeyShiftState
+  and KeyData.Key.ScanCode values. UEFI drivers which implement
+  the EFI_SIMPLE_TEXT_INPUT_EX protocol are required to return
+  KeyData.Key and KeyData.KeyState values. These drivers must
+  always return the most current state of
+  KeyData.KeyState.KeyShiftState and
+  KeyData.KeyState.KeyToggleState. It should also be noted that
+  certain input devices may not be able to produce shift or toggle
+  state information, and in those cases the high order bit in the
+  respective Toggle and Shift state fields should not be active.
+
+  
+  @param This     A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
+
+  @param KeyData  A pointer to a buffer that is filled in with
+                  the keystroke state data for the key that was
+                  pressed.
+
+  
+  @retval EFI_SUCCESS     The keystroke information was
+                          returned.
+  
+  @retval EFI_NOT_READY   There was no keystroke data available.
+                          EFI_DEVICE_ERROR The keystroke
+                          information was not returned due to
+                          hardware errors.
+
+
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimpleTextInExReadKeyStrokeEx (
+  IN  EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+  OUT EFI_KEY_DATA                      *KeyData
+  )
+/*++
+
+  Routine Description:
+    Reads the next keystroke from the input device. The WaitForKey Event can 
+    be used to test for existance of a keystroke via WaitForEvent () call.
+
+  Arguments:
+    This       - Protocol instance pointer.
+    KeyData    - A pointer to a buffer that is filled in with the keystroke 
+                 state data for the key that was pressed.
+
+  Returns:
+    EFI_SUCCESS           - The keystroke information was returned.
+    EFI_NOT_READY         - There was no keystroke data availiable.
+    EFI_DEVICE_ERROR      - The keystroke information was not returned due to 
+                            hardware errors.
+    EFI_INVALID_PARAMETER - KeyData is NULL.                        
+
+--*/
+{
+  EFI_STATUS        Status;
+  GOP_PRIVATE_DATA  *Private;
+  EFI_TPL           OldTpl;
+
+
+  if (KeyData == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_NOT_READY;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaGetKey(Private->UgaIo, KeyData);
+
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+
+  return Status;
+}
+
+
+
+/**
+  The SetState() function allows the input device hardware to
+  have state settings adjusted.
+  
+  @param This           A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
+  
+  @param KeyToggleState Pointer to the EFI_KEY_TOGGLE_STATE to
+                        set the state for the input device.
+  
+  
+  @retval EFI_SUCCESS       The device state was set appropriately.
+
+  @retval EFI_DEVICE_ERROR  The device is not functioning
+                            correctly and could not have the
+                            setting adjusted.
+
+  @retval EFI_UNSUPPORTED   The device does not support the
+                            ability to have its state set.
+
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimpleTextInExSetState (
+  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,
+  IN EFI_KEY_TOGGLE_STATE               *KeyToggleState
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+  EFI_STATUS        Status;
+  EFI_TPL           OldTpl;
+
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_NOT_READY;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaKeySetState (Private->UgaIo, KeyToggleState);
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+
+  return Status;
+}
+
+
+/**
+  SimpleTextIn and SimpleTextInEx Notify Wait Event 
+
+  @param  Event                 Event whose notification function is being invoked.
+  @param  Context               Pointer to GOP_PRIVATE_DATA.
+
+**/
+VOID
+EFIAPI
+UnixGopRegisterKeyCallback (
+  IN EFI_EVENT          Event,
+  IN VOID               *Context
+  )
+{
+  UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY *ExNotify = (UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY *)Context;
+  
+  ExNotify->KeyNotificationFn (&ExNotify->KeyData);
+}
+
+
+
+/**
+  The RegisterKeystrokeNotify() function registers a function
+  which will be called when a specified keystroke will occur.
+  
+  @param This                     A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
+  
+  @param KeyData                  A pointer to a buffer that is filled in with
+                                  the keystroke information for the key that was
+                                  pressed.
+  
+  @param KeyNotificationFunction  Points to the function to be
+                                  called when the key sequence
+                                  is typed specified by KeyData.
+  
+  
+  @param NotifyHandle             Points to the unique handle assigned to
+                                  the registered notification.
+  
+  @retval EFI_SUCCESS           The device state was set
+                                appropriately.
+
+  @retval EFI_OUT_OF_RESOURCES  Unable to allocate necessary
+                                data structures.
+
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimpleTextInExRegisterKeyNotify (
+  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,
+  IN EFI_KEY_DATA                       *KeyData,
+  IN EFI_KEY_NOTIFY_FUNCTION            KeyNotificationFunction,
+  OUT EFI_HANDLE                        *NotifyHandle
+  )
+{
+  EFI_STATUS                          Status;
+  GOP_PRIVATE_DATA                    *Private;
+  UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY    *CurrentNotify;
+  LIST_ENTRY                          *Link;
+  UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY    *NewNotify;
+
+  if (KeyData == NULL || KeyNotificationFunction == NULL || NotifyHandle == NULL) {
+    return EFI_INVALID_PARAMETER;
+  }
+
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
+
+  //
+  // Return EFI_SUCCESS if the (KeyData, NotificationFunction) is already registered.
+  //
+  for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
+    CurrentNotify = CR (
+                      Link, 
+                      UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY, 
+                      NotifyEntry, 
+                      UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
+                      );
+    if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { 
+      if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
+        *NotifyHandle = CurrentNotify->NotifyHandle;
+        return EFI_SUCCESS;
+      }
+    }
+  }    
+  
+  //
+  // Allocate resource to save the notification function
+  //  
+  NewNotify = (UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) AllocateZeroPool (sizeof (UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY));
+  if (NewNotify == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+
+  NewNotify->Signature         = UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;     
+  NewNotify->KeyNotificationFn = KeyNotificationFunction;
+  NewNotify->NotifyHandle      = (EFI_HANDLE) NewNotify;
+  CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
+  InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
+  
+  Status = gBS->CreateEvent (
+                  EVT_NOTIFY_SIGNAL,
+                  TPL_NOTIFY,
+                  UnixGopRegisterKeyCallback,
+                  NewNotify,
+                  NewNotify->Event
+                  );
+  ASSERT_EFI_ERROR (Status);
+
+
+  *NotifyHandle = NewNotify->NotifyHandle;  
+  
+  return EFI_SUCCESS;
+  
+}
+
+
+/**
+  The UnregisterKeystrokeNotify() function removes the
+  notification which was previously registered.
+  
+  @param This               A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
+  
+  @param NotificationHandle The handle of the notification
+                            function being unregistered.
+  
+  @retval EFI_SUCCESS The device state was set appropriately.
+  
+  @retval EFI_INVALID_PARAMETER The NotificationHandle is
+                                invalid.
+
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimpleTextInExUnregisterKeyNotify (
+  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,
+  IN EFI_HANDLE                         NotificationHandle
+  )
+/*++
+
+  Routine Description:
+    Remove a registered notification function from a particular keystroke.
+
+  Arguments:
+    This                    - Protocol instance pointer.    
+    NotificationHandle      - The handle of the notification function being unregistered.
+
+  Returns:
+    EFI_SUCCESS             - The notification function was unregistered successfully.
+    EFI_INVALID_PARAMETER   - The NotificationHandle is invalid.
+                              
+--*/   
+{
+  GOP_PRIVATE_DATA                   *Private;
+  LIST_ENTRY                         *Link;
+  UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
+
+  if (NotificationHandle == NULL) {
+    return EFI_INVALID_PARAMETER;
+  } 
+
+  if (((UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) NotificationHandle)->Signature != UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE) {
+    return EFI_INVALID_PARAMETER;
+  } 
+
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
+
+  for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
+    CurrentNotify = CR (
+                      Link, 
+                      UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY, 
+                      NotifyEntry, 
+                      UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
+                      );       
+    if (CurrentNotify->NotifyHandle == NotificationHandle) {
+      //
+      // Remove the notification function from NotifyList and free resources
+      //
+      RemoveEntryList (&CurrentNotify->NotifyEntry);    
+      
+      gBS->CloseEvent (CurrentNotify->Event);
+
+      gBS->FreePool (CurrentNotify);            
+      return EFI_SUCCESS;
+    }
+  }
+
+  //
+  // Can not find the specified Notification Handle
+  //
+  return EFI_INVALID_PARAMETER;
+}
+
+
+
+/**
+  Initialize SimplelTextIn and SimpleTextInEx protocols in the Private
+  context structure.
+
+  @param  Private               Context structure to fill in. 
+
+  @return EFI_SUCCESS           Initialization was a success
+
+**/
+EFI_STATUS
+UnixGopInitializeSimpleTextInForWindow (
+  IN  GOP_PRIVATE_DATA    *Private
+  )
+{
+  EFI_STATUS  Status;
+
+  //
+  // Initialize Simple Text In protoocol
+  //
+  Private->SimpleTextIn.Reset         = UnixGopSimpleTextInReset;
+  Private->SimpleTextIn.ReadKeyStroke = UnixGopSimpleTextInReadKeyStroke;
+
+  Status = gBS->CreateEvent (
+                  EVT_NOTIFY_WAIT,
+                  TPL_NOTIFY,
+                  UnixGopSimpleTextInWaitForKey,
+                  Private,
+                  &Private->SimpleTextIn.WaitForKey
+                  );
+  ASSERT_EFI_ERROR (Status);
+  
+  
+  //
+  // Initialize Simple Text In Ex
+  //
+  
+  Private->SimpleTextInEx.Reset               = UnixGopSimpleTextInExResetEx;
+  Private->SimpleTextInEx.ReadKeyStrokeEx     = UnixGopSimpleTextInExReadKeyStrokeEx;
+  Private->SimpleTextInEx.SetState            = UnixGopSimpleTextInExSetState;
+  Private->SimpleTextInEx.RegisterKeyNotify   = UnixGopSimpleTextInExRegisterKeyNotify;
+  Private->SimpleTextInEx.UnregisterKeyNotify = UnixGopSimpleTextInExUnregisterKeyNotify;
+
+  Private->SimpleTextInEx.Reset (&Private->SimpleTextInEx, FALSE);
+  
+  InitializeListHead (&Private->NotifyList);
+
+  Status = gBS->CreateEvent (
+                  EVT_NOTIFY_WAIT,
+                  TPL_NOTIFY,
+                  UnixGopSimpleTextInWaitForKey,
+                  Private,
+                  &Private->SimpleTextInEx.WaitForKeyEx
+                  );
+  ASSERT_EFI_ERROR (Status);
+
+
+  return Status;
+}
+
+
+
+
+
+
+
+//
+// Simple Pointer implementation.
+//
+
+
+/**                                                                 
+  Resets the pointer device hardware.
+    
+  @param  This                  A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
+                                instance.                                   
+  @param  ExtendedVerification  Indicates that the driver may perform a more exhaustive
+                                verification operation of the device during reset.                                       
+                                
+  @retval EFI_SUCCESS           The device was reset.
+  @retval EFI_DEVICE_ERROR      The device is not functioning correctly and could not be reset.  
+                                   
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimplePointerReset (
+  IN EFI_SIMPLE_POINTER_PROTOCOL          *This,
+  IN BOOLEAN                              ExtendedVerification
+  )
+{
+  GOP_PRIVATE_DATA             *Private;
+  EFI_SIMPLE_POINTER_STATE     State;
+  EFI_TPL                      OldTpl;
+
+  Private = GOP_PRIVATE_DATA_FROM_POINTER_MODE_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
+
+  //
+  // A reset is draining the Queue
+  //
+  while (Private->UgaIo->UgaGetPointerState (Private->UgaIo, &State) == EFI_SUCCESS)
+    ;
+
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+  return EFI_SUCCESS;
+}
+
+
+/**                                                                 
+  Retrieves the current state of a pointer device.
+    
+  @param  This                  A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
+                                instance.                                   
+  @param  State                 A pointer to the state information on the pointer device.
+                                
+  @retval EFI_SUCCESS           The state of the pointer device was returned in State.
+  @retval EFI_NOT_READY         The state of the pointer device has not changed since the last call to
+                                GetState().                                                           
+  @retval EFI_DEVICE_ERROR      A device error occurred while attempting to retrieve the pointer device's
+                                current state.                                                           
+                                   
+**/
+EFI_STATUS
+EFIAPI
+UnixGopSimplePointerGetState (
+  IN EFI_SIMPLE_POINTER_PROTOCOL          *This,
+  IN OUT EFI_SIMPLE_POINTER_STATE         *State
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+  EFI_STATUS        Status;
+  EFI_TPL           OldTpl;
+
+  Private = GOP_PRIVATE_DATA_FROM_POINTER_MODE_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_NOT_READY;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaGetPointerState (Private->UgaIo, State);
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+
+  return Status;
+}
+
+
+/**
+  SimplePointer Notify Wait Event 
+
+  @param  Event                 Event whose notification function is being invoked.
+  @param  Context               Pointer to GOP_PRIVATE_DATA.
+
+**/
+VOID
+EFIAPI
+UnixGopSimplePointerWaitForInput (
+  IN EFI_EVENT          Event,
+  IN VOID               *Context
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+  EFI_STATUS        Status;
+  EFI_TPL           OldTpl;
+
+  Private = (GOP_PRIVATE_DATA *) Context;
+  if (Private->UgaIo == NULL) {
+    return;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaCheckPointer (Private->UgaIo);
+  if (!EFI_ERROR (Status)) {
+    //
+    // If the pointer state has changed, signal our event.
+    //
+    gBS->SignalEvent (Event);
+  }
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+}
+
+
+/**
+  SimplePointer constructor 
+
+  @param  Private Context structure to fill in.      
+
+  @retval EFI_SUCCESS Constructor had success        
+
+**/
+EFI_STATUS
+UnixGopInitializeSimplePointerForWindow (
+  IN  GOP_PRIVATE_DATA    *Private
+  )
+{
+  EFI_STATUS  Status;
+
+  //
+  // Initialize Simple Pointer protoocol
+  //
+  Private->PointerMode.ResolutionX = 1;
+  Private->PointerMode.ResolutionY = 1;
+  Private->PointerMode.ResolutionZ = 1;
+  Private->PointerMode.LeftButton  = TRUE;
+  Private->PointerMode.RightButton = TRUE;
+
+  Private->SimplePointer.Reset     = UnixGopSimplePointerReset;
+  Private->SimplePointer.GetState  = UnixGopSimplePointerGetState;
+  Private->SimplePointer.Mode      = &Private->PointerMode;
+
+  Status = gBS->CreateEvent (
+                  EVT_NOTIFY_WAIT,
+                  TPL_NOTIFY,
+                  UnixGopSimplePointerWaitForInput,
+                  Private,
+                  &Private->SimplePointer.WaitForInput
+                  );
+
+  return Status;
+}
diff --git a/UnixPkg/UnixGopDxe/UnixGopScreen.c b/UnixPkg/UnixGopDxe/UnixGopScreen.c
new file mode 100644 (file)
index 0000000..943cc83
--- /dev/null
@@ -0,0 +1,404 @@
+/*++
+
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Portions copyright (c) 2010, Apple, Inc. 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
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+    UnixGopScreen.c
+
+Abstract:
+
+  This file produces the graphics abstration of UGA. It is called by
+  UnixGopDriver.c file which deals with the EFI 1.1 driver model.
+  This file just does graphics.
+
+--*/
+
+#include "UnixGop.h"
+
+EFI_UNIX_THUNK_PROTOCOL *mUnix;
+EFI_EVENT               mGopScreenExitBootServicesEvent;
+
+GOP_MODE_DATA mGopModeData[] = {
+    { 800,  600, 0, 0 },
+    { 640,  480, 0, 0 },
+    { 720,  400, 0, 0 },
+    {1024,  768, 0, 0 },
+    {1280, 1024, 0, 0 }
+    };
+
+
+EFI_STATUS
+UnixGopStartWindow (
+  IN  GOP_PRIVATE_DATA    *Private,
+  IN  UINT32              HorizontalResolution,
+  IN  UINT32              VerticalResolution,
+  IN  UINT32              ColorDepth,
+  IN  UINT32              RefreshRate
+  );
+
+VOID
+EFIAPI
+KillUgaGopThread (
+  IN EFI_EVENT  Event,
+  IN VOID       *Context
+  );
+
+//
+// UGA Protocol Member Functions
+//
+
+EFI_STATUS
+EFIAPI
+UnixGopQuerytMode (
+  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL          *This,
+  IN  UINT32                                ModeNumber,
+  OUT UINTN                                 *SizeOfInfo,
+  OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  **Info
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+
+  Private = GOP_PRIVATE_DATA_FROM_THIS (This);
+
+  if (Info == NULL || SizeOfInfo == NULL || (UINTN) ModeNumber >= This->Mode->MaxMode) {
+    return EFI_INVALID_PARAMETER;
+  }
+
+  *Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+  if (*Info == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+
+  *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
+
+  (*Info)->Version = 0;
+  (*Info)->HorizontalResolution = Private->ModeData[ModeNumber].HorizontalResolution;
+  (*Info)->VerticalResolution   = Private->ModeData[ModeNumber].VerticalResolution;
+  (*Info)->PixelFormat = PixelBltOnly;
+  (*Info)->PixelsPerScanLine = (*Info)->HorizontalResolution;
+
+  return EFI_SUCCESS;
+}
+
+
+
+EFI_STATUS
+EFIAPI
+UnixGopSetMode (
+  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL  *This,
+  IN  UINT32                        ModeNumber
+  )
+{
+  EFI_STATUS                      Status;
+  GOP_PRIVATE_DATA                *Private;
+  GOP_MODE_DATA                   *ModeData;
+  EFI_GRAPHICS_OUTPUT_BLT_PIXEL   Fill;
+
+  Private = GOP_PRIVATE_DATA_FROM_THIS (This);
+
+  if (ModeNumber >= This->Mode->MaxMode) {
+    return EFI_UNSUPPORTED;
+  }
+
+  ModeData = &Private->ModeData[ModeNumber];
+  This->Mode->Mode = ModeNumber;
+  Private->GraphicsOutput.Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
+  Private->GraphicsOutput.Mode->Info->VerticalResolution = ModeData->VerticalResolution;
+  Private->GraphicsOutput.Mode->Info->PixelsPerScanLine = ModeData->HorizontalResolution;
+
+  if (Private->HardwareNeedsStarting) {
+    Status = UnixGopStartWindow (
+              Private,
+              ModeData->HorizontalResolution,
+              ModeData->VerticalResolution,
+              ModeData->ColorDepth,
+              ModeData->RefreshRate
+              );
+    if (EFI_ERROR (Status)) {
+      return EFI_DEVICE_ERROR;
+    }
+
+    Private->HardwareNeedsStarting = FALSE;
+  }
+  
+  
+  Status = Private->UgaIo->UgaSize(
+                            Private->UgaIo,
+                            ModeData->HorizontalResolution,
+                            ModeData->VerticalResolution
+                            );
+
+
+  Fill.Red                      = 0x7f;
+  Fill.Green                    = 0x7F;
+  Fill.Blue                     = 0x7f;
+  This->Blt (
+          This,
+          &Fill,
+          EfiBltVideoFill,
+          0,
+          0,
+          0,
+          0,
+          ModeData->HorizontalResolution,
+          ModeData->VerticalResolution,
+          ModeData->HorizontalResolution * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
+          );
+  return EFI_SUCCESS;
+}
+
+
+
+EFI_STATUS
+EFIAPI
+UnixGopBlt (
+  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL            *This,
+  IN  EFI_GRAPHICS_OUTPUT_BLT_PIXEL           *BltBuffer,   OPTIONAL
+  IN  EFI_GRAPHICS_OUTPUT_BLT_OPERATION       BltOperation,
+  IN  UINTN                                   SourceX,
+  IN  UINTN                                   SourceY,
+  IN  UINTN                                   DestinationX,
+  IN  UINTN                                   DestinationY,
+  IN  UINTN                                   Width,
+  IN  UINTN                                   Height,
+  IN  UINTN                                   Delta         OPTIONAL
+  )
+{
+  GOP_PRIVATE_DATA  *Private;
+  EFI_TPL           OriginalTPL;
+  EFI_STATUS        Status;
+  UGA_BLT_ARGS      GopBltArgs;
+
+  Private = GOP_PRIVATE_DATA_FROM_THIS (This);
+
+  if ((BltOperation < 0) || (BltOperation >= EfiGraphicsOutputBltOperationMax)) {
+    return EFI_INVALID_PARAMETER;
+  }
+
+  if (Width == 0 || Height == 0) {
+    return EFI_INVALID_PARAMETER;
+  }
+  //
+  // If Delta is zero, then the entire BltBuffer is being used, so Delta
+  // is the number of bytes in each row of BltBuffer.  Since BltBuffer is Width pixels size,
+  // the number of bytes in each row can be computed.
+  //
+  if (Delta == 0) {
+    Delta = Width * sizeof (EFI_UGA_PIXEL);
+  }
+
+  //
+  // We have to raise to TPL Notify, so we make an atomic write the frame buffer.
+  // We would not want a timer based event (Cursor, ...) to come in while we are
+  // doing this operation.
+  //
+  OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
+
+  //
+  // Pack UGA Draw protocol parameters to UGA_BLT_ARGS structure to adapt to
+  // GopBlt() API of Unix UGA IO protocol.
+  //
+  GopBltArgs.DestinationX = DestinationX;
+  GopBltArgs.DestinationY = DestinationY;
+  GopBltArgs.Height       = Height;
+  GopBltArgs.Width        = Width;
+  GopBltArgs.SourceX      = SourceX;
+  GopBltArgs.SourceY      = SourceY;
+  GopBltArgs.Delta        = Delta;
+  Status = Private->UgaIo->UgaBlt (
+                            Private->UgaIo,
+                            (EFI_UGA_PIXEL *)BltBuffer,
+                            BltOperation,
+                            &GopBltArgs
+                            );
+
+  gBS->RestoreTPL (OriginalTPL);
+
+  return Status;
+}
+
+
+//
+// Construction and Destruction functions
+//
+
+EFI_STATUS
+UnixGopSupported (
+  IN  EFI_UNIX_IO_PROTOCOL  *UnixIo
+  )
+/*++
+
+Routine Description:
+
+Arguments:
+
+Returns:
+
+  None
+
+--*/
+// TODO:    UnixIo - add argument and description to function comment
+// TODO:    EFI_UNSUPPORTED - add return value to function comment
+// TODO:    EFI_SUCCESS - add return value to function comment
+{
+  //
+  // Check to see if the IO abstraction represents a device type we support.
+  //
+  // This would be replaced a check of PCI subsystem ID, etc.
+  //
+  if (!CompareGuid (UnixIo->TypeGuid, &gEfiUnixGopGuid)) {
+    return EFI_UNSUPPORTED;
+  }
+
+  return EFI_SUCCESS;
+}
+
+
+VOID
+EFIAPI
+GopPrivateInvokeRegisteredFunction (
+  IN VOID           *Context,
+  IN EFI_KEY_DATA   *KeyData
+  );
+
+
+EFI_STATUS
+UnixGopStartWindow (
+  IN  GOP_PRIVATE_DATA    *Private,
+  IN  UINT32              HorizontalResolution,
+  IN  UINT32              VerticalResolution,
+  IN  UINT32              ColorDepth,
+  IN  UINT32              RefreshRate
+  )
+{
+  EFI_STATUS          Status;
+
+  mUnix  = Private->UnixThunk;
+
+  //
+  // Register to be notified on exit boot services so we can destroy the window.
+  //
+  Status = gBS->CreateEvent (
+                  EVT_SIGNAL_EXIT_BOOT_SERVICES,
+                  TPL_CALLBACK,
+                  KillUgaGopThread,
+                  Private,
+                  &mGopScreenExitBootServicesEvent
+                  );
+
+  Status = Private->UnixThunk->UgaCreate (&Private->UgaIo, Private->WindowName);
+  if (!EFI_ERROR (Status)) {
+    // Register callback to support RegisterKeyNotify()
+    Status  = Private->UgaIo->UgaRegisterKeyNotify (Private->UgaIo, GopPrivateInvokeRegisteredFunction, Private);
+    ASSERT_EFI_ERROR (Status);
+  }
+  return Status;
+}
+
+EFI_STATUS
+UnixGopConstructor (
+  GOP_PRIVATE_DATA    *Private
+  )
+{
+  Private->ModeData = mGopModeData;
+
+  Private->GraphicsOutput.QueryMode      = UnixGopQuerytMode;
+  Private->GraphicsOutput.SetMode        = UnixGopSetMode;
+  Private->GraphicsOutput.Blt            = UnixGopBlt;
+
+  //
+  // Allocate buffer for Graphics Output Protocol mode information
+  //
+  Private->GraphicsOutput.Mode = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE));
+  if (Private->GraphicsOutput.Mode == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+  Private->GraphicsOutput.Mode->Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+  if (Private->GraphicsOutput.Mode->Info == NULL) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+
+  Private->GraphicsOutput.Mode->MaxMode = sizeof(mGopModeData) / sizeof(GOP_MODE_DATA);
+  //
+  // Till now, we have no idea about the window size.
+  //
+  Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;
+  Private->GraphicsOutput.Mode->Info->Version = 0;
+  Private->GraphicsOutput.Mode->Info->HorizontalResolution = 0;
+  Private->GraphicsOutput.Mode->Info->VerticalResolution = 0;
+  Private->GraphicsOutput.Mode->Info->PixelFormat = PixelBltOnly;
+  Private->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
+  Private->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL;
+  Private->GraphicsOutput.Mode->FrameBufferSize = 0;
+
+  Private->HardwareNeedsStarting  = TRUE;
+  Private->UgaIo                  = NULL;
+
+  UnixGopInitializeSimpleTextInForWindow (Private);
+
+  UnixGopInitializeSimplePointerForWindow (Private);
+
+  return EFI_SUCCESS;
+}
+
+
+
+EFI_STATUS
+UnixGopDestructor (
+  GOP_PRIVATE_DATA     *Private
+  )
+{
+  if (!Private->HardwareNeedsStarting) {
+    Private->UgaIo->UgaClose (Private->UgaIo);
+    Private->UgaIo = NULL;
+  }
+
+  //
+  // Free graphics output protocol occupied resource
+  //
+  if (Private->GraphicsOutput.Mode != NULL) {
+    if (Private->GraphicsOutput.Mode->Info != NULL) {
+      FreePool (Private->GraphicsOutput.Mode->Info);
+    }
+    FreePool (Private->GraphicsOutput.Mode);
+  }
+
+  return EFI_SUCCESS;
+}
+
+VOID
+EFIAPI
+KillUgaGopThread (
+  IN EFI_EVENT  Event,
+  IN VOID       *Context
+  )
+/*++
+
+Routine Description:
+
+  This is the UGA screen's callback notification function for exit-boot-services.
+  All we do here is call UnixGopDestructor().
+
+Arguments:
+
+  Event   - not used
+  Context - pointer to the Private structure.
+
+Returns:
+
+  None.
+
+--*/
+{
+  EFI_STATUS  Status;
+  Status = UnixGopDestructor (Context);
+}
index f803cd7418a4a458100b86b22bdb00f667fb4a6c..eca2d9d55df3b761f56f2461210a714b414a4300 100644 (file)
   gEfiUnixPhysicalDisksGuid      = {0xf2bdcc96, 0x8985, 0x11db, {0x87, 0x19, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
   gEfiUnixFileSystemGuid         = {0xf2c16b9e, 0x8985, 0x11db, {0x92, 0xc8, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
   gEfiUnixUgaGuid                = {0xf2c8b80e, 0x8985, 0x11db, {0x93, 0xf1, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
+  gEfiUnixGopGuid                = {0xbace07c2, 0x8987, 0x11db, {0xa5, 0x9a, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
+\r
   gEfiUnixConsoleGuid            = {0xf2cc5d06, 0x8985, 0x11db, {0xbb, 0x19, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
   gEfiUnixMemoryGuid             = {0xf2d006cc, 0x8985, 0x11db, {0xa4, 0x72, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
   gEfiUnixCPUModelGuid           = {0xf2d3b330, 0x8985, 0x11db, {0x8a, 0xa3, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
   gEfiUnixCPUSpeedGuid           = {0xf2d74e5a, 0x8985, 0x11db, {0x97, 0x05, 0x00, 0x40, 0xd0, 0x2b, 0x18, 0x35}}\r
   gEfiUnixSerialPortGuid         = {0x6d3a727d, 0x66c8, 0x4d19, {0x87, 0xe6, 0x02, 0x15, 0x86, 0x14, 0x90, 0xf3}}\r
   gEfiUnixSystemConfigGuid       = {0x375ea976, 0x3ccd, 0x4e74, {0xa8, 0x45, 0x26, 0xb9, 0xb3, 0x24, 0xb1, 0x3c}}\r
+  gEfiUnixNetworkGuid            = {0x081603B4, 0x0F1D, 0x4022, {0xB6, 0xFD, 0x4C, 0xE3, 0x5E, 0x09, 0xA1, 0xA6}}\r
 \r
 [PcdsFixedAtBuild]\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixBootMode|1|UINT32|0x00001006\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixPhysicalDisk|L"E:RW;245760;512"|VOID*|0x00001000\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixVirtualDisk|L"FW;40960;512"|VOID*|0x00001001\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixUga|L"UGA Window"|VOID*|0x00001003\r
+  gEfiUnixPkgTokenSpaceGuid.PcdUnixGop|L"GOP Window"|VOID*|0x0000100e\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixFileSystem|L".!..\\..\\..\\..\\..\\EdkShellBinPkg\\bin\\ia32\\Apps"|VOID*|0x00001004\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixMemorySize|L"64!64"|VOID*|0x00001005\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixCpuModel|L"Intel(R) Processor Model"|VOID*|0x00001007\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixCpuSpeed|L"3000"|VOID*|0x00001008\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixConsole|L"Bus Driver Console Window"|VOID*|0x0000100a\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixSerialPort|L"/dev/ttyS0"|VOID*|0x00001002\r
+  gEfiUnixPkgTokenSpaceGuid.PcdUnixNetworkInterface|L"en0"|VOID*|0x0000100d\r
 \r
 \r
 [PcdsPatchableInModule]\r
index c76ea25c797c0949918b2dc089348602a5ec5c66..db57dc1a77cb5e82015b3b19c060c6be004bd111 100644 (file)
   gEfiUnixPkgTokenSpaceGuid.PcdUnixCpuSpeed|L"3000"\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixMemorySize|L"128!128"\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixSerialPort|L"/dev/ttyS0!/dev/ttyS1"\r
+  gEfiUnixPkgTokenSpaceGuid.PcdUnixNetworkInterface|L"en0"\r
 \r
 [PcdsDynamicHii.common.DEFAULT]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|L"Setup"|gEfiUnixSystemConfigGuid|0x0|80\r
   UnixPkg/UnixBlockIoDxe/UnixBlockIo.inf\r
   UnixPkg/UnixSerialIoDxe/UnixSerialIo.inf\r
   UnixPkg/UnixUgaDxe/UnixUga.inf\r
+  UnixPkg/UnixGopDxe/UnixGop.inf\r
+  \r
   UnixPkg/UnixConsoleDxe/UnixConsole.inf\r
   UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.inf\r
   MdeModulePkg/Application/HelloWorld/HelloWorld.inf\r
 \r
   #\r
   # Network stack drivers\r
-  # To test network drivers, need network Io driver(SnpNt32Io.dll), please refer to NETWORK-IO Subproject.\r
   #\r
+  UnixPkg/UnixSnpDxe/UnixSnpDxe.inf\r
   MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
   MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
   MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
index 81929cfc59e66df88546d9619e6d887d7a8fb5ae..22c134f9a00fa2597b99ecc278dd52f5c91c3fa5 100644 (file)
@@ -217,7 +217,9 @@ INF  UnixPkg/UnixBusDriverDxe/UnixBusDriver.inf
 INF  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf\r
 INF  UnixPkg/UnixBlockIoDxe/UnixBlockIo.inf\r
 INF  UnixPkg/UnixSerialIoDxe/UnixSerialIo.inf\r
-INF  UnixPkg/UnixUgaDxe/UnixUga.inf\r
+#INF  UnixPkg/UnixUgaDxe/UnixUga.inf\r
+INF  UnixPkg/UnixGopDxe/UnixGop.inf\r
+\r
 #INF  UnixPkg/UnixConsoleDxe/UnixConsole.inf\r
 INF  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf\r
 INF  MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf\r
@@ -229,19 +231,18 @@ INF  MdeModulePkg/Application/HelloWorld/HelloWorld.inf
 \r
 #\r
 # Network stack drivers\r
-# To test network drivers, need network Io driver(SnpNt32Io.dll), please refer to NETWORK-IO Subproject.\r
 #\r
-#INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
-#INF  UnixPkg/SnpUnixDxe/SnpUnixDxe.inf\r
+INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
+INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
+INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf\r
+INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
+INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
+INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
+INF  UnixPkg/UnixSnpDxe/UnixSnpDxe.inf\r
 \r
 #\r
 # Build from source or use checked in binary\r
index c4470cc27aa987be805f94e1ec0910c87acbc213..90f8ac1ae7aa249905174b90aa728872bd0e29b5 100644 (file)
@@ -5,6 +5,7 @@
 # The Emulation Platform can be used to debug individual modules, prior to creating\r
 #       a real platform. This also provides an example for how an DSC is created.\r
 # Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Portions copywrite (c) 2010, Apple, Inc. All rights reserved. \r
 #\r
 #    This program and the accompanying materials\r
 #    are licensed and made available under the terms and conditions of the BSD License\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixCpuSpeed|L"3000"\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixMemorySize|L"128!128"\r
   gEfiUnixPkgTokenSpaceGuid.PcdUnixSerialPort|L"/dev/ttyS0!/dev/ttyS1"\r
+  gEfiUnixPkgTokenSpaceGuid.PcdUnixNetworkInterface|L"en0"\r
 \r
 [PcdsDynamicHii.common.DEFAULT]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|L"Setup"|gEfiUnixSystemConfigGuid|0x0|80\r
 #       generated for it, but the binary will not be put into any firmware volume.\r
 #\r
 ###################################################################################################\r
-[Components.common]\r
+[Components]\r
 !if $(SEC_ONLY)\r
   ##\r
   #  SEC Phase modules\r
   UnixPkg/UnixBlockIoDxe/UnixBlockIo.inf\r
   UnixPkg/UnixSerialIoDxe/UnixSerialIo.inf\r
   UnixPkg/UnixUgaDxe/UnixUga.inf\r
+  UnixPkg/UnixGopDxe/UnixGop.inf\r
   UnixPkg/UnixConsoleDxe/UnixConsole.inf\r
   UnixPkg/UnixSimpleFileSystemDxe/UnixSimpleFileSystem.inf\r
   MdeModulePkg/Application/HelloWorld/HelloWorld.inf\r
 \r
   #\r
   # Network stack drivers\r
-  # To test network drivers, need network Io driver(SnpNt32Io.dll), please refer to NETWORK-IO Subproject.\r
   #\r
+  UnixPkg/UnixSnpDxe/UnixSnpDxe.inf\r
   MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
   MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
   MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
index 9f677464e1efe0ad0876bcffd2777250d4f9c2c3..a38a46155bef8e25d52c7a67e4105fe870d9bfe7 100644 (file)
@@ -2,6 +2,7 @@
 # This is Unix FDF file with UEFI HII features enabled\r
 #\r
 # Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Portions copyright (c) 2009 - 2010, Apple Inc. All rights reserved.\r
 #\r
 #    This program and the accompanying materials\r
 #    are licensed and made available under the terms and conditions of the BSD License\r
 # relocated in place (works, but not a great idea).\r
 #\r
 BaseAddress   = 0x102000000|gEfiUnixPkgTokenSpaceGuid.PcdUnixFdBaseAddress   #The base address of the FLASH Device.\r
-Size          = 0x004a0000|gEfiUnixPkgTokenSpaceGuid.PcdUnixFirmwareFdSize  #The size in bytes of the FLASH Device\r
+Size          = 0x005a0000|gEfiUnixPkgTokenSpaceGuid.PcdUnixFirmwareFdSize  #The size in bytes of the FLASH Device\r
 ErasePolarity = 1\r
 BlockSize     = 0x10000\r
-NumBlocks     = 0x4a\r
+NumBlocks     = 0x5a\r
 \r
 ################################################################################\r
 #\r
@@ -52,11 +53,11 @@ NumBlocks     = 0x4a
 # RegionType <FV, DATA, or FILE>\r
 #\r
 ################################################################################\r
-0x00000000|0x00480000\r
+0x00000000|0x00580000\r
 gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashFvRecoveryBase|gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashFvRecoverySize\r
 FV = FvRecovery\r
 \r
-0x00480000|0x0000c000\r
+0x00580000|0x0000c000\r
 gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize\r
 #NV_VARIABLE_STORE\r
 DATA = {\r
@@ -90,11 +91,11 @@ DATA = {
   0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\r
 }\r
 \r
-0x0048c000|0x00002000\r
+0x0058c000|0x00002000\r
 #NV_EVENT_LOG\r
 gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageEventLogBase|gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageEventLogSize\r
 \r
-0x0048e000|0x00002000\r
+0x0058e000|0x00002000\r
 gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize\r
 #NV_FTW_WORKING\r
 DATA = {\r
@@ -108,7 +109,7 @@ DATA = {
   0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\r
 }\r
 \r
-0x00490000|0x00010000\r
+0x00590000|0x00010000\r
 #NV_FTW_SPARE\r
 gEfiUnixPkgTokenSpaceGuid.PcdUnixFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize\r
 \r
@@ -217,7 +218,8 @@ INF  UnixPkg/UnixBusDriverDxe/UnixBusDriver.inf
 INF  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf\r
 INF  UnixPkg/UnixBlockIoDxe/UnixBlockIo.inf\r
 INF  UnixPkg/UnixSerialIoDxe/UnixSerialIo.inf\r
-INF  UnixPkg/UnixUgaDxe/UnixUga.inf\r
+#INF  UnixPkg/UnixUgaDxe/UnixUga.inf\r
+INF  UnixPkg/UnixGopDxe/UnixGop.inf\r
 #INF  UnixPkg/UnixConsoleDxe/UnixConsole.inf\r
 INF  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf\r
 INF  MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf\r
@@ -228,21 +230,20 @@ INF  MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
 INF  MdeModulePkg/Application/HelloWorld/HelloWorld.inf\r
 \r
 #\r
-# Need to port this to UnixPkg\r
 # Network stack drivers\r
-# To test network drivers, need network Io driver(SnpNt32Io.dll), please refer to NETWORK-IO Subproject.\r
 #\r
-#INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
-#INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
-#INF  UnixPkg/SnpUnixDxe/SnpUnixDxe.inf\r
+INF  UnixPkg/UnixSnpDxe/UnixSnpDxe.inf\r
+INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf\r
+INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf\r
+INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf\r
+INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
+INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
+INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
+INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
+\r
  \r
 !if $(COMPILE_BINS)\r
 INF FatPkg/EnhancedFatDxe/Fat.inf\r
diff --git a/UnixPkg/UnixSnpDxe/ComponentName.c b/UnixPkg/UnixSnpDxe/ComponentName.c
new file mode 100644 (file)
index 0000000..560a313
--- /dev/null
@@ -0,0 +1,318 @@
+/** @file\r
+\r
+ Copyright (c) 2010, Apple, Inc. All rights reserved.\r
+\r
+    This program and the accompanying materials\r
+    are licensed and made available under the terms and conditions of the BSD License\r
+    which accompanies this distribution. The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.php\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  ComponentName.c\r
+\r
+Abstract:\r
+\r
+-**/\r
+\r
+#include "UnixSnp.h"\r
+\r
+//\r
+// EFI Component Name Functions\r
+//\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the driver.\r
+\r
+  This function retrieves the user readable name of a driver in the form of a\r
+  Unicode string. If the driver specified by This has a user readable name in\r
+  the language specified by Language, then a pointer to the driver name is\r
+  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
+  by This does not support the language specified by Language,\r
+  then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language. This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  DriverName[out]       A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                driver specified by This in the language\r
+                                specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
+                                This and the language specified by Language was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  );\r
+\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by a driver.\r
+\r
+  This function retrieves the user readable name of the controller specified by\r
+  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
+  driver specified by This has a user readable name in the language specified by\r
+  Language, then a pointer to the controller name is returned in ControllerName,\r
+  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
+  managing the controller specified by ControllerHandle and ChildHandle,\r
+  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  ControllerHandle[in]  The handle of a controller that the driver\r
+                                specified by This is managing.  This handle\r
+                                specifies the controller whose name is to be\r
+                                returned.\r
+\r
+  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
+                                the name of.  This is an optional parameter that\r
+                                may be NULL.  It will be NULL for device\r
+                                drivers.  It will also be NULL for a bus drivers\r
+                                that wish to retrieve the name of the bus\r
+                                controller.  It will not be NULL for a bus\r
+                                driver that wishes to retrieve the name of a\r
+                                child controller.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language.  This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified in\r
+                                RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                controller specified by ControllerHandle and\r
+                                ChildHandle in the language specified by\r
+                                Language from the point of view of the driver\r
+                                specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
+                                the language specified by Language for the\r
+                                driver specified by This was returned in\r
+                                DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  );\r
+\r
+\r
+//\r
+// EFI Component Name Protocol\r
+//\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL  gUnixSnpDriverComponentName = {\r
+  UnixSnpDriverComponentNameGetDriverName,\r
+  UnixSnpDriverComponentNameGetControllerName,\r
+  "eng"\r
+};\r
+\r
+//\r
+// EFI Component Name 2 Protocol\r
+//\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUnixSnpDriverComponentName2 = {\r
+  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) UnixSnpDriverComponentNameGetDriverName,\r
+  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) UnixSnpDriverComponentNameGetControllerName,\r
+  "en"\r
+};\r
+\r
+\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUnixSnpDriverNameTable[] = {\r
+  {\r
+    "eng;en",\r
+    L"Unix SNP Driver"\r
+  },\r
+  {\r
+    NULL,\r
+    NULL\r
+  }\r
+};\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the driver.\r
+\r
+  This function retrieves the user readable name of a driver in the form of a\r
+  Unicode string. If the driver specified by This has a user readable name in\r
+  the language specified by Language, then a pointer to the driver name is\r
+  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
+  by This does not support the language specified by Language,\r
+  then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language. This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  DriverName[out]       A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                driver specified by This in the language\r
+                                specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
+                                This and the language specified by Language was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  )\r
+{\r
+  return LookupUnicodeString2 (\r
+           Language,\r
+           This->SupportedLanguages,\r
+           mUnixSnpDriverNameTable,\r
+           DriverName,\r
+           (BOOLEAN)(This == &gUnixSnpDriverComponentName)\r
+           );\r
+}\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by a driver.\r
+\r
+  This function retrieves the user readable name of the controller specified by\r
+  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
+  driver specified by This has a user readable name in the language specified by\r
+  Language, then a pointer to the controller name is returned in ControllerName,\r
+  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
+  managing the controller specified by ControllerHandle and ChildHandle,\r
+  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  ControllerHandle[in]  The handle of a controller that the driver\r
+                                specified by This is managing.  This handle\r
+                                specifies the controller whose name is to be\r
+                                returned.\r
+\r
+  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
+                                the name of.  This is an optional parameter that\r
+                                may be NULL.  It will be NULL for device\r
+                                drivers.  It will also be NULL for a bus drivers\r
+                                that wish to retrieve the name of the bus\r
+                                controller.  It will not be NULL for a bus\r
+                                driver that wishes to retrieve the name of a\r
+                                child controller.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language.  This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified in\r
+                                RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                controller specified by ControllerHandle and\r
+                                ChildHandle in the language specified by\r
+                                Language from the point of view of the driver\r
+                                specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
+                                the language specified by Language for the\r
+                                driver specified by This was returned in\r
+                                DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  )\r
+{\r
+  return EFI_UNSUPPORTED;\r
+}\r
diff --git a/UnixPkg/UnixSnpDxe/UnixSnp.c b/UnixPkg/UnixSnpDxe/UnixSnp.c
new file mode 100644 (file)
index 0000000..56a014e
--- /dev/null
@@ -0,0 +1,1791 @@
+/** @file\r
+\r
+ Copyright (c) 2010, Apple, Inc. All rigths reserved.\r
+\r
+    This program and the accompanying materials\r
+    are licensed and made available under the terms and conditions of the BSD License\r
+    which accompanies this distribution. The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.php\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  UnixSnp.c\r
+\r
+Abstract:\r
+\r
+-**/\r
+\r
+#include <Library/PrintLib.h>\r
+\r
+#include "UnixSnp.h"\r
+\r
+EFI_DRIVER_BINDING_PROTOCOL gUnixSnpDriverBinding =\r
+{\r
+       UnixSnpDriverBindingSupported,\r
+       UnixSnpDriverBindingStart,\r
+       UnixSnpDriverBindingStop,\r
+       0xA,\r
+       NULL,\r
+       NULL\r
+};\r
+\r
+/**\r
+  Changes the state of a network interface from "stopped" to "started".\r
+\r
+  @param  This Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStart(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This\r
+       );\r
+  \r
+/**\r
+  Changes the state of a network interface from "started" to "stopped".\r
+\r
+  @param  This Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStop(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This\r
+       );\r
+  \r
+/**\r
+  Resets a network adapter and allocates the transmit and receive buffers \r
+  required by the network interface; optionally, also requests allocation \r
+  of additional transmit and receive buffers.\r
+\r
+  @param  This              Protocol instance pointer.\r
+  @param  ExtraRxBufferSize The size, in bytes, of the extra receive buffer space\r
+                            that the driver should allocate for the network interface.\r
+                            Some network interfaces will not be able to use the extra\r
+                            buffer, and the caller will not know if it is actually\r
+                            being used.\r
+  @param  ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space\r
+                            that the driver should allocate for the network interface.\r
+                            Some network interfaces will not be able to use the extra\r
+                            buffer, and the caller will not know if it is actually\r
+                            being used.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpInitialize(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN UINTN                                                        ExtraRxBufferSize OPTIONAL,\r
+       IN UINTN                                                        ExtraTxBufferSize OPTIONAL\r
+       );\r
+  \r
+/**\r
+  Resets a network adapter and re-initializes it with the parameters that were \r
+  provided in the previous call to Initialize().  \r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ExtendedVerification Indicates that the driver may perform a more\r
+                               exhaustive verification operation of the device\r
+                               during reset.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpReset(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      ExtendedVerification\r
+       );\r
+\r
+/**\r
+  Resets a network adapter and leaves it in a state that is safe for \r
+  another driver to initialize.\r
+\r
+  @param  This Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpShutdown(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This\r
+       );\r
+\r
+/**\r
+  Manages the multicast receive filters of a network interface.\r
+\r
+  @param  This               Protocol instance pointer.\r
+  @param  EnableBits         A bit mask of receive filters to enable on the network interface.\r
+  @param  DisableBits        A bit mask of receive filters to disable on the network interface.\r
+  @param  ResetMcastFilter   Set to TRUE to reset the contents of the multicast receive\r
+                             filters on the network interface to their default values.\r
+  @param  McastFilterCount   Number of multicast HW MAC addresses in the new\r
+                             MCastFilter list. This value must be less than or equal to\r
+                             the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This\r
+                             field is optional if ResetMCastFilter is TRUE.\r
+  @param  McastFilter        A pointer to a list of new multicast receive filter HW MAC\r
+                             addresses. This list will replace any existing multicast\r
+                             HW MAC address list. This field is optional if\r
+                             ResetMCastFilter is TRUE.\r
+\r
+  @retval EFI_SUCCESS           The multicast receive filter list was updated.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpReceiveFilters(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN UINT32                                                       EnableBits,\r
+       IN UINT32                                                       DisableBits,\r
+       IN BOOLEAN                                                      ResetMcastFilter,\r
+       IN UINTN                                                        McastFilterCount OPTIONAL,\r
+       IN EFI_MAC_ADDRESS*                                     McastFilter OPTIONAL\r
+       );\r
+\r
+/**\r
+  Modifies or resets the current station address, if supported.\r
+\r
+  @param  This         Protocol instance pointer.\r
+  @param  Reset        Flag used to reset the station address to the network interfaces\r
+                       permanent address.\r
+  @param  NewMacAddr   New station address to be used for the network interface.\r
+\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStationAddress(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      Reset,\r
+       IN EFI_MAC_ADDRESS*                                     NewMacAddr OPTIONAL\r
+       );\r
+\r
+/**\r
+  Resets or collects the statistics on a network interface.\r
+\r
+  @param  This            Protocol instance pointer.\r
+  @param  Reset           Set to TRUE to reset the statistics for the network interface.\r
+  @param  StatisticsSize  On input the size, in bytes, of StatisticsTable. On\r
+                          output the size, in bytes, of the resulting table of\r
+                          statistics.\r
+  @param  StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that\r
+                          contains the statistics.\r
+\r
+  @retval EFI_SUCCESS           The statistics were collected from the network interface.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The current buffer\r
+                                size needed to hold the statistics is returned in\r
+                                StatisticsSize.\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStatistics(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      Reset,\r
+       IN OUT UINTN*                                           StatisticsSize OPTIONAL,\r
+       OUT EFI_NETWORK_STATISTICS*                     StatisticsTable OPTIONAL\r
+       );\r
+  \r
+/**\r
+  Converts a multicast IP address to a multicast HW MAC address.\r
+  \r
+  @param  This  Protocol instance pointer.\r
+  @param  Ipv6  Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set\r
+                to FALSE if the multicast IP address is IPv4 [RFC 791].\r
+  @param  Ip    The multicast IP address that is to be converted to a multicast\r
+                HW MAC address.\r
+  @param  Mac   The multicast HW MAC address that is to be generated from IP.\r
+\r
+  @retval EFI_SUCCESS           The multicast IP address was mapped to the multicast\r
+                                HW MAC address.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The current buffer\r
+                                size needed to hold the statistics is returned in\r
+                                StatisticsSize.\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpMcastIptoMac(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      Ipv6,\r
+       IN EFI_IP_ADDRESS*                                      Ip,\r
+       OUT EFI_MAC_ADDRESS*                            Mac\r
+       );\r
+\r
+/**\r
+  Performs read and write operations on the NVRAM device attached to a \r
+  network interface.\r
+\r
+  @param  This         Protocol instance pointer.\r
+  @param  ReadOrWrite  TRUE for read operations, FALSE for write operations.\r
+  @param  Offset       Byte offset in the NVRAM device at which to start the read or\r
+                       write operation. This must be a multiple of NvRamAccessSize and\r
+                       less than NvRamSize.\r
+  @param  BufferSize   The number of bytes to read or write from the NVRAM device.\r
+                       This must also be a multiple of NvramAccessSize.\r
+  @param  Buffer       A pointer to the data buffer.\r
+\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpNvdata(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      ReadOrWrite,\r
+       IN UINTN                                                        Offset,\r
+       IN UINTN                                                        BufferSize,\r
+       IN OUT VOID*                                            Buffer\r
+       );\r
+\r
+/**\r
+  Reads the current interrupt status and recycled transmit buffer status from \r
+  a network interface.\r
+\r
+  @param  This            Protocol instance pointer.\r
+  @param  InterruptStatus A pointer to the bit mask of the currently active interrupts\r
+                          If this is NULL, the interrupt status will not be read from\r
+                          the device. If this is not NULL, the interrupt status will\r
+                          be read from the device. When the  interrupt status is read,\r
+                          it will also be cleared. Clearing the transmit  interrupt\r
+                          does not empty the recycled transmit buffer array.\r
+  @param  TxBuffer        Recycled transmit buffer address. The network interface will\r
+                          not transmit if its internal recycled transmit buffer array\r
+                          is full. Reading the transmit buffer does not clear the\r
+                          transmit interrupt. If this is NULL, then the transmit buffer\r
+                          status will not be read. If there are no transmit buffers to\r
+                          recycle and TxBuf is not NULL, * TxBuf will be set to NULL.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpGetStatus(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       OUT UINT32*                                                     InterruptStatus,\r
+       OUT VOID**                                                      TxBuffer\r
+       );\r
+\r
+/**\r
+  Places a packet in the transmit queue of a network interface.\r
+\r
+  @param  This       Protocol instance pointer.\r
+  @param  HeaderSize The size, in bytes, of the media header to be filled in by\r
+                     the Transmit() function. If HeaderSize is non-zero, then it\r
+                     must be equal to This->Mode->MediaHeaderSize and the DestAddr\r
+                     and Protocol parameters must not be NULL.\r
+  @param  BufferSize The size, in bytes, of the entire packet (media header and\r
+                     data) to be transmitted through the network interface.\r
+  @param  Buffer     A pointer to the packet (media header followed by data) to be\r
+                     transmitted. This parameter cannot be NULL. If HeaderSize is zero,\r
+                     then the media header in Buffer must already be filled in by the\r
+                     caller. If HeaderSize is non-zero, then the media header will be\r
+                     filled in by the Transmit() function.\r
+  @param  SrcAddr    The source HW MAC address. If HeaderSize is zero, then this parameter\r
+                     is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then\r
+                     This->Mode->CurrentAddress is used for the source HW MAC address.\r
+  @param  DestAddr   The destination HW MAC address. If HeaderSize is zero, then this\r
+                     parameter is ignored.\r
+  @param  Protocol   The type of header to build. If HeaderSize is zero, then this\r
+                     parameter is ignored. See RFC 1700, section "Ether Types", for\r
+                     examples.\r
+\r
+  @retval EFI_SUCCESS           The packet was placed on the transmit queue.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.\r
+  @retval EFI_ACCESS_DENIED     Error acquire global lock for operation.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpTransmit(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN UINTN                                                        HeaderSize,\r
+       IN UINTN                                                        BufferSize,\r
+       IN VOID*                                                        Buffer,\r
+       IN EFI_MAC_ADDRESS*                                     SrcAddr OPTIONAL,\r
+       IN EFI_MAC_ADDRESS*                                     DestAddr OPTIONAL,\r
+       IN UINT16*                                                      Protocol OPTIONAL\r
+       );\r
+\r
+/**\r
+  Receives a packet from a network interface.\r
+\r
+  @param  This             Protocol instance pointer.\r
+  @param  HeaderSize       The size, in bytes, of the media header received on the network\r
+                           interface. If this parameter is NULL, then the media header size\r
+                           will not be returned.\r
+  @param  BuffSize         On entry, the size, in bytes, of Buffer. On exit, the size, in\r
+                           bytes, of the packet that was received on the network interface.\r
+  @param  Buffer           A pointer to the data buffer to receive both the media header and\r
+                           the data.\r
+  @param  SourceAddr       The source HW MAC address. If this parameter is NULL, the\r
+                           HW MAC source address will not be extracted from the media\r
+                           header.\r
+  @param  DestinationAddr  The destination HW MAC address. If this parameter is NULL,\r
+                           the HW MAC destination address will not be extracted from the\r
+                           media header.\r
+  @param  Protocol         The media header type. If this parameter is NULL, then the\r
+                           protocol will not be extracted from the media header. See\r
+                           RFC 1700 section "Ether Types" for examples.\r
+\r
+  @retval  EFI_SUCCESS           The received data was stored in Buffer, and BufferSize has\r
+                                 been updated to the number of bytes received.\r
+  @retval  EFI_NOT_READY         The network interface is too busy to accept this transmit\r
+                                 request.\r
+  @retval  EFI_BUFFER_TOO_SMALL  The BufferSize parameter is too small.\r
+  @retval  EFI_DEVICE_ERROR      The command could not be sent to the network interface.\r
+  @retval  EFI_ACCESS_DENIED     Error acquire global lock for operation.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpReceive(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       OUT UINTN*                                                      HeaderSize OPTIONAL,\r
+       IN OUT UINTN*                                           BuffSize,\r
+       OUT VOID*                                                       Buffer,\r
+       OUT EFI_MAC_ADDRESS*                            SourceAddr OPTIONAL,\r
+       OUT EFI_MAC_ADDRESS*                            DestinationAddr OPTIONAL,\r
+       OUT UINT16*                                                     Protocol OPTIONAL\r
+       );\r
+\r
+VOID\r
+EFIAPI\r
+UnixSnpWaitForPacketNotify(\r
+       IN EFI_EVENT                                            Event,\r
+       IN VOID*                                                        Private\r
+       );\r
+\r
+//\r
+// Strange, but there doesn't appear to be any structure for the Ethernet header in edk2...\r
+//\r
+\r
+typedef struct\r
+{\r
+       UINT8                                                           DstAddr[ NET_ETHER_ADDR_LEN ];\r
+       UINT8                                                           SrcAddr[ NET_ETHER_ADDR_LEN ];\r
+       UINT16                                                          Type;\r
+} EthernetHeader;\r
+\r
+UNIX_SNP_PRIVATE_DATA gUnixSnpPrivateTemplate =\r
+{\r
+       UNIX_SNP_PRIVATE_DATA_SIGNATURE,                        // Signature\r
+       NULL,                                                                           // UnixThunk\r
+       NULL,                                                                           // DeviceHandle\r
+       NULL,                                                                           // DevicePath\r
+       { 0 },                                                                          // MacAddress\r
+       NULL,                                                                           // InterfaceName\r
+       0,                                                                                      // ReadBufferSize\r
+       NULL,                                                                           // ReadBuffer\r
+       NULL,                                                                           // CurrentReadPointer\r
+       NULL,                                                                           // EndReadPointer\r
+       0,                                                                                      // BpfFd\r
+       {                                                                               // Snp\r
+               EFI_SIMPLE_NETWORK_PROTOCOL_REVISION,   // Revision\r
+               UnixSnpStart,                                                   // Start\r
+               UnixSnpStop,                                                    // Stop\r
+               UnixSnpInitialize,                                              // Initialize\r
+               UnixSnpReset,                                                   // Reset\r
+               UnixSnpShutdown,                                                // Shutdown\r
+               UnixSnpReceiveFilters,                                  // ReceiveFilters\r
+               UnixSnpStationAddress,                                  // StationAddress\r
+               UnixSnpStatistics,                                              // Statistics\r
+               UnixSnpMcastIptoMac,                                    // MCastIpToMac\r
+               UnixSnpNvdata,                                                  // NvData\r
+               UnixSnpGetStatus,                                               // GetStatus\r
+               UnixSnpTransmit,                                                // Transmit\r
+               UnixSnpReceive,                                                 // Receive\r
+               NULL,                                                                   // WaitForPacket\r
+               NULL                                                                    // Mode\r
+       },\r
+       {                                                                               // Mode\r
+               EfiSimpleNetworkStopped,                                //  State\r
+               NET_ETHER_ADDR_LEN,                                             //  HwAddressSize\r
+               NET_ETHER_HEADER_SIZE,                                  //  MediaHeaderSize\r
+               1500,                                                                   //  MaxPacketSize\r
+               0,                                                                              //  NvRamSize\r
+               0,                                                                              //  NvRamAccessSize\r
+               0,                                                                              //  ReceiveFilterMask\r
+               0,                                                                              //  ReceiveFilterSetting\r
+               MAX_MCAST_FILTER_CNT,                                   //  MaxMCastFilterCount\r
+               0,                                                                              //  MCastFilterCount\r
+               {\r
+                       0\r
+               },                                                                              //  MCastFilter\r
+               {\r
+                       0\r
+               },                                                                              //  CurrentAddress\r
+               {\r
+                       0\r
+               },                                                                              //  BroadcastAddress\r
+               {\r
+                       0\r
+               },                                                                              //  PermanentAddress\r
+               NET_IFTYPE_ETHERNET,                                    //  IfType\r
+               FALSE,                                                                  //  MacAddressChangeable\r
+               FALSE,                                                                  //  MultipleTxSupported\r
+               FALSE,                                                                  //  MediaPresentSupported\r
+               TRUE                                                                    //  MediaPresent\r
+       }\r
+};\r
+\r
+STATIC EFI_STATUS\r
+GetInterfaceMacAddr(\r
+       IN UNIX_SNP_PRIVATE_DATA*                       Private,\r
+       IN EFI_UNIX_IO_PROTOCOL*                        UnixIo\r
+       )\r
+{\r
+       struct ifaddrs*                                         IfAddrs;\r
+       struct ifaddrs*                                         If;\r
+       struct sockaddr_dl*                                     IfSdl;\r
+       EFI_STATUS                                                      Status;\r
+       INTN                                                            Result;\r
+\r
+       Result = UnixIo->UnixThunk->GetIfAddrs( &IfAddrs );\r
+       if ( Result != 0 )\r
+       {\r
+               return( EFI_UNSUPPORTED );\r
+       }\r
+\r
+       //\r
+       // Convert the interface name to ASCII so we can find it.\r
+       //\r
+       Private->InterfaceName = AllocateZeroPool( StrLen( UnixIo->EnvString ) );\r
+\r
+       if ( !Private->InterfaceName )\r
+       {\r
+               Status = EFI_OUT_OF_RESOURCES;\r
+               goto Exit;\r
+       }\r
+\r
+       UnicodeStrToAsciiStr( UnixIo->EnvString, Private->InterfaceName );\r
+\r
+       If = IfAddrs;\r
+\r
+       while ( If != NULL )\r
+       {\r
+               IfSdl = ( struct sockaddr_dl * ) If->ifa_addr;\r
+\r
+               if ( IfSdl->sdl_family == AF_LINK )\r
+               {\r
+                       if ( !AsciiStrCmp( Private->InterfaceName, If->ifa_name ) )\r
+                       {\r
+                               CopyMem( &Private->MacAddress, LLADDR( IfSdl ), NET_ETHER_ADDR_LEN );\r
+\r
+                               Status = EFI_SUCCESS;\r
+                               break;\r
+                       }\r
+               }\r
+\r
+               If = If->ifa_next;\r
+       }\r
+\r
+Exit:\r
+       ( VOID ) UnixIo->UnixThunk->FreeIfAddrs( IfAddrs );\r
+\r
+       return( Status );\r
+}\r
+\r
+\r
+STATIC EFI_STATUS\r
+OpenBpfFileDescriptor(\r
+       IN UNIX_SNP_PRIVATE_DATA*               Private,\r
+       OUT INTN*                                               Fd\r
+       )\r
+{\r
+       CHAR8                                                   BfpDeviceName[ 256 ];\r
+       INTN                                                    Index;\r
+       EFI_STATUS                                              Status = EFI_OUT_OF_RESOURCES;\r
+       INTN                                                    Result;\r
+\r
+       //\r
+       // Open a Berkeley Packet Filter device.  This must be done as root, so this is probably\r
+       // the place which is most likely to fail...\r
+       //\r
+       for ( Index = 0; TRUE; Index++ )\r
+       {\r
+               AsciiSPrint( BfpDeviceName, sizeof( BfpDeviceName ), "/dev/bpf%d", Index );\r
+\r
+               *Fd = Private->UnixThunk->Open( BfpDeviceName, O_RDWR, 0 );\r
+\r
+               if ( *Fd >= 0 )\r
+               {\r
+                       Status = EFI_SUCCESS;\r
+                       break;\r
+               }\r
+\r
+               Result = Private->UnixThunk->GetErrno();\r
+    if ( Result == EACCES )\r
+    {\r
+      DEBUG( ( EFI_D_ERROR, "Permissions on '%a' are incorrect.  Fix with 'sudo chmod 666 %a'.\n",\r
+          BfpDeviceName, BfpDeviceName ) );\r
+    }\r
+               if ( Result != EBUSY )\r
+               {\r
+                       break;\r
+               }\r
+       }\r
+\r
+       return( Status );\r
+}\r
+\r
+\r
+/**\r
+  Test to see if this driver supports ControllerHandle. This service\r
+  is called by the EFI boot service ConnectController(). In\r
+  order to make drivers as small as possible, there are a few calling\r
+  restrictions for this service. ConnectController() must\r
+  follow these calling restrictions. If any other agent wishes to call\r
+  Supported() it must also follow these calling restrictions.\r
+\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
+\r
+  @retval EFI_SUCCESS         This driver supports this device\r
+  @retval EFI_UNSUPPORTED     This driver does not support this device\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverBindingSupported(\r
+       IN EFI_DRIVER_BINDING_PROTOCOL*         This,\r
+       IN EFI_HANDLE                                           ControllerHandle,\r
+       IN EFI_DEVICE_PATH_PROTOCOL*            RemainingDevicePath OPTIONAL\r
+       )\r
+{\r
+       EFI_STATUS                                                      Status;\r
+       EFI_UNIX_IO_PROTOCOL*                           UnixIo;\r
+\r
+       //\r
+       // Open the I/O abstraction needed to perform the supported test.\r
+       //\r
+       Status = gBS->OpenProtocol(\r
+                                       ControllerHandle,\r
+                                       &gEfiUnixIoProtocolGuid,\r
+                                       ( VOID ** ) &UnixIo,\r
+                                       This->DriverBindingHandle,\r
+                                       ControllerHandle,\r
+                                       EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                                       );\r
+\r
+       if ( EFI_ERROR( Status ) )\r
+       {\r
+               return( Status );\r
+       }\r
+\r
+       //\r
+       // Validate GUID\r
+       //\r
+       Status = EFI_UNSUPPORTED;\r
+       if ( CompareGuid( UnixIo->TypeGuid, &gEfiUnixNetworkGuid ) )\r
+       {\r
+               Status = EFI_SUCCESS;\r
+       }\r
+\r
+       //\r
+       // Close the I/O abstraction used to perform the supported test.\r
+       //\r
+       gBS->CloseProtocol(\r
+                                       ControllerHandle,\r
+                                       &gEfiUnixIoProtocolGuid,\r
+                                       This->DriverBindingHandle,\r
+                                       ControllerHandle\r
+                                       );\r
+\r
+       return( Status );\r
+}\r
+\r
+\r
+/**\r
+  Start this driver on ControllerHandle. This service is called by the\r
+  EFI boot service ConnectController(). In order to make\r
+  drivers as small as possible, there are a few calling restrictions for\r
+  this service. ConnectController() must follow these\r
+  calling restrictions. If any other agent wishes to call Start() it\r
+  must also follow these calling restrictions.\r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverBindingStart(\r
+       IN EFI_DRIVER_BINDING_PROTOCOL*         This,\r
+       IN EFI_HANDLE                                           ControllerHandle,\r
+       IN EFI_DEVICE_PATH_PROTOCOL*            RemainingDevicePath OPTIONAL\r
+       )\r
+{\r
+       MAC_ADDR_DEVICE_PATH                    Node;\r
+       EFI_DEVICE_PATH_PROTOCOL*               ParentDevicePath = NULL;\r
+       EFI_UNIX_IO_PROTOCOL*                   UnixIo;\r
+       UNIX_SNP_PRIVATE_DATA*                  Private = NULL;\r
+       EFI_STATUS                                              Status;\r
+       BOOLEAN                                                 CreateDevice;\r
+\r
+       //\r
+       // Grab the protocols we need.\r
+       //\r
+       Status = gBS->OpenProtocol(\r
+                                       ControllerHandle,\r
+                                       &gEfiDevicePathProtocolGuid,\r
+                                       ( VOID ** ) &ParentDevicePath,\r
+                                       This->DriverBindingHandle,\r
+                                       ControllerHandle,\r
+                                       EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                                       );\r
+       if ( EFI_ERROR( Status ) )\r
+       {\r
+               goto ErrorExit;\r
+       }\r
+\r
+       //\r
+       // Open the I/O abstraction needed to perform the supported test.\r
+       //\r
+       Status = gBS->OpenProtocol(\r
+                                       ControllerHandle,\r
+                                       &gEfiUnixIoProtocolGuid,\r
+                                       ( VOID ** ) &UnixIo,\r
+                                       This->DriverBindingHandle,\r
+                                       ControllerHandle,\r
+                                       EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                                       );\r
+       if ( EFI_ERROR( Status ) )\r
+       {\r
+               goto ErrorExit;\r
+       }\r
+\r
+       //\r
+       // Validate GUID\r
+       //\r
+       if ( !CompareGuid( UnixIo->TypeGuid, &gEfiUnixNetworkGuid ) )\r
+       {\r
+               Status = EFI_UNSUPPORTED;\r
+               goto ErrorExit;\r
+       }\r
+\r
+       CreateDevice = TRUE;\r
+       if ( ( RemainingDevicePath != NULL ) && IsDevicePathEnd( RemainingDevicePath ) )\r
+       {\r
+               CreateDevice = FALSE;\r
+       }\r
+\r
+       if ( CreateDevice )\r
+       {\r
+               //\r
+               //  Allocate the private data.\r
+               //\r
+               Private = AllocateCopyPool( sizeof( UNIX_SNP_PRIVATE_DATA ), &gUnixSnpPrivateTemplate );\r
+               if ( Private == NULL )\r
+               {\r
+                       Status = EFI_OUT_OF_RESOURCES;\r
+                       goto ErrorExit;\r
+               }\r
+\r
+               Status = GetInterfaceMacAddr( Private, UnixIo );\r
+               if ( EFI_ERROR( Status ) )\r
+               {\r
+                       goto ErrorExit;\r
+               }\r
+\r
+               Private->UnixThunk = UnixIo->UnixThunk;\r
+\r
+               Private->Snp.Mode = &Private->Mode;\r
+\r
+               //\r
+               // Set the broadcast address.\r
+               //\r
+               SetMem( &Private->Mode.BroadcastAddress, sizeof( EFI_MAC_ADDRESS ), 0xFF );\r
+\r
+               CopyMem( &Private->Mode.CurrentAddress, &Private->MacAddress, sizeof( EFI_MAC_ADDRESS ) );\r
+               CopyMem( &Private->Mode.PermanentAddress, &Private->MacAddress, sizeof( EFI_MAC_ADDRESS ) );\r
+\r
+               //\r
+               // Since the fake SNP is based on a real NIC, to avoid conflict with the host NIC\r
+               // network stack, we use a different MAC address.\r
+               // So just change the last byte of the MAC address for the real NIC.\r
+               //\r
+               Private->Mode.CurrentAddress.Addr[ NET_ETHER_ADDR_LEN - 1 ]++;\r
+\r
+               //\r
+               // Build the device path by appending the MAC node to the ParentDevicePath\r
+               // from the UnixIo handle.\r
+               //\r
+               ZeroMem( &Node, sizeof( MAC_ADDR_DEVICE_PATH ) );\r
+\r
+               Node.Header.Type        = MESSAGING_DEVICE_PATH;\r
+               Node.Header.SubType     = MSG_MAC_ADDR_DP;\r
+               Node.IfType                     = Private->Mode.IfType;\r
+\r
+               SetDevicePathNodeLength( ( EFI_DEVICE_PATH_PROTOCOL * ) &Node, sizeof( MAC_ADDR_DEVICE_PATH ) );\r
+\r
+               CopyMem( &Node.MacAddress, &Private->Mode.CurrentAddress, sizeof( EFI_MAC_ADDRESS ) );\r
+\r
+               //\r
+               // Build the device path by appending the MAC node to the ParentDevicePath from the UnixIo handle.\r
+               //\r
+               Private->DevicePath = AppendDevicePathNode( ParentDevicePath, ( EFI_DEVICE_PATH_PROTOCOL * ) &Node );\r
+               if ( Private->DevicePath == NULL )\r
+               {\r
+                       Status = EFI_OUT_OF_RESOURCES;\r
+                       goto ErrorExit;\r
+               }\r
+\r
+               Status = gBS->InstallMultipleProtocolInterfaces(\r
+                                               &Private->DeviceHandle,\r
+                                               &gEfiSimpleNetworkProtocolGuid,\r
+                                               &Private->Snp,\r
+                                               &gEfiDevicePathProtocolGuid,\r
+                                               Private->DevicePath,\r
+                                               NULL\r
+                                               );\r
+               if ( EFI_ERROR( Status ) )\r
+               {\r
+                       goto ErrorExit;\r
+               }\r
+\r
+               Status = gBS->OpenProtocol(\r
+                                               ControllerHandle,\r
+                                               &gEfiUnixIoProtocolGuid,\r
+                                               ( VOID ** ) &UnixIo,\r
+                                               This->DriverBindingHandle,\r
+                                               Private->DeviceHandle,\r
+                                               EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
+                                               );\r
+               if ( EFI_ERROR( Status ) )\r
+               {\r
+                       goto ErrorExit;\r
+               }\r
+       }\r
+       return( Status );\r
+\r
+ErrorExit:\r
+       if ( Private->InterfaceName != NULL )\r
+       {\r
+               FreePool( Private->InterfaceName );\r
+               Private->InterfaceName = NULL;\r
+       }\r
+       if ( Private != NULL )\r
+       {\r
+               FreePool( Private );\r
+       }\r
+       if ( ParentDevicePath != NULL )\r
+       {\r
+               gBS->CloseProtocol(\r
+                                       ControllerHandle,\r
+                                       &gEfiDevicePathProtocolGuid,\r
+                                       This->DriverBindingHandle,\r
+                                       ControllerHandle\r
+                                       );\r
+       }\r
+\r
+       return( Status );\r
+}\r
+\r
+/**\r
+  Stop this driver on ControllerHandle. This service is called by the\r
+  EFI boot service DisconnectController(). In order to\r
+  make drivers as small as possible, there are a few calling\r
+  restrictions for this service. DisconnectController()\r
+  must follow these calling restrictions. If any other agent wishes\r
+  to call Stop() it must also follow these calling restrictions.\r
+  \r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverBindingStop(\r
+       IN EFI_DRIVER_BINDING_PROTOCOL*         This,\r
+       IN EFI_HANDLE                                           ControllerHandle,\r
+       IN UINTN                                                        NumberOfChildren,\r
+       IN EFI_HANDLE*                                          ChildHandleBuffer\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private = NULL;\r
+       EFI_SIMPLE_NETWORK_PROTOCOL*            Snp;\r
+       EFI_STATUS                                                      Status;\r
+\r
+       //\r
+       // Get our context back.\r
+       //\r
+       Status = gBS->OpenProtocol(\r
+                               ControllerHandle,\r
+                               &gEfiSimpleNetworkProtocolGuid,\r
+                               ( VOID ** ) &Snp,\r
+                               This->DriverBindingHandle,\r
+                               ControllerHandle,\r
+                               EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                               );\r
+       if ( EFI_ERROR( Status ) )\r
+       {\r
+               return( EFI_UNSUPPORTED );\r
+       }\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( Snp );\r
+\r
+       Status = gBS->CloseProtocol(\r
+                               ControllerHandle,\r
+                               &gEfiUnixIoProtocolGuid,\r
+                               This->DriverBindingHandle,\r
+                               Private->DeviceHandle\r
+                               );\r
+\r
+       Status = gBS->UninstallMultipleProtocolInterfaces(\r
+                               Private->DeviceHandle,\r
+                               &gEfiSimpleNetworkProtocolGuid,\r
+                               &Private->Snp,\r
+                               &gEfiDevicePathProtocolGuid,\r
+                               Private->DevicePath,\r
+                               NULL\r
+                               );\r
+\r
+       FreePool( Private->InterfaceName );\r
+       FreePool( Private->DevicePath );\r
+       FreePool( Private );\r
+\r
+       return( EFI_SUCCESS );\r
+}\r
+\r
+\r
+/**\r
+  Changes the state of a network interface from "stopped" to "started".\r
+\r
+  @param  This Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStart(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This\r
+       )\r
+{\r
+       STATIC struct bpf_insn                          FilterInstructionTemplate[] =\r
+       {\r
+               // Load 4 bytes from the destination MAC address.\r
+               BPF_STMT( BPF_LD + BPF_W + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 0 ] ) ),\r
+\r
+               // Compare to first 4 bytes of fake MAC address.\r
+               BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0x12345678, 0, 3 ),\r
+\r
+               // Load remaining 2 bytes from the destination MAC address.\r
+               BPF_STMT( BPF_LD + BPF_H + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 4 ] ) ),\r
+\r
+               // Compare to remaining 2 bytes of fake MAC address.\r
+               BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0x9ABC, 5, 0 ),\r
+\r
+               // Load 4 bytes from the destination MAC address.\r
+               BPF_STMT( BPF_LD + BPF_W + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 0 ] ) ),\r
+\r
+               // Compare to first 4 bytes of broadcast MAC address.\r
+               BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0xFFFFFFFF, 0, 2 ),\r
+\r
+               // Load remaining 2 bytes from the destination MAC address.\r
+               BPF_STMT( BPF_LD + BPF_H + BPF_ABS, OFFSET_OF( EthernetHeader, DstAddr[ 4 ] ) ),\r
+\r
+               // Compare to remaining 2 bytes of broadcast MAC address.\r
+               BPF_JUMP( BPF_JMP + BPF_JEQ + BPF_K, 0xFFFF, 1, 0 ),\r
+\r
+               // Reject packet.\r
+               BPF_STMT( BPF_RET + BPF_K, 0 ),\r
+\r
+               // Receive entire packet.\r
+               BPF_STMT( BPF_RET + BPF_K, -1 )\r
+       };\r
+       struct ifreq                                            BoundIf;\r
+       struct bpf_program                                      BpfProgram;\r
+       struct bpf_insn*                                        FilterProgram;\r
+       UNIX_SNP_PRIVATE_DATA*                          Private;\r
+       EFI_STATUS                                                      Status;\r
+       UINT32                                                          Temp32;\r
+       INTN                                                            Fd;\r
+       INTN                                                            Result;\r
+       INTN                                                            Value;\r
+       UINT16                                                          Temp16;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+       switch ( Private->Snp.Mode->State )\r
+       {\r
+               case EfiSimpleNetworkStopped:\r
+                       break;\r
+\r
+               case EfiSimpleNetworkStarted:\r
+               case EfiSimpleNetworkInitialized:\r
+                       return( EFI_ALREADY_STARTED );\r
+                       break;\r
+\r
+               default:\r
+                       return( EFI_DEVICE_ERROR );\r
+                       break;\r
+       }\r
+\r
+       if ( Private->BpfFd == 0 )\r
+       {\r
+               Status = OpenBpfFileDescriptor( Private, &Fd );\r
+\r
+               if ( EFI_ERROR( Status ) )\r
+               {\r
+                       goto ErrorExit;\r
+               }\r
+\r
+               Private->BpfFd = Fd;\r
+\r
+               //\r
+               // Associate our interface with this BPF file descriptor.\r
+               //\r
+               AsciiStrCpy( BoundIf.ifr_name, Private->InterfaceName );\r
+               Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSETIF, &BoundIf );\r
+\r
+               if ( Result < 0 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+               //\r
+               // Enable immediate mode and find out the buffer size.\r
+               //\r
+               Value = 1;\r
+               Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCIMMEDIATE, &Value );\r
+\r
+               if ( Result < 0 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+               //\r
+               // Enable non-blocking I/O.\r
+               //\r
+\r
+               Value = Private->UnixThunk->Fcntl( Private->BpfFd, F_GETFL, 0 );\r
+\r
+               if ( Value == -1 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+               Value |= O_NONBLOCK;\r
+\r
+               Result = Private->UnixThunk->Fcntl( Private->BpfFd, F_SETFL, (void *) Value );\r
+\r
+               if ( Result == -1 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+               //\r
+               // Disable "header complete" flag.  This means the supplied source MAC address is\r
+               // what goes on the wire.\r
+               //\r
+               Value = 1;\r
+               Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSHDRCMPLT, &Value );\r
+\r
+               if ( Result < 0 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+               Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCGBLEN, &Value );\r
+\r
+               if ( Result < 0 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+               //\r
+               // Allocate read buffer.\r
+               //\r
+               Private->ReadBufferSize = Value;\r
+               Private->ReadBuffer = AllocateZeroPool( Private->ReadBufferSize );\r
+               if ( Private->ReadBuffer == NULL )\r
+               {\r
+                       Status = EFI_OUT_OF_RESOURCES;\r
+                       goto ErrorExit;\r
+               }\r
+\r
+               Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer;\r
+\r
+               //\r
+               // Install our packet filter: successful reads should only produce broadcast or unitcast\r
+               // packets directed to our fake MAC address.\r
+               //\r
+               FilterProgram = AllocateCopyPool( sizeof( FilterInstructionTemplate ), &FilterInstructionTemplate );\r
+               if ( FilterProgram == NULL )\r
+               {\r
+                       goto ErrorExit;\r
+               }\r
+\r
+               //\r
+               // Insert out fake MAC address into the filter.  The data has to be host endian.\r
+               //\r
+               CopyMem( &Temp32, &Private->Mode.CurrentAddress.Addr[ 0 ], sizeof( UINT32 ) );\r
+               FilterProgram[ 1 ].k = NTOHL( Temp32 );\r
+               CopyMem( &Temp16, &Private->Mode.CurrentAddress.Addr[ 4 ], sizeof( UINT16 ) );\r
+               FilterProgram[ 3 ].k = NTOHS( Temp16 );\r
+\r
+               BpfProgram.bf_len = sizeof( FilterInstructionTemplate ) / sizeof( struct bpf_insn );\r
+               BpfProgram.bf_insns = FilterProgram;\r
+\r
+               Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCSETF, &BpfProgram );\r
+\r
+               if ( Result < 0 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+               FreePool( FilterProgram );\r
+\r
+               //\r
+               // Enable promiscuous mode.\r
+               //\r
+\r
+               Result = Private->UnixThunk->IoCtl( Private->BpfFd, BIOCPROMISC, 0 );\r
+\r
+               if ( Result < 0 )\r
+               {\r
+                       goto DeviceErrorExit;\r
+               }\r
+\r
+\r
+               Private->Snp.Mode->State = EfiSimpleNetworkStarted;                     \r
+       }\r
+\r
+       return( Status );\r
+\r
+DeviceErrorExit:\r
+       Status = EFI_DEVICE_ERROR;\r
+ErrorExit:\r
+       if ( Private->ReadBuffer != NULL )\r
+       {\r
+               FreePool( Private->ReadBuffer );\r
+               Private->ReadBuffer = NULL;\r
+       }\r
+       return( Status );\r
+}\r
+\r
+\r
+/**\r
+  Changes the state of a network interface from "started" to "stopped".\r
+\r
+  @param  This Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStop(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private = EFI_SUCCESS;\r
+       EFI_STATUS                                                      Status;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+       switch ( Private->Snp.Mode->State )\r
+       {\r
+               case EfiSimpleNetworkStarted:\r
+                       break;\r
+\r
+               case EfiSimpleNetworkStopped:\r
+                       return( EFI_NOT_STARTED );\r
+                       break;\r
+\r
+               default:\r
+                       return( EFI_DEVICE_ERROR );\r
+                       break;\r
+       }\r
+\r
+       if ( Private->BpfFd != 0 )\r
+       {\r
+               Private->UnixThunk->Close( Private->BpfFd );\r
+               Private->BpfFd = 0;\r
+       }\r
+\r
+       if ( Private->ReadBuffer != NULL )\r
+       {\r
+               FreePool( Private->ReadBuffer );\r
+               Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer = NULL;\r
+       }\r
+\r
+       Private->Snp.Mode->State = EfiSimpleNetworkStopped;\r
+\r
+       return( Status );\r
+}\r
+\r
+\r
+/**\r
+  Resets a network adapter and allocates the transmit and receive buffers \r
+  required by the network interface; optionally, also requests allocation \r
+  of additional transmit and receive buffers.\r
+\r
+  @param  This              Protocol instance pointer.\r
+  @param  ExtraRxBufferSize The size, in bytes, of the extra receive buffer space\r
+                            that the driver should allocate for the network interface.\r
+                            Some network interfaces will not be able to use the extra\r
+                            buffer, and the caller will not know if it is actually\r
+                            being used.\r
+  @param  ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space\r
+                            that the driver should allocate for the network interface.\r
+                            Some network interfaces will not be able to use the extra\r
+                            buffer, and the caller will not know if it is actually\r
+                            being used.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpInitialize(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN UINTN                                                        ExtraRxBufferSize OPTIONAL,\r
+       IN UINTN                                                        ExtraTxBufferSize OPTIONAL\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private = EFI_SUCCESS;\r
+       EFI_STATUS                                                      Status;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+       switch ( Private->Snp.Mode->State )\r
+       {\r
+               case EfiSimpleNetworkStarted:\r
+                       break;\r
+\r
+               case EfiSimpleNetworkStopped:\r
+                       return( EFI_NOT_STARTED );\r
+                       break;\r
+\r
+               default:\r
+                       return( EFI_DEVICE_ERROR );\r
+                       break;\r
+       }\r
+\r
+#if 0\r
+       Status = gBS->CreateEvent(\r
+                                       EVT_NOTIFY_WAIT,\r
+                                       TPL_NOTIFY,\r
+                                       UnixSnpWaitForPacketNotify,\r
+                                       Private,\r
+                                       &Private->Snp.WaitForPacket\r
+                                       );\r
+#endif\r
+\r
+       if ( !EFI_ERROR( Status ) )\r
+       {\r
+               Private->Mode.MCastFilterCount = 0;\r
+               Private->Mode.ReceiveFilterSetting = 0;\r
+               ZeroMem( Private->Mode.MCastFilter, sizeof( Private->Mode.MCastFilter ) );\r
+\r
+               Private->Snp.Mode->State = EfiSimpleNetworkInitialized;\r
+       }\r
+\r
+       return( Status );\r
+}\r
+\r
+/**\r
+  Resets a network adapter and re-initializes it with the parameters that were \r
+  provided in the previous call to Initialize().  \r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ExtendedVerification Indicates that the driver may perform a more\r
+                               exhaustive verification operation of the device\r
+                               during reset.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpReset(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      ExtendedVerification\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private;\r
+       EFI_STATUS                                                      Success = EFI_SUCCESS;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+       switch ( Private->Snp.Mode->State )\r
+       {\r
+               case EfiSimpleNetworkInitialized:\r
+                       break;\r
+\r
+               case EfiSimpleNetworkStopped:\r
+                       return( EFI_NOT_STARTED );\r
+                       break;\r
+\r
+               default:\r
+                       return( EFI_DEVICE_ERROR );\r
+                       break;\r
+       }\r
+\r
+       return( Success );\r
+}\r
+\r
+/**\r
+  Resets a network adapter and leaves it in a state that is safe for \r
+  another driver to initialize.\r
+\r
+  @param  This Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpShutdown(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private;\r
+       EFI_STATUS                                                      Success = EFI_SUCCESS;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+       switch ( Private->Snp.Mode->State )\r
+       {\r
+               case EfiSimpleNetworkInitialized:\r
+                       break;\r
+\r
+               case EfiSimpleNetworkStopped:\r
+                       return( EFI_NOT_STARTED );\r
+                       break;\r
+\r
+               default:\r
+                       return( EFI_DEVICE_ERROR );\r
+                       break;\r
+       }\r
+\r
+       Private->Snp.Mode->State = EfiSimpleNetworkStarted;\r
+\r
+       Private->Mode.ReceiveFilterSetting = 0;\r
+       Private->Mode.MCastFilterCount = 0;\r
+       ZeroMem( Private->Mode.MCastFilter, sizeof( Private->Mode.MCastFilter ) );\r
+\r
+       if ( Private->Snp.WaitForPacket != NULL )\r
+       {\r
+               gBS->CloseEvent( Private->Snp.WaitForPacket );\r
+               Private->Snp.WaitForPacket = NULL;\r
+       }\r
+\r
+       if ( Private->BpfFd != 0 )\r
+       {\r
+               Private->UnixThunk->Close( Private->BpfFd );\r
+               Private->BpfFd = 0;\r
+       }\r
+\r
+       if ( Private->ReadBuffer != NULL )\r
+       {\r
+               FreePool( Private->ReadBuffer );\r
+               Private->CurrentReadPointer = Private->EndReadPointer = Private->ReadBuffer = NULL;\r
+       }\r
+\r
+       return( Success );\r
+}\r
+\r
+/**\r
+  Manages the multicast receive filters of a network interface.\r
+\r
+  @param  This               Protocol instance pointer.\r
+  @param  EnableBits         A bit mask of receive filters to enable on the network interface.\r
+  @param  DisableBits        A bit mask of receive filters to disable on the network interface.\r
+  @param  ResetMcastFilter   Set to TRUE to reset the contents of the multicast receive\r
+                             filters on the network interface to their default values.\r
+  @param  McastFilterCount   Number of multicast HW MAC addresses in the new\r
+                             MCastFilter list. This value must be less than or equal to\r
+                             the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This\r
+                             field is optional if ResetMCastFilter is TRUE.\r
+  @param  McastFilter        A pointer to a list of new multicast receive filter HW MAC\r
+                             addresses. This list will replace any existing multicast\r
+                             HW MAC address list. This field is optional if\r
+                             ResetMCastFilter is TRUE.\r
+\r
+  @retval EFI_SUCCESS           The multicast receive filter list was updated.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpReceiveFilters(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN UINT32                                                       EnableBits,\r
+       IN UINT32                                                       DisableBits,\r
+       IN BOOLEAN                                                      ResetMcastFilter,\r
+       IN UINTN                                                        McastFilterCount OPTIONAL,\r
+       IN EFI_MAC_ADDRESS*                                     McastFilter OPTIONAL\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+//  ReturnValue = GlobalData->NtNetUtilityTable.SetReceiveFilter (\r
+//                                                Instance->InterfaceInfo.InterfaceIndex,\r
+//                                                EnableBits,\r
+//                                                McastFilterCount,\r
+//                                                McastFilter\r
+//                                                );\r
+\r
+       // For now, just succeed...\r
+       return( EFI_SUCCESS );\r
+}\r
+\r
+/**\r
+  Modifies or resets the current station address, if supported.\r
+\r
+  @param  This         Protocol instance pointer.\r
+  @param  Reset        Flag used to reset the station address to the network interfaces\r
+                       permanent address.\r
+  @param  NewMacAddr   New station address to be used for the network interface.\r
+\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStationAddress(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      Reset,\r
+       IN EFI_MAC_ADDRESS*                                     NewMacAddr OPTIONAL\r
+       )\r
+{\r
+       return( EFI_UNSUPPORTED );\r
+}\r
+\r
+/**\r
+  Resets or collects the statistics on a network interface.\r
+\r
+  @param  This            Protocol instance pointer.\r
+  @param  Reset           Set to TRUE to reset the statistics for the network interface.\r
+  @param  StatisticsSize  On input the size, in bytes, of StatisticsTable. On\r
+                          output the size, in bytes, of the resulting table of\r
+                          statistics.\r
+  @param  StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that\r
+                          contains the statistics.\r
+\r
+  @retval EFI_SUCCESS           The statistics were collected from the network interface.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The current buffer\r
+                                size needed to hold the statistics is returned in\r
+                                StatisticsSize.\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpStatistics(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      Reset,\r
+       IN OUT UINTN*                                           StatisticsSize OPTIONAL,\r
+       OUT EFI_NETWORK_STATISTICS*                     StatisticsTable OPTIONAL\r
+       )\r
+{\r
+       return( EFI_UNSUPPORTED );\r
+}\r
+\r
+/**\r
+  Converts a multicast IP address to a multicast HW MAC address.\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  Ipv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set\r
+               to FALSE if the multicast IP address is IPv4 [RFC 791].\r
+  @param  Ip   The multicast IP address that is to be converted to a multicast\r
+               HW MAC address.\r
+  @param  Mac  The multicast HW MAC address that is to be generated from IP.\r
+\r
+  @retval EFI_SUCCESS           The multicast IP address was mapped to the multicast\r
+                                HW MAC address.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_BUFFER_TOO_SMALL  The Statistics buffer was too small. The current buffer\r
+                                size needed to hold the statistics is returned in\r
+                                StatisticsSize.\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpMcastIptoMac(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      Ipv6,\r
+       IN EFI_IP_ADDRESS*                                      Ip,\r
+       OUT EFI_MAC_ADDRESS*                            Mac\r
+       )\r
+{\r
+       return( EFI_UNSUPPORTED );\r
+}\r
+\r
+\r
+/**\r
+  Performs read and write operations on the NVRAM device attached to a \r
+  network interface.\r
+\r
+  @param  This         Protocol instance pointer.\r
+  @param  ReadOrWrite  TRUE for read operations, FALSE for write operations.\r
+  @param  Offset       Byte offset in the NVRAM device at which to start the read or\r
+                       write operation. This must be a multiple of NvRamAccessSize and\r
+                       less than NvRamSize.\r
+  @param  BufferSize   The number of bytes to read or write from the NVRAM device.\r
+                       This must also be a multiple of NvramAccessSize.\r
+  @param  Buffer       A pointer to the data buffer.\r
+\r
+  @retval EFI_UNSUPPORTED       Not supported yet.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpNvdata(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN BOOLEAN                                                      ReadOrWrite,\r
+       IN UINTN                                                        Offset,\r
+       IN UINTN                                                        BufferSize,\r
+       IN OUT VOID*                                            Buffer\r
+       )\r
+{\r
+       return( EFI_UNSUPPORTED );\r
+}\r
+\r
+\r
+/**\r
+  Reads the current interrupt status and recycled transmit buffer status from \r
+  a network interface.\r
+\r
+  @param  This            Protocol instance pointer.\r
+  @param  InterruptStatus A pointer to the bit mask of the currently active interrupts\r
+                          If this is NULL, the interrupt status will not be read from\r
+                          the device. If this is not NULL, the interrupt status will\r
+                          be read from the device. When the  interrupt status is read,\r
+                          it will also be cleared. Clearing the transmit  interrupt\r
+                          does not empty the recycled transmit buffer array.\r
+  @param  TxBuffer        Recycled transmit buffer address. The network interface will\r
+                          not transmit if its internal recycled transmit buffer array\r
+                          is full. Reading the transmit buffer does not clear the\r
+                          transmit interrupt. If this is NULL, then the transmit buffer\r
+                          status will not be read. If there are no transmit buffers to\r
+                          recycle and TxBuf is not NULL, * TxBuf will be set to NULL.\r
+\r
+  @retval EFI_SUCCESS           Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpGetStatus(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       OUT UINT32*                                                     InterruptStatus,\r
+       OUT VOID**                                                      TxBuffer\r
+       )\r
+{\r
+       if ( TxBuffer != NULL )\r
+       {\r
+               *( ( UINT8 ** ) TxBuffer ) = ( UINT8 * ) 1;\r
+       }\r
+\r
+       if ( InterruptStatus != NULL )\r
+       {\r
+               *InterruptStatus = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;\r
+       }\r
+\r
+       return( EFI_SUCCESS );\r
+}\r
+\r
+\r
+/**\r
+  Places a packet in the transmit queue of a network interface.\r
+\r
+  @param  This       Protocol instance pointer.\r
+  @param  HeaderSize The size, in bytes, of the media header to be filled in by\r
+                     the Transmit() function. If HeaderSize is non-zero, then it\r
+                     must be equal to This->Mode->MediaHeaderSize and the DestAddr\r
+                     and Protocol parameters must not be NULL.\r
+  @param  BufferSize The size, in bytes, of the entire packet (media header and\r
+                     data) to be transmitted through the network interface.\r
+  @param  Buffer     A pointer to the packet (media header followed by data) to be\r
+                     transmitted. This parameter cannot be NULL. If HeaderSize is zero,\r
+                     then the media header in Buffer must already be filled in by the\r
+                     caller. If HeaderSize is non-zero, then the media header will be\r
+                     filled in by the Transmit() function.\r
+  @param  SrcAddr    The source HW MAC address. If HeaderSize is zero, then this parameter\r
+                     is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then\r
+                     This->Mode->CurrentAddress is used for the source HW MAC address.\r
+  @param  DestAddr   The destination HW MAC address. If HeaderSize is zero, then this\r
+                     parameter is ignored.\r
+  @param  Protocol   The type of header to build. If HeaderSize is zero, then this\r
+                     parameter is ignored. See RFC 1700, section "Ether Types", for\r
+                     examples.\r
+\r
+  @retval EFI_SUCCESS           The packet was placed on the transmit queue.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.\r
+  @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpTransmit(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       IN UINTN                                                        HeaderSize,\r
+       IN UINTN                                                        BufferSize,\r
+       IN VOID*                                                        Buffer,\r
+       IN EFI_MAC_ADDRESS*                                     SrcAddr OPTIONAL,\r
+       IN EFI_MAC_ADDRESS*                                     DestAddr OPTIONAL,\r
+       IN UINT16*                                                      Protocol OPTIONAL\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private;\r
+       EthernetHeader*                                         EnetHeader;\r
+       INTN                                                            Result;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+       if ( This->Mode->State < EfiSimpleNetworkStarted )\r
+       {\r
+               return( EFI_NOT_STARTED );\r
+       }\r
+\r
+       if ( HeaderSize != 0 )\r
+       {\r
+               if ( ( DestAddr == NULL ) || ( Protocol == NULL ) || ( HeaderSize != This->Mode->MediaHeaderSize ) )\r
+               {\r
+                       return( EFI_INVALID_PARAMETER );\r
+               }\r
+\r
+               if ( SrcAddr == NULL )\r
+               {\r
+                       SrcAddr = &This->Mode->CurrentAddress;\r
+               }\r
+\r
+               EnetHeader = ( EthernetHeader * ) Buffer;\r
+\r
+               CopyMem( EnetHeader->DstAddr, DestAddr, NET_ETHER_ADDR_LEN );\r
+               CopyMem( EnetHeader->SrcAddr, SrcAddr, NET_ETHER_ADDR_LEN );\r
+\r
+               EnetHeader->Type = HTONS( *Protocol );\r
+       }\r
+\r
+       Result = Private->UnixThunk->Write( Private->BpfFd, Buffer, BufferSize );\r
+\r
+       if ( Result < 0 )\r
+       {\r
+               return( EFI_DEVICE_ERROR );\r
+       }\r
+       else\r
+       {\r
+               return( EFI_SUCCESS );\r
+       }\r
+}\r
+\r
+/**\r
+  Receives a packet from a network interface.\r
+\r
+  @param  This             Protocol instance pointer.\r
+  @param  HeaderSize       The size, in bytes, of the media header received on the network\r
+                           interface. If this parameter is NULL, then the media header size\r
+                           will not be returned.\r
+  @param  BuffSize         On entry, the size, in bytes, of Buffer. On exit, the size, in\r
+                           bytes, of the packet that was received on the network interface.\r
+  @param  Buffer           A pointer to the data buffer to receive both the media header and\r
+                           the data.\r
+  @param  SourceAddr       The source HW MAC address. If this parameter is NULL, the\r
+                           HW MAC source address will not be extracted from the media\r
+                           header.\r
+  @param  DestinationAddr  The destination HW MAC address. If this parameter is NULL,\r
+                           the HW MAC destination address will not be extracted from the\r
+                           media header.\r
+  @param  Protocol         The media header type. If this parameter is NULL, then the\r
+                           protocol will not be extracted from the media header. See\r
+                           RFC 1700 section "Ether Types" for examples.\r
+\r
+  @retval EFI_SUCCESS           The received data was stored in Buffer, and BufferSize has\r
+                                been updated to the number of bytes received.\r
+  @retval EFI_NOT_READY         The network interface is too busy to accept this transmit\r
+                                request.\r
+  @retval EFI_NOT_STARTED       The network interface has not been started.\r
+  @retval EFI_BUFFER_TOO_SMALL  The BufferSize parameter is too small.\r
+  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpReceive(\r
+       IN EFI_SIMPLE_NETWORK_PROTOCOL*         This,\r
+       OUT UINTN*                                                      HeaderSize OPTIONAL,\r
+       IN OUT UINTN*                                           BuffSize,\r
+       OUT VOID*                                                       Buffer,\r
+       OUT EFI_MAC_ADDRESS*                            SourceAddr OPTIONAL,\r
+       OUT EFI_MAC_ADDRESS*                            DestinationAddr OPTIONAL,\r
+       OUT UINT16*                                                     Protocol OPTIONAL\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private;\r
+       struct bpf_hdr*                                         BpfHeader;\r
+       EthernetHeader*                                         EnetHeader;\r
+       EFI_STATUS                                                      Status = EFI_SUCCESS;\r
+       INTN                                                            Result;\r
+\r
+       if ( This->Mode->State < EfiSimpleNetworkStarted )\r
+       {\r
+               return( EFI_NOT_STARTED );\r
+       }\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( This );\r
+\r
+       //\r
+       // Do we have any remaining packets from the previous read?\r
+       //\r
+       if ( Private->CurrentReadPointer >= Private->EndReadPointer )\r
+       {\r
+               Result = Private->UnixThunk->Read( Private->BpfFd, Private->ReadBuffer, Private->ReadBufferSize );\r
+\r
+               if ( Result < 0 )\r
+               {\r
+                       Result = Private->UnixThunk->GetErrno();\r
+\r
+                       //\r
+                       // EAGAIN means that there's no I/O outstanding against this file descriptor.\r
+                       //\r
+                       if ( Result == EAGAIN )\r
+                       {\r
+                               return( EFI_NOT_READY );\r
+                       }\r
+                       else\r
+                       {\r
+                               return( EFI_DEVICE_ERROR );\r
+                       }\r
+               }\r
+\r
+               if ( Result == 0 )\r
+               {\r
+                       return( EFI_NOT_READY );\r
+               }\r
+\r
+               Private->CurrentReadPointer = Private->ReadBuffer;\r
+               Private->EndReadPointer = Private->CurrentReadPointer + Result;\r
+       }\r
+\r
+       BpfHeader = Private->CurrentReadPointer;\r
+       EnetHeader = Private->CurrentReadPointer + BpfHeader->bh_hdrlen;\r
+\r
+       if ( BpfHeader->bh_caplen > *BuffSize )\r
+       {\r
+               *BuffSize = BpfHeader->bh_caplen;\r
+               return( EFI_BUFFER_TOO_SMALL );\r
+       }\r
+\r
+       CopyMem( Buffer, EnetHeader, BpfHeader->bh_caplen );\r
+       *BuffSize = BpfHeader->bh_caplen;\r
+\r
+       if ( HeaderSize != NULL )\r
+       {\r
+               *HeaderSize = sizeof( EthernetHeader );\r
+       }\r
+\r
+       if ( DestinationAddr != NULL )\r
+       {\r
+               ZeroMem( DestinationAddr, sizeof( EFI_MAC_ADDRESS ) );\r
+               CopyMem( DestinationAddr, EnetHeader->DstAddr, NET_ETHER_ADDR_LEN );\r
+       }\r
+\r
+       if ( SourceAddr != NULL )\r
+       {\r
+               ZeroMem( SourceAddr, sizeof( EFI_MAC_ADDRESS ) );\r
+               CopyMem( SourceAddr, EnetHeader->SrcAddr, NET_ETHER_ADDR_LEN );\r
+       }\r
+\r
+       if ( Protocol != NULL )\r
+       {\r
+               *Protocol = NTOHS( EnetHeader->Type );\r
+       }\r
+\r
+       Private->CurrentReadPointer += BPF_WORDALIGN( BpfHeader->bh_hdrlen + BpfHeader->bh_caplen );\r
+\r
+       return( Status );\r
+}\r
+\r
+\r
+VOID\r
+EFIAPI\r
+UnixSnpWaitForPacketNotify(\r
+       IN EFI_EVENT                                            Event,\r
+       IN VOID*                                                        Context\r
+       )\r
+{\r
+       UNIX_SNP_PRIVATE_DATA*                          Private;\r
+\r
+       Private = UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS( Context );\r
+\r
+       if ( Private->Snp.Mode->State < EfiSimpleNetworkStarted )\r
+       {\r
+               return;\r
+       }\r
+}\r
+\r
+\r
+/**\r
+  This is the declaration of an EFI image entry point. This entry point is\r
+  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r
+  both device drivers and bus drivers.\r
+\r
+  @param  ImageHandle           The firmware allocated handle for the UEFI image.\r
+  @param  SystemTable           A pointer to the EFI System Table.\r
+\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.\r
+\r
+**/\r
+EFI_STATUS\r
+InitializeUnixSnpDriver(\r
+       IN EFI_HANDLE                           ImageHandle,\r
+       IN EFI_SYSTEM_TABLE*            SystemTable\r
+       )\r
+{\r
+       EFI_STATUS                                              Status;\r
+\r
+       //\r
+       // Install the Driver Protocols\r
+       //\r
+\r
+       Status = EfiLibInstallDriverBindingComponentName2(\r
+                                       ImageHandle,\r
+                                       SystemTable,\r
+                                       &gUnixSnpDriverBinding,\r
+                                       ImageHandle,\r
+                                       &gUnixSnpDriverComponentName,\r
+                                       &gUnixSnpDriverComponentName2\r
+                                       );\r
+\r
+       return( Status );\r
+}\r
diff --git a/UnixPkg/UnixSnpDxe/UnixSnp.h b/UnixPkg/UnixSnpDxe/UnixSnp.h
new file mode 100644 (file)
index 0000000..de0b0ae
--- /dev/null
@@ -0,0 +1,156 @@
+/** @file\r
+\r
+ Copyright (c) 2010, Apple, Inc. All rights reserved.\r
+\r
+    This program and the accompanying materials\r
+    are licensed and made available under the terms and conditions of the BSD License\r
+    which accompanies this distribution. The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.php\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  UnixSnp.h\r
+\r
+Abstract:\r
+\r
+-**/\r
+\r
+#ifndef _UNIX_SNP_H_\r
+#define _UNIX_SNP_H_\r
+\r
+#include <Uefi.h>\r
+\r
+#include <Protocol/SimpleNetwork.h>\r
+#include <Protocol/DevicePath.h>\r
+#include <Protocol/UnixIo.h>\r
+\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/DevicePathLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+#include <Library/NetLib.h>\r
+\r
+#define NET_ETHER_HEADER_SIZE     14\r
+\r
+//\r
+//  Private data for driver.\r
+//\r
+#define UNIX_SNP_PRIVATE_DATA_SIGNATURE SIGNATURE_32( 'U', 'S', 'N', 'P' )\r
+\r
+typedef struct\r
+{\r
+       UINT32                                                          Signature;\r
+\r
+       EFI_UNIX_THUNK_PROTOCOL*                        UnixThunk;\r
+\r
+       EFI_HANDLE                                                      DeviceHandle;\r
+       EFI_DEVICE_PATH_PROTOCOL*                       DevicePath;\r
+\r
+       EFI_MAC_ADDRESS                                         MacAddress;\r
+\r
+       CHAR8*                                                          InterfaceName;\r
+       INTN                                                            ReadBufferSize;\r
+       VOID*                                                           ReadBuffer;\r
+       //\r
+       // Two walking pointers to manage the multiple packets that can be returned\r
+       // in a single read.\r
+       //\r
+       VOID*                                                           CurrentReadPointer;\r
+       VOID*                                                           EndReadPointer;\r
+\r
+       INTN                                                            BpfFd;\r
+\r
+       EFI_SIMPLE_NETWORK_PROTOCOL                     Snp;\r
+       EFI_SIMPLE_NETWORK_MODE                         Mode;\r
+} UNIX_SNP_PRIVATE_DATA;\r
+\r
+#define UNIX_SNP_PRIVATE_DATA_FROM_SNP_THIS(a) \\r
+                       CR( a, UNIX_SNP_PRIVATE_DATA, Snp, UNIX_SNP_PRIVATE_DATA_SIGNATURE )\r
+\r
+extern EFI_DRIVER_BINDING_PROTOCOL    gUnixSnpDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL    gUnixSnpDriverComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL   gUnixSnpDriverComponentName2;\r
+\r
+/**\r
+  Test to see if this driver supports ControllerHandle. This service\r
+  is called by the EFI boot service ConnectController(). In\r
+  order to make drivers as small as possible, there are a few calling\r
+  restrictions for this service. ConnectController() must\r
+  follow these calling restrictions. If any other agent wishes to call\r
+  Supported() it must also follow these calling restrictions.\r
+\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
+\r
+  @retval EFI_SUCCESS         This driver supports this device\r
+  @retval EFI_UNSUPPORTED     This driver does not support this device\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverBindingSupported (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  * This,\r
+  IN EFI_HANDLE                   ControllerHandle,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL\r
+  );\r
+\r
+/**\r
+  Start this driver on ControllerHandle. This service is called by the\r
+  EFI boot service ConnectController(). In order to make\r
+  drivers as small as possible, there are a few calling restrictions for\r
+  this service. ConnectController() must follow these\r
+  calling restrictions. If any other agent wishes to call Start() it\r
+  must also follow these calling restrictions.\r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverBindingStart (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  * This,\r
+  IN EFI_HANDLE                   ControllerHandle,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL\r
+  );\r
+\r
+/**\r
+  Stop this driver on ControllerHandle. This service is called by the\r
+  EFI boot service DisconnectController(). In order to\r
+  make drivers as small as possible, there are a few calling\r
+  restrictions for this service. DisconnectController()\r
+  must follow these calling restrictions. If any other agent wishes\r
+  to call Stop() it must also follow these calling restrictions.\r
+  \r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       Always succeeds.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+UnixSnpDriverBindingStop (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  UINTN                        NumberOfChildren,\r
+  IN  EFI_HANDLE                   *ChildHandleBuffer\r
+  );\r
+\r
+#endif // _UNIX_SNP_H_\r
diff --git a/UnixPkg/UnixSnpDxe/UnixSnpDxe.inf b/UnixPkg/UnixSnpDxe/UnixSnpDxe.inf
new file mode 100644 (file)
index 0000000..430cea5
--- /dev/null
@@ -0,0 +1,58 @@
+#/** @file\r
+# Component name for module UnixSnpDxe\r
+#\r
+# Copyright (c) 2010, Apple, Inc. All rights reserved\r
+#\r
+#  All rights reserved. This program and the accompanying materials\r
+#    are licensed and made available under the terms and conditions of the BSD License\r
+#    which accompanies this distribution. The full text of the license may be found at\r
+#    http://opensource.org/licenses/bsd-license.php\r
+#\r
+#    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = UnixSnpDxe\r
+  FILE_GUID                      = 20BAF49B-036D-4CA6-8FAF-583ED2737F95\r
+  MODULE_TYPE                    = UEFI_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+  EFI_SPECIFICATION_VERSION      = 0x00020000\r
+\r
+  ENTRY_POINT                    = InitializeUnixSnpDriver\r
+#  UNLOAD_IMAGE                   = UnixSnpUnload\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources.common]\r
+  ComponentName.c\r
+  UnixSnp.h\r
+  UnixSnp.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  UnixPkg/UnixPkg.dec\r
+\r
+[LibraryClasses]\r
+  DevicePathLib\r
+  UefiLib\r
+  UefiBootServicesTableLib\r
+  BaseMemoryLib\r
+  DebugLib\r
+  UefiDriverEntryPoint\r
+  NetLib\r
+\r
+[Protocols]\r
+  gEfiSimpleNetworkProtocolGuid                 # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiDevicePathProtocolGuid                    # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiUnixIoProtocolGuid                                               # PROTOCOL ALWAYS_CONSUMED\r
+\r
+[Guids]\r
+  gEfiUnixNetworkGuid                                                  # GUID ALWAYS_CONSUMED\r
index b6d2a308535ec3100a611e01dee93875676bba0e..e1e61f72f9a4216edea9f5ac24dd204cfc5d79a7 100644 (file)
@@ -25,6 +25,7 @@ Abstract:
 #include "PiDxe.h"
 #include <Guid/EventGroup.h>
 #include <Protocol/SimpleTextIn.h>
+#include <Protocol/SimplePointer.h>
 #include <Protocol/UgaDraw.h>
 #include "Protocol/UnixUgaIo.h"
 #include <Library/DebugLib.h>
@@ -48,6 +49,7 @@ typedef struct {
   EFI_HANDLE                  Handle;
   EFI_UGA_DRAW_PROTOCOL       UgaDraw;
   EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn;
+  EFI_SIMPLE_POINTER_PROTOCOL SimplePointer;
 
   EFI_UNIX_THUNK_PROTOCOL   *UnixThunk;
 
@@ -61,6 +63,8 @@ typedef struct {
   UINT32                      ColorDepth;
   UINT32                      RefreshRate;
 
+  EFI_SIMPLE_POINTER_MODE     PointerMode;
+
   //
   // UGA Private Data knowing when to start hardware
   //
@@ -78,6 +82,9 @@ typedef struct {
 #define UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS(a)  \
          CR(a, UGA_PRIVATE_DATA, SimpleTextIn, UGA_PRIVATE_DATA_SIGNATURE)
 
+#define UGA_PRIVATE_DATA_FROM_POINTER_THIS(a)  \
+         CR(a, UGA_PRIVATE_DATA, SimplePointer, UGA_PRIVATE_DATA_SIGNATURE)
+
 //
 // Global Protocol Variables
 //
@@ -287,6 +294,27 @@ UnixUgaInitializeSimpleTextInForWindow (
   )
 /*++
 
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Private - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+;
+
+EFI_STATUS
+UnixUgaInitializeSimplePointerForWindow (
+  IN  UGA_PRIVATE_DATA    *Private
+  )
+/*++
+
 Routine Description:
 
   TODO: Add function description
index 707b64cefd2b099f8f542ddb9040f1174c5eb53f..5cba6580daff7d5f5ec6afa29cc9dccf85f57575 100644 (file)
@@ -66,6 +66,7 @@
 \r
 [Protocols]\r
   gEfiSimpleTextInProtocolGuid                  # PROTOCOL BY_START\r
+  gEfiSimplePointerProtocolGuid                 # PROTOCOL BY_START\r
   gEfiUnixUgaIoProtocolGuid                     # PROTOCOL BY_START\r
   gEfiUgaDrawProtocolGuid                       # PROTOCOL BY_START\r
   gEfiUnixIoProtocolGuid                        # PROTOCOL TO_START\r
index 4d3148baa3c3ddc5b380c1af5172bf9322504b6a..99aa115038a56dd6821670af5080cc57701d75e3 100644 (file)
@@ -177,6 +177,8 @@ Returns:
                   &Private->UgaDraw,\r
                   &gEfiSimpleTextInProtocolGuid,\r
                   &Private->SimpleTextIn,\r
+                  &gEfiSimplePointerProtocolGuid,\r
+                  &Private->SimplePointer,\r
                   NULL\r
                   );\r
 \r
@@ -264,6 +266,8 @@ Returns:
                   &Private->UgaDraw,\r
                   &gEfiSimpleTextInProtocolGuid,\r
                   &Private->SimpleTextIn,\r
+                  &gEfiSimplePointerProtocolGuid,\r
+                  &Private->SimplePointer,\r
                   NULL\r
                   );\r
   if (!EFI_ERROR (Status)) {\r
index f37c086cbce99c92a383e868f3d935c03844324c..4415e04b44902ee4cd30c9b9b3e0e4a2883633cd 100644 (file)
@@ -1,6 +1,7 @@
 /*++
 
 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+Portions copyright (c) 2010, Apple, Inc. 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
@@ -57,7 +58,7 @@ Returns:
 --*/
 {
   UGA_PRIVATE_DATA  *Private;
-  EFI_INPUT_KEY     Key;
+  EFI_KEY_DATA      Key;
   EFI_TPL           OldTpl;
 
   Private = UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
@@ -73,7 +74,7 @@ Returns:
   //
   // A reset is draining the Queue
   //
-  while (Private->UgaIo->UgaGetKey(Private->UgaIo, &Key) == EFI_SUCCESS)
+  while (Private->UgaIo->UgaGetKey (Private->UgaIo, &Key) == EFI_SUCCESS)
     ;
 
   //
@@ -87,7 +88,7 @@ EFI_STATUS
 EFIAPI
 UnixUgaSimpleTextInReadKeyStroke (
   IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL          *This,
-  OUT EFI_INPUT_KEY                       *Key
+  OUT EFI_INPUT_KEY                          *Key
   )
 /*++
 
@@ -109,7 +110,8 @@ Returns:
   UGA_PRIVATE_DATA  *Private;
   EFI_STATUS        Status;
   EFI_TPL           OldTpl;
-
+  EFI_KEY_DATA      KeyData;
+  
   Private = UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
   if (Private->UgaIo == NULL) {
     return EFI_NOT_READY;
@@ -120,7 +122,9 @@ Returns:
   //
   OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
 
-  Status  = Private->UgaIo->UgaGetKey(Private->UgaIo, Key);
+  Status  = Private->UgaIo->UgaGetKey(Private->UgaIo, &KeyData);
+  CopyMem (Key, &KeyData, sizeof (EFI_INPUT_KEY));
+  
   //
   // Leave critical section and return
   //
@@ -179,6 +183,156 @@ Returns:
   gBS->RestoreTPL (OldTpl);
 }
 
+//
+// Simple Pointer implementation.
+//
+
+EFI_STATUS
+EFIAPI
+UnixUgaSimplePointerReset (
+  IN EFI_SIMPLE_POINTER_PROTOCOL          *This,
+  IN BOOLEAN                              ExtendedVerification
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  This                  - TODO: add argument description
+  ExtendedVerification  - TODO: add argument description
+
+Returns:
+
+  EFI_SUCCESS - TODO: Add description for return value
+
+--*/
+{
+  UGA_PRIVATE_DATA             *Private;
+  EFI_SIMPLE_POINTER_STATE     State;
+  EFI_TPL                      OldTpl;
+
+  Private = UGA_PRIVATE_DATA_FROM_POINTER_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
+
+  //
+  // A reset is draining the Queue
+  //
+  while (Private->UgaIo->UgaGetPointerState(Private->UgaIo, &State) == EFI_SUCCESS)
+    ;
+
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+  return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+UnixUgaSimplePointerGetState (
+  IN EFI_SIMPLE_POINTER_PROTOCOL          *This,
+  IN OUT EFI_SIMPLE_POINTER_STATE         *State
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  This  - TODO: add argument description
+  Key   - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+{
+  UGA_PRIVATE_DATA  *Private;
+  EFI_STATUS        Status;
+  EFI_TPL           OldTpl;
+
+  Private = UGA_PRIVATE_DATA_FROM_POINTER_THIS (This);
+  if (Private->UgaIo == NULL) {
+    return EFI_NOT_READY;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaGetPointerState(Private->UgaIo, State);
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+
+  return Status;
+}
+
+VOID
+EFIAPI
+UnixUgaSimplePointerWaitForInput (
+  IN EFI_EVENT          Event,
+  IN VOID               *Context
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Event   - TODO: add argument description
+  Context - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+{
+  UGA_PRIVATE_DATA  *Private;
+  EFI_STATUS        Status;
+  EFI_TPL           OldTpl;
+
+  Private = (UGA_PRIVATE_DATA *) Context;
+  if (Private->UgaIo == NULL) {
+    return;
+  }
+
+  //
+  // Enter critical section
+  //
+  OldTpl  = gBS->RaiseTPL (TPL_NOTIFY);
+
+  Status  = Private->UgaIo->UgaCheckPointer(Private->UgaIo);
+  if (!EFI_ERROR (Status)) {
+    //
+    // If the pointer state has changed, signal our event.
+    //
+    gBS->SignalEvent (Event);
+  }
+  //
+  // Leave critical section and return
+  //
+  gBS->RestoreTPL (OldTpl);
+}
+
 EFI_STATUS
 UnixUgaInitializeSimpleTextInForWindow (
   IN  UGA_PRIVATE_DATA    *Private
@@ -217,3 +371,48 @@ Returns:
 
   return Status;
 }
+
+EFI_STATUS
+UnixUgaInitializeSimplePointerForWindow (
+  IN  UGA_PRIVATE_DATA    *Private
+  )
+/*++
+
+Routine Description:
+
+  TODO: Add function description
+
+Arguments:
+
+  Private - TODO: add argument description
+
+Returns:
+
+  TODO: add return values
+
+--*/
+{
+  EFI_STATUS  Status;
+
+  //
+  // Initialize Simple Pointer protoocol
+  //
+  Private->PointerMode.ResolutionX = 1;
+  Private->PointerMode.ResolutionY = 1;
+  Private->PointerMode.LeftButton  = TRUE;
+  Private->PointerMode.RightButton = TRUE;
+
+  Private->SimplePointer.Reset     = UnixUgaSimplePointerReset;
+  Private->SimplePointer.GetState  = UnixUgaSimplePointerGetState;
+  Private->SimplePointer.Mode      = &Private->PointerMode;
+
+  Status = gBS->CreateEvent (
+                  EVT_NOTIFY_WAIT,
+                  TPL_NOTIFY,
+                  UnixUgaSimplePointerWaitForInput,
+                  Private,
+                  &Private->SimplePointer.WaitForInput
+                  );
+
+  return Status;
+}
index 45e84b0f2501dca54bf037f57906865a1dead81f..470a788a103d61a61280f3dfa3b11ce3a69bd912 100644 (file)
@@ -394,6 +394,8 @@ Returns:
 
   UnixUgaInitializeSimpleTextInForWindow (Private);
 
+  UnixUgaInitializeSimplePointerForWindow (Private);
+
   return EFI_SUCCESS;
 }
 
index 096233b60fe9d4f9c6f5995ab30481fd607cdbb2..453aac1896153d9995a2845b667eee9959c7eab7 100755 (executable)
@@ -7,7 +7,7 @@
 set -e
 
 #
-# Source the workspace and set up the environment varaibles we need
+# Source the workspace and set up the environment variables we need
 #
 cd ../..
 ./build.sh $1 $2 $3 $4 $5 $6 $8
index 644c6e1e0f369b390e9fc9b22d68848eb847e73b..0ccda8f9ef80b25accced583467ea6f87aca2477 100755 (executable)
@@ -7,7 +7,7 @@
 set -e
 
 #
-# Source the workspace and set up the environment varaibles we need
+# Source the workspace and set up the environment variables we need
 #
 cd ../..
 echo `pwd`