mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
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:
parent
a780c9424b
commit
124f761f02
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
|
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 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ Abstract:
|
|||||||
#else
|
#else
|
||||||
#include <termio.h>
|
#include <termio.h>
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
|
|
||||||
@ -79,21 +79,21 @@ Abstract:
|
|||||||
#if __DARWIN_64_BIT_INO_T
|
#if __DARWIN_64_BIT_INO_T
|
||||||
|
|
||||||
typedef struct stat_fix { \
|
typedef struct stat_fix { \
|
||||||
dev_t st_dev; /* [XSI] ID of device containing file */
|
dev_t st_dev; /* [XSI] ID of device containing file */
|
||||||
mode_t st_mode; /* [XSI] Mode of file (see below) */
|
mode_t st_mode; /* [XSI] Mode of file (see below) */
|
||||||
nlink_t st_nlink; /* [XSI] Number of hard links */
|
nlink_t st_nlink; /* [XSI] Number of hard links */
|
||||||
__darwin_ino64_t st_ino; /* [XSI] File serial number */
|
__darwin_ino64_t st_ino; /* [XSI] File serial number */
|
||||||
uid_t st_uid; /* [XSI] User ID of the file */
|
uid_t st_uid; /* [XSI] User ID of the file */
|
||||||
gid_t st_gid; /* [XSI] Group ID of the file */
|
gid_t st_gid; /* [XSI] Group ID of the file */
|
||||||
dev_t st_rdev; /* [XSI] Device ID */
|
dev_t st_rdev; /* [XSI] Device ID */
|
||||||
__DARWIN_STRUCT_STAT64_TIMES
|
__DARWIN_STRUCT_STAT64_TIMES
|
||||||
off_t st_size; /* [XSI] file size, in bytes */
|
off_t st_size; /* [XSI] file size, in bytes */
|
||||||
blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
|
blkcnt_t st_blocks; /* [XSI] blocks allocated for file */
|
||||||
blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
|
blksize_t st_blksize; /* [XSI] optimal blocksize for I/O */
|
||||||
__uint32_t st_flags; /* user defined flags for file */
|
__uint32_t st_flags; /* user defined flags for file */
|
||||||
__uint32_t st_gen; /* file generation number */
|
__uint32_t st_gen; /* file generation number */
|
||||||
__int32_t st_lspare; /* RESERVED: DO NOT USE! */
|
__int32_t st_lspare; /* RESERVED: DO NOT USE! */
|
||||||
__int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
|
__int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
|
||||||
} STAT_FIX;
|
} STAT_FIX;
|
||||||
|
|
||||||
#else /* !__DARWIN_64_BIT_INO_T */
|
#else /* !__DARWIN_64_BIT_INO_T */
|
||||||
@ -133,7 +133,7 @@ typedef struct stat_fix {
|
|||||||
#pragma pack(4)
|
#pragma pack(4)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
typedef struct stat STAT_FIX;
|
typedef struct stat STAT_FIX;
|
||||||
|
|
||||||
@ -146,192 +146,192 @@ typedef struct stat_fix {
|
|||||||
|
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(*UnixSleep) (
|
(EFIAPI *UnixSleep) (
|
||||||
unsigned long Milliseconds
|
unsigned long Milliseconds
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(*UnixExit) (
|
(EFIAPI *UnixExit) (
|
||||||
int status // exit code for all threads
|
int status // exit code for all threads
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(*UnixSetTimer) (
|
(EFIAPI *UnixSetTimer) (
|
||||||
UINT64 PeriodMs,
|
UINT64 PeriodMs,
|
||||||
VOID (*CallBack)(UINT64 DeltaMs)
|
VOID (EFIAPI *CallBack)(UINT64 DeltaMs)
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(*UnixGetLocalTime) (
|
(EFIAPI *UnixGetLocalTime) (
|
||||||
EFI_TIME *Time
|
EFI_TIME *Time
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
struct tm *
|
struct tm *
|
||||||
(*UnixGmTime)(
|
(EFIAPI *UnixGmTime)(
|
||||||
const time_t *timep
|
const time_t *timep
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
long
|
long
|
||||||
(*UnixGetTimeZone)(
|
(EFIAPI *UnixGetTimeZone)(
|
||||||
void
|
void
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixGetDayLight)(
|
(EFIAPI *UnixGetDayLight)(
|
||||||
void
|
void
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixPoll)(
|
(EFIAPI *UnixPoll)(
|
||||||
struct pollfd *pfd,
|
struct pollfd *pfd,
|
||||||
unsigned int nfds,
|
unsigned int nfds,
|
||||||
int timeout
|
int timeout
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
long
|
long
|
||||||
(*UnixRead) (
|
(EFIAPI *UnixRead) (
|
||||||
int fd,
|
int fd,
|
||||||
void *buf,
|
void *buf,
|
||||||
int count
|
int count
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
long
|
long
|
||||||
(*UnixWrite) (
|
(EFIAPI *UnixWrite) (
|
||||||
int fd,
|
int fd,
|
||||||
const void *buf,
|
const void *buf,
|
||||||
int count
|
int count
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
char *
|
char *
|
||||||
(*UnixGetenv) (const char *var);
|
(EFIAPI *UnixGetenv) (const char *var);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixOpen) (const char *name, int flags, int mode);
|
(EFIAPI *UnixOpen) (const char *name, int flags, int mode);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
off_t
|
off_t
|
||||||
(*UnixSeek) (int fd, off_t off, int whence);
|
(EFIAPI *UnixSeek) (int fd, off_t off, int whence);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixFtruncate) (int fd, long int len);
|
(EFIAPI *UnixFtruncate) (int fd, long int len);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixClose) (int fd);
|
(EFIAPI *UnixClose) (int fd);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixMkdir)(const char *pathname, mode_t mode);
|
(EFIAPI *UnixMkdir)(const char *pathname, mode_t mode);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixRmDir)(const char *pathname);
|
(EFIAPI *UnixRmDir)(const char *pathname);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixUnLink)(const char *pathname);
|
(EFIAPI *UnixUnLink)(const char *pathname);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixGetErrno)(VOID);
|
(EFIAPI *UnixGetErrno)(VOID);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
DIR *
|
DIR *
|
||||||
(*UnixOpenDir)(const char *pathname);
|
(EFIAPI *UnixOpenDir)(const char *pathname);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
void
|
void
|
||||||
(*UnixRewindDir)(DIR *dir);
|
(EFIAPI *UnixRewindDir)(DIR *dir);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
struct dirent *
|
struct dirent *
|
||||||
(*UnixReadDir)(DIR *dir);
|
(EFIAPI *UnixReadDir)(DIR *dir);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixCloseDir)(DIR *dir);
|
(EFIAPI *UnixCloseDir)(DIR *dir);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixStat)(const char *path, STAT_FIX *buf);
|
(EFIAPI *UnixStat)(const char *path, STAT_FIX *buf);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixStatFs)(const char *path, struct statfs *buf);
|
(EFIAPI *UnixStatFs)(const char *path, struct statfs *buf);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixRename)(const char *oldpath, const char *newpath);
|
(EFIAPI *UnixRename)(const char *oldpath, const char *newpath);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
time_t
|
time_t
|
||||||
(*UnixMkTime)(struct tm *tm);
|
(EFIAPI *UnixMkTime)(struct tm *tm);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixFSync)(int fd);
|
(EFIAPI *UnixFSync)(int fd);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixChmod)(const char *path, mode_t mode);
|
(EFIAPI *UnixChmod)(const char *path, mode_t mode);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixUTime)(const char *filename, const struct utimbuf *buf);
|
(EFIAPI *UnixUTime)(const char *filename, const struct utimbuf *buf);
|
||||||
|
|
||||||
struct _EFI_UNIX_UGA_IO_PROTOCOL;
|
struct _EFI_UNIX_UGA_IO_PROTOCOL;
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
(*UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
|
(EFIAPI *UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
|
||||||
CONST CHAR16 *Title);
|
CONST CHAR16 *Title);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixTcflush) (int fildes, int queue_selector);
|
(EFIAPI *UnixTcflush) (int fildes, int queue_selector);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
void
|
void
|
||||||
(*UnixPerror) (__const char *__s);
|
(EFIAPI *UnixPerror) (__const char *__s);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
#if __CYGWIN__
|
#if __CYGWIN__
|
||||||
(*UnixIoCtl) (int fd, int __request, UINTN Arg);
|
(EFIAPI *UnixIoCtl) (int fd, int __request, UINTN Arg);
|
||||||
#else
|
#else
|
||||||
(*UnixIoCtl) (int fd, unsigned long int __request, void *Arg);
|
(EFIAPI *UnixIoCtl) (int fd, unsigned long int __request, void *Arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixFcntl) (int __fd, int __cmd, void *Arg);
|
(EFIAPI *UnixFcntl) (int __fd, int __cmd, void *Arg);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
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);
|
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixTcgetattr) (int __fd, struct termios *__termios_p);
|
(EFIAPI *UnixCfsetospeed) (struct termios *__termios_p, speed_t __speed);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
int
|
int
|
||||||
(*UnixTcsetattr) (int __fd, int __optional_actions,
|
(EFIAPI *UnixTcgetattr) (int __fd, struct termios *__termios_p);
|
||||||
|
|
||||||
|
typedef
|
||||||
|
int
|
||||||
|
(EFIAPI *UnixTcsetattr) (int __fd, int __optional_actions,
|
||||||
__const struct termios *__termios_p);
|
__const struct termios *__termios_p);
|
||||||
|
|
||||||
|
|
||||||
@ -339,20 +339,20 @@ int
|
|||||||
// Worker functions to enable source level debug in the emulator
|
// Worker functions to enable source level debug in the emulator
|
||||||
//
|
//
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
(EFIAPI *UnixPeCoffGetEntryPoint) (
|
(EFIAPI *UnixPeCoffGetEntryPoint) (
|
||||||
IN VOID *Pe32Data,
|
IN VOID *Pe32Data,
|
||||||
IN OUT VOID **EntryPoint
|
IN OUT VOID **EntryPoint
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(EFIAPI *UnixPeCoffRelocateImageExtraAction) (
|
(EFIAPI *UnixPeCoffRelocateImageExtraAction) (
|
||||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(EFIAPI *UnixPeCoffLoaderUnloadImageExtraAction) (
|
(EFIAPI *UnixPeCoffLoaderUnloadImageExtraAction) (
|
||||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||||
@ -407,8 +407,8 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
|
|||||||
UnixPeCoffGetEntryPoint PeCoffGetEntryPoint;
|
UnixPeCoffGetEntryPoint PeCoffGetEntryPoint;
|
||||||
UnixPeCoffRelocateImageExtraAction PeCoffRelocateImageExtraAction;
|
UnixPeCoffRelocateImageExtraAction PeCoffRelocateImageExtraAction;
|
||||||
UnixPeCoffLoaderUnloadImageExtraAction PeCoffUnloadImageExtraAction;
|
UnixPeCoffLoaderUnloadImageExtraAction PeCoffUnloadImageExtraAction;
|
||||||
|
|
||||||
|
|
||||||
} EFI_UNIX_THUNK_PROTOCOL;
|
} EFI_UNIX_THUNK_PROTOCOL;
|
||||||
|
|
||||||
extern EFI_GUID gEfiUnixThunkProtocolGuid;
|
extern EFI_GUID gEfiUnixThunkProtocolGuid;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ Module Name:
|
|||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Unix Library
|
Unix Library
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
#include "PiDxe.h"
|
#include "PiDxe.h"
|
||||||
@ -27,6 +27,7 @@ Abstract:
|
|||||||
EFI_UNIX_THUNK_PROTOCOL *gUnix;
|
EFI_UNIX_THUNK_PROTOCOL *gUnix;
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
UnixLibConstructor (
|
UnixLibConstructor (
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -109,6 +109,7 @@ extern EFI_HII_HANDLE mHiiHandle;
|
|||||||
// Prototypes
|
// Prototypes
|
||||||
//
|
//
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
MiscSubclassDriverEntryPoint (
|
MiscSubclassDriverEntryPoint (
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -26,92 +26,421 @@
|
|||||||
// Gasket functions for EFI_UNIX_THUNK_PROTOCOL
|
// Gasket functions for EFI_UNIX_THUNK_PROTOCOL
|
||||||
//
|
//
|
||||||
|
|
||||||
void GasketmsSleep (unsigned long Milliseconds);
|
void
|
||||||
void Gasketexit (int status);
|
EFIAPI
|
||||||
void GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));
|
GasketmsSleep (unsigned long Milliseconds);
|
||||||
void GasketGetLocalTime (EFI_TIME *Time);
|
|
||||||
struct tm *Gasketgmtime (const time_t *clock);
|
void
|
||||||
long GasketGetTimeZone (void);
|
EFIAPI
|
||||||
int GasketGetDayLight (void);
|
Gasketexit (
|
||||||
int Gasketpoll (struct pollfd *pfd, unsigned int nfds, int timeout);
|
int status
|
||||||
long Gasketread (int fd, void *buf, int count);
|
);
|
||||||
long Gasketwrite (int fd, const void *buf, int count);
|
|
||||||
char *Gasketgetenv (const char *name);
|
void
|
||||||
int Gasketopen (const char *name, int flags, int mode);
|
EFIAPI
|
||||||
off_t Gasketlseek (int fd, off_t off, int whence);
|
GasketSetTimer (
|
||||||
int Gasketftruncate (int fd, long int len);
|
UINT64 PeriodMs,
|
||||||
int Gasketclose (int fd);
|
VOID (*CallBack)(UINT64 DeltaMs)
|
||||||
int Gasketmkdir (const char *pathname, mode_t mode);
|
);
|
||||||
int Gasketrmdir (const char *pathname);
|
|
||||||
int Gasketunlink (const char *pathname);
|
void
|
||||||
int GasketGetErrno (void);
|
EFIAPI
|
||||||
DIR *Gasketopendir (const char *pathname);
|
GasketGetLocalTime (
|
||||||
void Gasketrewinddir (DIR *dir);
|
EFI_TIME *Time
|
||||||
struct dirent *Gasketreaddir (DIR *dir);
|
);
|
||||||
int Gasketclosedir (DIR *dir);
|
|
||||||
int Gasketstat (const char *path, STAT_FIX *buf);
|
struct tm *
|
||||||
int Gasketstatfs (const char *path, struct statfs *buf);
|
EFIAPI
|
||||||
int Gasketrename (const char *oldpath, const char *newpath);
|
Gasketgmtime (
|
||||||
time_t Gasketmktime (struct tm *tm);
|
const time_t *clock
|
||||||
int Gasketfsync (int fd);
|
);
|
||||||
int Gasketchmod (const char *path, mode_t mode);
|
|
||||||
int Gasketutime (const char *filename, const struct utimbuf *buf);
|
long
|
||||||
int Gaskettcflush (int fildes, int queue_selector);
|
EFIAPI
|
||||||
EFI_STATUS GasketUgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);
|
GasketGetTimeZone (
|
||||||
void Gasketperror (__const char *__s);
|
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
|
// ... 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
|
||||||
int Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed);
|
EFIAPI
|
||||||
int Gaskettcgetattr (int __fd, struct termios *__termios_p);
|
Gasketioctl (
|
||||||
int Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p);
|
int fd,
|
||||||
int Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact);
|
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
|
RETURN_STATUS
|
||||||
|
EFIAPI
|
||||||
GasketUnixPeCoffGetEntryPoint (
|
GasketUnixPeCoffGetEntryPoint (
|
||||||
IN VOID *Pe32Data,
|
IN VOID *Pe32Data,
|
||||||
IN OUT VOID **EntryPoint
|
IN OUT VOID **EntryPoint
|
||||||
);
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
EFIAPI
|
||||||
GasketUnixPeCoffRelocateImageExtraAction (
|
GasketUnixPeCoffRelocateImageExtraAction (
|
||||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||||
);
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
EFIAPI
|
||||||
GasketUnixPeCoffUnloadImageExtraAction (
|
GasketUnixPeCoffUnloadImageExtraAction (
|
||||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
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 ReverseGasketUint64 (CALL_BACK CallBack, UINT64 a);
|
UINTN
|
||||||
|
EFIAPI
|
||||||
|
GasketVoid (
|
||||||
|
void *api
|
||||||
|
);
|
||||||
|
|
||||||
|
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
|
// 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
|
||||||
EFI_STATUS EFIAPI GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
|
EFIAPI
|
||||||
EFI_STATUS EFIAPI GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);
|
GasketUgaClose (
|
||||||
EFI_STATUS EFIAPI GasketUgaBlt (
|
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,
|
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
|
||||||
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
|
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
|
||||||
IN EFI_UGA_BLT_OPERATION BltOperation,
|
IN EFI_UGA_BLT_OPERATION BltOperation,
|
||||||
@ -124,26 +453,57 @@ EFI_STATUS EFIAPI GasketUgaBlt (
|
|||||||
IN UINTN Delta OPTIONAL
|
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
|
// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL
|
||||||
//
|
//
|
||||||
EFI_STATUS UgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
|
EFI_STATUS
|
||||||
EFI_STATUS UgaSize(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);
|
EFIAPI
|
||||||
EFI_STATUS UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);
|
UgaClose (
|
||||||
EFI_STATUS UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);
|
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo
|
||||||
EFI_STATUS UgaBlt (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
|
);
|
||||||
IN EFI_UGA_PIXEL *BltBuffer OPTIONAL,
|
|
||||||
IN EFI_UGA_BLT_OPERATION BltOperation,
|
EFI_STATUS
|
||||||
IN UINTN SourceX,
|
EFIAPI
|
||||||
IN UINTN SourceY,
|
UgaSize(
|
||||||
IN UINTN DestinationX,
|
EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,
|
||||||
IN UINTN DestinationY,
|
UINT32 Width,
|
||||||
IN UINTN Width,
|
UINT32 Height
|
||||||
IN UINTN Height,
|
);
|
||||||
IN UINTN Delta OPTIONAL
|
|
||||||
|
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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ Abstract:
|
|||||||
UNIX Emulation Timer Architectural Protocol Driver as defined in DXE CIS
|
UNIX Emulation Timer Architectural Protocol Driver as defined in DXE CIS
|
||||||
|
|
||||||
This Timer module uses an UNIX Thread to simulate the timer-tick driven
|
This Timer module uses an UNIX Thread to simulate the timer-tick driven
|
||||||
timer service. In the future, the Thread creation should possibly be
|
timer service. In the future, the Thread creation should possibly be
|
||||||
abstracted by the CPU architectural protocol
|
abstracted by the CPU architectural protocol
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
@ -62,6 +62,7 @@ UINT64 mTimerPeriodMs;
|
|||||||
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
EFIAPI
|
||||||
TimerCallback (UINT64 DeltaMs)
|
TimerCallback (UINT64 DeltaMs)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
@ -115,38 +116,38 @@ UnixTimerDriverRegisterHandler (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function registers the handler NotifyFunction so it is called every time
|
This function registers the handler NotifyFunction so it is called every time
|
||||||
the timer interrupt fires. It also passes the amount of time since the last
|
the timer interrupt fires. It also passes the amount of time since the last
|
||||||
handler call to the NotifyFunction. If NotifyFunction is NULL, then the
|
handler call to the NotifyFunction. If NotifyFunction is NULL, then the
|
||||||
handler is unregistered. If the handler is registered, then EFI_SUCCESS is
|
handler is unregistered. If the handler is registered, then EFI_SUCCESS is
|
||||||
returned. If the CPU does not support registering a timer interrupt handler,
|
returned. If the CPU does not support registering a timer interrupt handler,
|
||||||
then EFI_UNSUPPORTED is returned. If an attempt is made to register a handler
|
then EFI_UNSUPPORTED is returned. If an attempt is made to register a handler
|
||||||
when a handler is already registered, then EFI_ALREADY_STARTED is returned.
|
when a handler is already registered, then EFI_ALREADY_STARTED is returned.
|
||||||
If an attempt is made to unregister a handler when a handler is not registered,
|
If an attempt is made to unregister a handler when a handler is not registered,
|
||||||
then EFI_INVALID_PARAMETER is returned. If an error occurs attempting to
|
then EFI_INVALID_PARAMETER is returned. If an error occurs attempting to
|
||||||
register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR
|
register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR
|
||||||
is returned.
|
is returned.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||||
|
|
||||||
NotifyFunction - The function to call when a timer interrupt fires. This
|
NotifyFunction - The function to call when a timer interrupt fires. This
|
||||||
function executes at TPL_HIGH_LEVEL. The DXE Core will
|
function executes at TPL_HIGH_LEVEL. The DXE Core will
|
||||||
register a handler for the timer interrupt, so it can know
|
register a handler for the timer interrupt, so it can know
|
||||||
how much time has passed. This information is used to
|
how much time has passed. This information is used to
|
||||||
signal timer based events. NULL will unregister the handler.
|
signal timer based events. NULL will unregister the handler.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The timer handler was registered.
|
EFI_SUCCESS - The timer handler was registered.
|
||||||
|
|
||||||
EFI_UNSUPPORTED - The platform does not support timer interrupts.
|
EFI_UNSUPPORTED - The platform does not support timer interrupts.
|
||||||
|
|
||||||
EFI_ALREADY_STARTED - NotifyFunction is not NULL, and a handler is already
|
EFI_ALREADY_STARTED - NotifyFunction is not NULL, and a handler is already
|
||||||
registered.
|
registered.
|
||||||
|
|
||||||
EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not
|
EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not
|
||||||
previously registered.
|
previously registered.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR - The timer handler could not be registered.
|
EFI_DEVICE_ERROR - The timer handler could not be registered.
|
||||||
@ -186,30 +187,30 @@ UnixTimerDriverSetTimerPeriod (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function adjusts the period of timer interrupts to the value specified
|
This function adjusts the period of timer interrupts to the value specified
|
||||||
by TimerPeriod. If the timer period is updated, then the selected timer
|
by TimerPeriod. If the timer period is updated, then the selected timer
|
||||||
period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned. If
|
period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned. If
|
||||||
the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.
|
the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.
|
||||||
If an error occurs while attempting to update the timer period, then the
|
If an error occurs while attempting to update the timer period, then the
|
||||||
timer hardware will be put back in its state prior to this call, and
|
timer hardware will be put back in its state prior to this call, and
|
||||||
EFI_DEVICE_ERROR is returned. If TimerPeriod is 0, then the timer interrupt
|
EFI_DEVICE_ERROR is returned. If TimerPeriod is 0, then the timer interrupt
|
||||||
is disabled. This is not the same as disabling the CPU's interrupts.
|
is disabled. This is not the same as disabling the CPU's interrupts.
|
||||||
Instead, it must either turn off the timer hardware, or it must adjust the
|
Instead, it must either turn off the timer hardware, or it must adjust the
|
||||||
interrupt controller so that a CPU interrupt is not generated when the timer
|
interrupt controller so that a CPU interrupt is not generated when the timer
|
||||||
interrupt fires.
|
interrupt fires.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||||
|
|
||||||
TimerPeriod - The rate to program the timer interrupt in 100 nS units. If
|
TimerPeriod - The rate to program the timer interrupt in 100 nS units. If
|
||||||
the timer hardware is not programmable, then EFI_UNSUPPORTED is
|
the timer hardware is not programmable, then EFI_UNSUPPORTED is
|
||||||
returned. If the timer is programmable, then the timer period
|
returned. If the timer is programmable, then the timer period
|
||||||
will be rounded up to the nearest timer period that is supported
|
will be rounded up to the nearest timer period that is supported
|
||||||
by the timer hardware. If TimerPeriod is set to 0, then the
|
by the timer hardware. If TimerPeriod is set to 0, then the
|
||||||
timer interrupts will be disabled.
|
timer interrupts will be disabled.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The timer period was changed.
|
EFI_SUCCESS - The timer period was changed.
|
||||||
|
|
||||||
@ -245,19 +246,19 @@ UnixTimerDriverGetTimerPeriod (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function retrieves the period of timer interrupts in 100 ns units,
|
This function retrieves the period of timer interrupts in 100 ns units,
|
||||||
returns that value in TimerPeriod, and returns EFI_SUCCESS. If TimerPeriod
|
returns that value in TimerPeriod, and returns EFI_SUCCESS. If TimerPeriod
|
||||||
is NULL, then EFI_INVALID_PARAMETER is returned. If a TimerPeriod of 0 is
|
is NULL, then EFI_INVALID_PARAMETER is returned. If a TimerPeriod of 0 is
|
||||||
returned, then the timer is currently disabled.
|
returned, then the timer is currently disabled.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||||
|
|
||||||
TimerPeriod - A pointer to the timer period to retrieve in 100 ns units. If
|
TimerPeriod - A pointer to the timer period to retrieve in 100 ns units. If
|
||||||
0 is returned, then the timer is currently disabled.
|
0 is returned, then the timer is currently disabled.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The timer period was returned in TimerPeriod.
|
EFI_SUCCESS - The timer period was returned in TimerPeriod.
|
||||||
|
|
||||||
@ -283,19 +284,19 @@ UnixTimerDriverGenerateSoftInterrupt (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
This function generates a soft timer interrupt. If the platform does not support soft
|
This function generates a soft timer interrupt. If the platform does not support soft
|
||||||
timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned.
|
timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned.
|
||||||
If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler()
|
If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler()
|
||||||
service, then a soft timer interrupt will be generated. If the timer interrupt is
|
service, then a soft timer interrupt will be generated. If the timer interrupt is
|
||||||
enabled when this service is called, then the registered handler will be invoked. The
|
enabled when this service is called, then the registered handler will be invoked. The
|
||||||
registered handler should not be able to distinguish a hardware-generated timer
|
registered handler should not be able to distinguish a hardware-generated timer
|
||||||
interrupt from a software-generated timer interrupt.
|
interrupt from a software-generated timer interrupt.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
This - The EFI_TIMER_ARCH_PROTOCOL instance.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - The soft timer interrupt was generated.
|
EFI_SUCCESS - The soft timer interrupt was generated.
|
||||||
|
|
||||||
@ -329,7 +330,7 @@ Returns:
|
|||||||
EFI_SUCCESS - Timer Architectural Protocol created
|
EFI_SUCCESS - Timer Architectural Protocol created
|
||||||
|
|
||||||
EFI_OUT_OF_RESOURCES - Not enough resources available to initialize driver.
|
EFI_OUT_OF_RESOURCES - Not enough resources available to initialize driver.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR - A device error occured attempting to initialize the driver.
|
EFI_DEVICE_ERROR - A device error occured attempting to initialize the driver.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user