]> git.proxmox.com Git - mirror_edk2.git/blame - UnixPkg/Sec/Gasket.h
Move registration of DXE Core with PeCoffExtraActionLib after the lib constructors...
[mirror_edk2.git] / UnixPkg / Sec / Gasket.h
CommitLineData
f9b8ab56
HT
1/** @file\r
2\r
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
4 \r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
7ee3b613
A
14\r
15#ifndef _GASKET_H_\r
16#define _GASKET_H_\r
17\r
18#include <Library/PeCoffLib.h>\r
19\r
20#include <Protocol/UgaDraw.h>\r
21#include <Protocol/SimpleTextIn.h>\r
22#include <Protocol/UnixUgaIo.h>\r
23\r
24\r
25//\r
26// Gasket functions for EFI_UNIX_THUNK_PROTOCOL\r
27//\r
28\r
29void GasketmsSleep (unsigned long Milliseconds);\r
30void Gasketexit (int status);\r
31void GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));\r
32void GasketGetLocalTime (EFI_TIME *Time);\r
33struct tm *Gasketgmtime (const time_t *clock);\r
34long GasketGetTimeZone (void);\r
35int GasketGetDayLight (void);\r
b9c8e50e 36int Gasketpoll (struct pollfd *pfd, unsigned int nfds, int timeout);\r
37long Gasketread (int fd, void *buf, int count);\r
38long Gasketwrite (int fd, const void *buf, int count);\r
7ee3b613
A
39char *Gasketgetenv (const char *name);\r
40int Gasketopen (const char *name, int flags, int mode);\r
41off_t Gasketlseek (int fd, off_t off, int whence);\r
42int Gasketftruncate (int fd, long int len);\r
43int Gasketclose (int fd);\r
44int Gasketmkdir (const char *pathname, mode_t mode);\r
45int Gasketrmdir (const char *pathname);\r
46int Gasketunlink (const char *pathname);\r
47int GasketGetErrno (void);\r
48DIR *Gasketopendir (const char *pathname);\r
b9c8e50e 49void Gasketrewinddir (DIR *dir);\r
7ee3b613
A
50struct dirent *Gasketreaddir (DIR *dir);\r
51int Gasketclosedir (DIR *dir);\r
52int Gasketstat (const char *path, STAT_FIX *buf);\r
53int Gasketstatfs (const char *path, struct statfs *buf);\r
54int Gasketrename (const char *oldpath, const char *newpath);\r
55time_t Gasketmktime (struct tm *tm);\r
56int Gasketfsync (int fd);\r
57int Gasketchmod (const char *path, mode_t mode);\r
58int Gasketutime (const char *filename, const struct utimbuf *buf);\r
59int Gaskettcflush (int fildes, int queue_selector);\r
60EFI_STATUS GasketUgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);\r
61void Gasketperror (__const char *__s);\r
62\r
63//\r
64// ... is always an int or pointer to device specific data structure\r
65//\r
a4902ccc 66int Gasketioctl (int fd, unsigned long int __request, void *Arg);\r
67int Gasketfcntl (int __fd, int __cmd, void *Arg);\r
7ee3b613
A
68\r
69int Gasketcfsetispeed (struct termios *__termios_p, speed_t __speed);\r
70int Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed);\r
71int Gaskettcgetattr (int __fd, struct termios *__termios_p); \r
72int Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p);\r
73int Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact);\r
7ee3b613
A
74\r
75RETURN_STATUS\r
76GasketUnixPeCoffGetEntryPoint (\r
77 IN VOID *Pe32Data,\r
78 IN OUT VOID **EntryPoint\r
79 );\r
80\r
81VOID\r
82GasketUnixPeCoffRelocateImageExtraAction (\r
83 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
84 );\r
85\r
86VOID\r
b9c8e50e 87GasketUnixPeCoffUnloadImageExtraAction (\r
7ee3b613
A
88 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
89 );\r
90 \r
91\r
b9c8e50e 92UINTN GasketVoid (void *api);\r
93UINTN GasketUintn (void *api, UINTN a);\r
94UINTN GasketUintnUintn (void *api, UINTN a, UINTN b);\r
95UINTN GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c);\r
96UINTN GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d);\r
97UINTN GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j);\r
98UINTN GasketUint64Uintn (void *api, UINT64 a, UINTN b);\r
7ee3b613 99UINT64 GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c);\r
b9c8e50e 100UINTN GasketUintnUint16 (void *api, UINTN a, UINT16 b);\r
7ee3b613 101\r
b9c8e50e 102UINTN ReverseGasketUint64 (void *api, UINT64 a);\r
7ee3b613
A
103\r
104//\r
105// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
106//\r
107\r
108EFI_STATUS EFIAPI GasketUgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
109EFI_STATUS EFIAPI GasketUgaSize (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
110EFI_STATUS EFIAPI GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
111EFI_STATUS EFIAPI GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
112EFI_STATUS EFIAPI GasketUgaBlt (\r
113 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
114 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
115 IN EFI_UGA_BLT_OPERATION BltOperation,\r
116 IN UINTN SourceX,\r
117 IN UINTN SourceY,\r
118 IN UINTN DestinationX,\r
119 IN UINTN DestinationY,\r
120 IN UINTN Width,\r
121 IN UINTN Height,\r
122 IN UINTN Delta OPTIONAL\r
123 );\r
124\r
125EFI_STATUS UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title);\r
126\r
127\r
128//\r
129// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
130//\r
131EFI_STATUS UgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
132EFI_STATUS UgaSize(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
133EFI_STATUS UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
134EFI_STATUS UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
135EFI_STATUS UgaBlt (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
136 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
137 IN EFI_UGA_BLT_OPERATION BltOperation,\r
138 IN UINTN SourceX,\r
139 IN UINTN SourceY,\r
140 IN UINTN DestinationX,\r
141 IN UINTN DestinationY,\r
142 IN UINTN Width,\r
143 IN UINTN Height,\r
144 IN UINTN Delta OPTIONAL\r
145 );\r
146\r
147\r
148\r
149#endif\r
150\r
151\r