UnixPkg: Added missing EFIAPI for many Gasket functions

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10923 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten 2010-10-13 07:06:28 +00:00
parent a780c9424b
commit 124f761f02
5 changed files with 594 additions and 231 deletions

View File

@ -146,50 +146,50 @@ typedef struct stat_fix {
typedef
VOID
(*UnixSleep) (
(EFIAPI *UnixSleep) (
unsigned long Milliseconds
);
typedef
VOID
(*UnixExit) (
(EFIAPI *UnixExit) (
int status // exit code for all threads
);
typedef
VOID
(*UnixSetTimer) (
(EFIAPI *UnixSetTimer) (
UINT64 PeriodMs,
VOID (*CallBack)(UINT64 DeltaMs)
VOID (EFIAPI *CallBack)(UINT64 DeltaMs)
);
typedef
VOID
(*UnixGetLocalTime) (
(EFIAPI *UnixGetLocalTime) (
EFI_TIME *Time
);
typedef
struct tm *
(*UnixGmTime)(
(EFIAPI *UnixGmTime)(
const time_t *timep
);
typedef
long
(*UnixGetTimeZone)(
(EFIAPI *UnixGetTimeZone)(
void
);
typedef
int
(*UnixGetDayLight)(
(EFIAPI *UnixGetDayLight)(
void
);
typedef
int
(*UnixPoll)(
(EFIAPI *UnixPoll)(
struct pollfd *pfd,
unsigned int nfds,
int timeout
@ -197,7 +197,7 @@ int
typedef
long
(*UnixRead) (
(EFIAPI *UnixRead) (
int fd,
void *buf,
int count
@ -205,7 +205,7 @@ long
typedef
long
(*UnixWrite) (
(EFIAPI *UnixWrite) (
int fd,
const void *buf,
int count
@ -213,125 +213,125 @@ long
typedef
char *
(*UnixGetenv) (const char *var);
(EFIAPI *UnixGetenv) (const char *var);
typedef
int
(*UnixOpen) (const char *name, int flags, int mode);
(EFIAPI *UnixOpen) (const char *name, int flags, int mode);
typedef
off_t
(*UnixSeek) (int fd, off_t off, int whence);
(EFIAPI *UnixSeek) (int fd, off_t off, int whence);
typedef
int
(*UnixFtruncate) (int fd, long int len);
(EFIAPI *UnixFtruncate) (int fd, long int len);
typedef
int
(*UnixClose) (int fd);
(EFIAPI *UnixClose) (int fd);
typedef
int
(*UnixMkdir)(const char *pathname, mode_t mode);
(EFIAPI *UnixMkdir)(const char *pathname, mode_t mode);
typedef
int
(*UnixRmDir)(const char *pathname);
(EFIAPI *UnixRmDir)(const char *pathname);
typedef
int
(*UnixUnLink)(const char *pathname);
(EFIAPI *UnixUnLink)(const char *pathname);
typedef
int
(*UnixGetErrno)(VOID);
(EFIAPI *UnixGetErrno)(VOID);
typedef
DIR *
(*UnixOpenDir)(const char *pathname);
(EFIAPI *UnixOpenDir)(const char *pathname);
typedef
void
(*UnixRewindDir)(DIR *dir);
(EFIAPI *UnixRewindDir)(DIR *dir);
typedef
struct dirent *
(*UnixReadDir)(DIR *dir);
(EFIAPI *UnixReadDir)(DIR *dir);
typedef
int
(*UnixCloseDir)(DIR *dir);
(EFIAPI *UnixCloseDir)(DIR *dir);
typedef
int
(*UnixStat)(const char *path, STAT_FIX *buf);
(EFIAPI *UnixStat)(const char *path, STAT_FIX *buf);
typedef
int
(*UnixStatFs)(const char *path, struct statfs *buf);
(EFIAPI *UnixStatFs)(const char *path, struct statfs *buf);
typedef
int
(*UnixRename)(const char *oldpath, const char *newpath);
(EFIAPI *UnixRename)(const char *oldpath, const char *newpath);
typedef
time_t
(*UnixMkTime)(struct tm *tm);
(EFIAPI *UnixMkTime)(struct tm *tm);
typedef
int
(*UnixFSync)(int fd);
(EFIAPI *UnixFSync)(int fd);
typedef
int
(*UnixChmod)(const char *path, mode_t mode);
(EFIAPI *UnixChmod)(const char *path, mode_t mode);
typedef
int
(*UnixUTime)(const char *filename, const struct utimbuf *buf);
(EFIAPI *UnixUTime)(const char *filename, const struct utimbuf *buf);
struct _EFI_UNIX_UGA_IO_PROTOCOL;
typedef
EFI_STATUS
(*UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
(EFIAPI *UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
CONST CHAR16 *Title);
typedef
int
(*UnixTcflush) (int fildes, int queue_selector);
(EFIAPI *UnixTcflush) (int fildes, int queue_selector);
typedef
void
(*UnixPerror) (__const char *__s);
(EFIAPI *UnixPerror) (__const char *__s);
typedef
int
#if __CYGWIN__
(*UnixIoCtl) (int fd, int __request, UINTN Arg);
(EFIAPI *UnixIoCtl) (int fd, int __request, UINTN Arg);
#else
(*UnixIoCtl) (int fd, unsigned long int __request, void *Arg);
(EFIAPI *UnixIoCtl) (int fd, unsigned long int __request, void *Arg);
#endif
typedef
int
(*UnixFcntl) (int __fd, int __cmd, void *Arg);
(EFIAPI *UnixFcntl) (int __fd, int __cmd, void *Arg);
typedef
int
(*UnixCfsetispeed) (struct termios *__termios_p, speed_t __speed);
(EFIAPI *UnixCfsetispeed) (struct termios *__termios_p, speed_t __speed);
typedef
int
(*UnixCfsetospeed) (struct termios *__termios_p, speed_t __speed);
(EFIAPI *UnixCfsetospeed) (struct termios *__termios_p, speed_t __speed);
typedef
int
(*UnixTcgetattr) (int __fd, struct termios *__termios_p);
(EFIAPI *UnixTcgetattr) (int __fd, struct termios *__termios_p);
typedef
int
(*UnixTcsetattr) (int __fd, int __optional_actions,
(EFIAPI *UnixTcsetattr) (int __fd, int __optional_actions,
__const struct termios *__termios_p);

View File

@ -27,6 +27,7 @@ Abstract:
EFI_UNIX_THUNK_PROTOCOL *gUnix;
EFI_STATUS
EFIAPI
UnixLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable

View File

@ -109,6 +109,7 @@ extern EFI_HII_HANDLE mHiiHandle;
// Prototypes
//
EFI_STATUS
EFIAPI
MiscSubclassDriverEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable

View File

@ -26,92 +26,421 @@
// Gasket functions for EFI_UNIX_THUNK_PROTOCOL
//
void GasketmsSleep (unsigned long Milliseconds);
void Gasketexit (int status);
void GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));
void GasketGetLocalTime (EFI_TIME *Time);
struct tm *Gasketgmtime (const time_t *clock);
long GasketGetTimeZone (void);
int GasketGetDayLight (void);
int Gasketpoll (struct pollfd *pfd, unsigned int nfds, int timeout);
long Gasketread (int fd, void *buf, int count);
long Gasketwrite (int fd, const void *buf, int count);
char *Gasketgetenv (const char *name);
int Gasketopen (const char *name, int flags, int mode);
off_t Gasketlseek (int fd, off_t off, int whence);
int Gasketftruncate (int fd, long int len);
int Gasketclose (int fd);
int Gasketmkdir (const char *pathname, mode_t mode);
int Gasketrmdir (const char *pathname);
int Gasketunlink (const char *pathname);
int GasketGetErrno (void);
DIR *Gasketopendir (const char *pathname);
void Gasketrewinddir (DIR *dir);
struct dirent *Gasketreaddir (DIR *dir);
int Gasketclosedir (DIR *dir);
int Gasketstat (const char *path, STAT_FIX *buf);
int Gasketstatfs (const char *path, struct statfs *buf);
int Gasketrename (const char *oldpath, const char *newpath);
time_t Gasketmktime (struct tm *tm);
int Gasketfsync (int fd);
int Gasketchmod (const char *path, mode_t mode);
int Gasketutime (const char *filename, const struct utimbuf *buf);
int Gaskettcflush (int fildes, int queue_selector);
EFI_STATUS GasketUgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);
void Gasketperror (__const char *__s);
void
EFIAPI
GasketmsSleep (unsigned long Milliseconds);
void
EFIAPI
Gasketexit (
int status
);
void
EFIAPI
GasketSetTimer (
UINT64 PeriodMs,
VOID (*CallBack)(UINT64 DeltaMs)
);
void
EFIAPI
GasketGetLocalTime (
EFI_TIME *Time
);
struct tm *
EFIAPI
Gasketgmtime (
const time_t *clock
);
long
EFIAPI
GasketGetTimeZone (
void
);
int
EFIAPI
GasketGetDayLight (
void
);
int
EFIAPI
Gasketpoll (
struct pollfd *pfd,
unsigned int nfds,
int timeout
);
long
EFIAPI
Gasketread (
int fd,
void *buf,
int count);
long
EFIAPI
Gasketwrite (
int fd,
const void *buf,
int count
);
char *
EFIAPI
Gasketgetenv (
const char *name
);
int
EFIAPI
Gasketopen (
const char *name,
int flags,
int mode
);
off_t
EFIAPI
Gasketlseek (
int fd,
off_t off,
int whence
);
int
EFIAPI
Gasketftruncate (
int fd,
long int len
);
int
EFIAPI
Gasketclose (
int fd
);
int
EFIAPI
Gasketmkdir (
const char *pathname,
mode_t mode
);
int
EFIAPI
Gasketrmdir (
const char *pathname
);
int
EFIAPI
Gasketunlink (
const char *pathname
);
int
EFIAPI
GasketGetErrno (
void
);
DIR *
EFIAPI
Gasketopendir (
const char *pathname
);
void
EFIAPI
Gasketrewinddir (
DIR *dir
);
struct dirent *
EFIAPI
Gasketreaddir (
DIR *dir
);
int
EFIAPI
Gasketclosedir (
DIR *dir
);
int
EFIAPI
Gasketstat (const char *path, STAT_FIX *buf);
int
EFIAPI
Gasketstatfs (const char *path, struct statfs *buf);
int
EFIAPI
Gasketrename (
const char *oldpath,
const char *newpath
);
time_t
EFIAPI
Gasketmktime (
struct tm *tm
);
int
EFIAPI
Gasketfsync (
int fd
);
int
EFIAPI
Gasketchmod (
const char *path,
mode_t mode
);
int
EFIAPI
Gasketutime (
const char *filename,
const struct utimbuf *buf
);
int
EFIAPI
Gaskettcflush (
int fildes,
int queue_selector
);
EFI_STATUS
EFIAPI
GasketUgaCreate (
struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
CONST CHAR16 *Title
);
void
EFIAPI
Gasketperror (
__const char *__s
);
//
// ... is always an int or pointer to device specific data structure
//
int Gasketioctl (int fd, unsigned long int __request, void *Arg);
int Gasketfcntl (int __fd, int __cmd, void *Arg);
int Gasketcfsetispeed (struct termios *__termios_p, speed_t __speed);
int Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed);
int Gaskettcgetattr (int __fd, struct termios *__termios_p);
int Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p);
int Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact);
int
EFIAPI
Gasketioctl (
int fd,
unsigned long int __request,
void *Arg
);
int
EFIAPI
Gasketfcntl (
int __fd,
int __cmd,
void *Arg
);
int
EFIAPI
Gasketcfsetispeed (
struct termios *__termios_p,
speed_t __speed
);
int
EFIAPI
Gasketcfsetospeed (
struct termios *__termios_p,
speed_t __speed
);
int
EFIAPI
Gaskettcgetattr (
int __fd,
struct termios *__termios_p
);
int
EFIAPI
Gaskettcsetattr (
int __fd,
int __optional_actions,
__const struct termios *__termios_p
);
int
EFIAPI
Gasketsigaction (
int sig,
const struct sigaction *act,
struct sigaction *oact
);
RETURN_STATUS
EFIAPI
GasketUnixPeCoffGetEntryPoint (
IN VOID *Pe32Data,
IN OUT VOID **EntryPoint
);
VOID
EFIAPI
GasketUnixPeCoffRelocateImageExtraAction (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
);
VOID
EFIAPI
GasketUnixPeCoffUnloadImageExtraAction (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
);
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 GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c);
UINTN GasketUintnUint16 (void *api, UINTN a, UINT16 b);
typedef void (*CALL_BACK) (UINT64 Delta);
UINTN
EFIAPI
GasketVoid (
void *api
);
UINTN ReverseGasketUint64 (CALL_BACK CallBack, UINT64 a);
UINTN
EFIAPI
GasketUintn (
void *api,
UINTN a
);
UINTN
EFIAPI
GasketUintnUintn (
void *api,
UINTN a,
UINTN b
);
UINTN
EFIAPI
GasketUintnUintnUintn (
void *api,
UINTN a,
UINTN b,
UINTN c
);
UINTN
EFIAPI
GasketUintnUintnUintnUintn (
void *api,
UINTN a,
UINTN b,
UINTN c,
UINTN d
);
UINTN
EFIAPI
GasketUintn10Args (
void *api,
UINTN a,
UINTN b,
UINTN c,
UINTN d,
UINTN e,
UINTN f,
UINTN g,
UINTN h,
UINTN i,
UINTN j
);
UINTN
EFIAPI
GasketUint64Uintn (
void *api,
UINT64 a,
UINTN b);
UINT64
EFIAPI
GasketUintnUint64Uintn (
void *api,
UINTN a,
UINT64 b,
UINTN c
);
UINTN
EFIAPI
GasketUintnUint16 (
void *api,
UINTN a,
UINT16 b
);
typedef
void
(*CALL_BACK) (
UINT64 Delta
);
UINTN
ReverseGasketUint64 (
CALL_BACK CallBack,
UINT64 a
);
//
// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL
//
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_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,
@ -124,26 +453,57 @@ EFI_STATUS EFIAPI GasketUgaBlt (
IN UINTN Delta OPTIONAL
);
EFI_STATUS UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title);
EFI_STATUS
EFIAPI
UgaCreate (
EFI_UNIX_UGA_IO_PROTOCOL **Uga,
CONST CHAR16 *Title
);
//
// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL
//
EFI_STATUS UgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
EFI_STATUS UgaSize(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);
EFI_STATUS UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
EFI_STATUS UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);
EFI_STATUS UgaBlt (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
IN EFI_UGA_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
EFI_STATUS
EFIAPI
UgaClose (
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo
);
EFI_STATUS
EFIAPI
UgaSize(
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
UINT32 Width,
UINT32 Height
);
EFI_STATUS
EFIAPI
UgaCheckKey(
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo
);
EFI_STATUS
EFIAPI
UgaGetKey (
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
EFI_INPUT_KEY *key
);
EFI_STATUS
EFIAPI
UgaBlt (
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
IN EFI_UGA_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
);

View File

@ -62,6 +62,7 @@ UINT64 mTimerPeriodMs;
VOID
EFIAPI
TimerCallback (UINT64 DeltaMs)
/*++