]> git.proxmox.com Git - mirror_edk2.git/blame - UnixPkg/Sec/Gasket.h
Move SmmLib from IntelFrameworkPkg to MdePkg because this library is useful to both...
[mirror_edk2.git] / UnixPkg / Sec / Gasket.h
CommitLineData
7ee3b613
A
1\r
2#ifndef _GASKET_H_\r
3#define _GASKET_H_\r
4\r
5#include <Library/PeCoffLib.h>\r
6\r
7#include <Protocol/UgaDraw.h>\r
8#include <Protocol/SimpleTextIn.h>\r
9#include <Protocol/UnixUgaIo.h>\r
10\r
11\r
12//\r
13// Gasket functions for EFI_UNIX_THUNK_PROTOCOL\r
14//\r
15\r
16void GasketmsSleep (unsigned long Milliseconds);\r
17void Gasketexit (int status);\r
18void GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));\r
19void GasketGetLocalTime (EFI_TIME *Time);\r
20struct tm *Gasketgmtime (const time_t *clock);\r
21long GasketGetTimeZone (void);\r
22int GasketGetDayLight (void);\r
23int Gasketpoll (struct pollfd *pfd, int nfds, int timeout);\r
24int Gasketread (int fd, void *buf, int count);\r
25int Gasketwrite (int fd, const void *buf, int count);\r
26char *Gasketgetenv (const char *name);\r
27int Gasketopen (const char *name, int flags, int mode);\r
28off_t Gasketlseek (int fd, off_t off, int whence);\r
29int Gasketftruncate (int fd, long int len);\r
30int Gasketclose (int fd);\r
31int Gasketmkdir (const char *pathname, mode_t mode);\r
32int Gasketrmdir (const char *pathname);\r
33int Gasketunlink (const char *pathname);\r
34int GasketGetErrno (void);\r
35DIR *Gasketopendir (const char *pathname);\r
36void *Gasketrewinddir (DIR *dir);\r
37struct dirent *Gasketreaddir (DIR *dir);\r
38int Gasketclosedir (DIR *dir);\r
39int Gasketstat (const char *path, STAT_FIX *buf);\r
40int Gasketstatfs (const char *path, struct statfs *buf);\r
41int Gasketrename (const char *oldpath, const char *newpath);\r
42time_t Gasketmktime (struct tm *tm);\r
43int Gasketfsync (int fd);\r
44int Gasketchmod (const char *path, mode_t mode);\r
45int Gasketutime (const char *filename, const struct utimbuf *buf);\r
46int Gaskettcflush (int fildes, int queue_selector);\r
47EFI_STATUS GasketUgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);\r
48void Gasketperror (__const char *__s);\r
49\r
50//\r
51// ... is always an int or pointer to device specific data structure\r
52//\r
53int Gasketioctl (int fd, unsigned long int __request, ...);\r
54int Gasketfcntl (int __fd, int __cmd, ...);\r
55\r
56int Gasketcfsetispeed (struct termios *__termios_p, speed_t __speed);\r
57int Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed);\r
58int Gaskettcgetattr (int __fd, struct termios *__termios_p); \r
59int Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p);\r
60int Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact);\r
61int Gasketsetcontext (const ucontext_t *ucp);\r
62int Gasketgetcontext (ucontext_t *ucp);\r
63int Gasketsigemptyset (sigset_t *set);\r
64int Gasketsigaltstack (const stack_t *ss, stack_t *oss);\r
65\r
66RETURN_STATUS\r
67GasketUnixPeCoffGetEntryPoint (\r
68 IN VOID *Pe32Data,\r
69 IN OUT VOID **EntryPoint\r
70 );\r
71\r
72VOID\r
73GasketUnixPeCoffRelocateImageExtraAction (\r
74 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
75 );\r
76\r
77VOID\r
78GasketPeCoffLoaderUnloadImageExtraAction (\r
79 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
80 );\r
81 \r
82\r
83int GasketVoid (void *api);\r
84int GasketUintn (void *api, UINTN a);\r
85int GasketUintnUintn (void *api, UINTN a, UINTN b);\r
86int GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c);\r
87int GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d);\r
88int GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j);\r
89int GasketUint64Uintn (void *api, UINT64 a, UINTN b);\r
90UINT64 GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c);\r
91int GasketUintnUint16 (void *api, UINTN a, UINT16 b);\r
92\r
93\r
94//\r
95// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
96//\r
97\r
98EFI_STATUS EFIAPI GasketUgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
99EFI_STATUS EFIAPI GasketUgaSize (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
100EFI_STATUS EFIAPI GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
101EFI_STATUS EFIAPI GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
102EFI_STATUS EFIAPI GasketUgaBlt (\r
103 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
104 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
105 IN EFI_UGA_BLT_OPERATION BltOperation,\r
106 IN UINTN SourceX,\r
107 IN UINTN SourceY,\r
108 IN UINTN DestinationX,\r
109 IN UINTN DestinationY,\r
110 IN UINTN Width,\r
111 IN UINTN Height,\r
112 IN UINTN Delta OPTIONAL\r
113 );\r
114\r
115EFI_STATUS UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title);\r
116\r
117\r
118//\r
119// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
120//\r
121EFI_STATUS UgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
122EFI_STATUS UgaSize(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
123EFI_STATUS UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
124EFI_STATUS UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
125EFI_STATUS UgaBlt (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
126 IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,\r
127 IN EFI_UGA_BLT_OPERATION BltOperation,\r
128 IN UINTN SourceX,\r
129 IN UINTN SourceY,\r
130 IN UINTN DestinationX,\r
131 IN UINTN DestinationY,\r
132 IN UINTN Width,\r
133 IN UINTN Height,\r
134 IN UINTN Delta OPTIONAL\r
135 );\r
136\r
137\r
138\r
139#endif\r
140\r
141\r