Add emulated serialIo device driver for EdkUnixPkg
[mirror_edk2.git] / EdkUnixPkg / Include / Protocol / UnixThunk.h
index aabb9b130dc2dd363851effd82518f91a7886e0a..1fa4e902048660db52f8bcad0acd818d1547e32d 100644 (file)
@@ -28,6 +28,7 @@ Abstract:
 #ifndef _UNIX_THUNK_H_\r
 #define _UNIX_THUNK_H_\r
 \r
+#include <sys/termios.h>\r
 
 #define EFI_UNIX_THUNK_PROTOCOL_GUID \\r
   { \\r
@@ -137,6 +138,43 @@ typedef
 EFI_STATUS
 (*UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
                 CONST CHAR16 *Title);
+\r
+typedef\r
+int\r
+(*UnixTcflush) (int fildes, int queue_selector);\r
+\r
+typedef\r
+void\r
+(*UnixPerror) (__const char *__s);\r
+\r
+typedef\r
+void\r
+(*UnixPrintf) (const char* format, ...);\r
+\r
+typedef \r
+int \r
+(*UnixIoCtl) (int fd, unsigned long int __request, ...);\r
+\r
+typedef \r
+int \r
+(*UnixFcntl) (int __fd, int __cmd, ...);\r
+\r
+typedef\r
+int \r
+(*UnixCfsetispeed) (struct termios *__termios_p, speed_t __speed);\r
+\r
+typedef \r
+int \r
+(*UnixCfsetospeed) (struct termios *__termios_p, speed_t __speed);\r
+\r
+typedef\r
+int \r
+(*UnixTcgetattr) (int __fd, struct termios *__termios_p);\r
+\r
+typedef \r
+int \r
+(*UnixTcsetattr) (int __fd, int __optional_actions,\r
+                     __const struct termios *__termios_p);\r
 
 //\r
 //\r
@@ -147,14 +185,14 @@ EFI_STATUS
 typedef struct _EFI_UNIX_THUNK_PROTOCOL {\r
   UINT64                              Signature;\r
 
-  UnixSleep                          Sleep;\r
+  UnixSleep                           Sleep;\r
   UnixExit                           Exit;\r
-  UnixSetTimer                       SetTimer;
-  UnixGetLocalTime                   GetLocalTime;
+  UnixSetTimer                        SetTimer;
+  UnixGetLocalTime                             GetLocalTime;
   UnixGmTime                          GmTime;
   UnixGetTimeZone                     GetTimeZone;
   UnixGetDayLight                     GetDayLight;
-  UnixPoll                           Poll;
+  UnixPoll                               Poll;
   UnixRead                           Read;
   UnixWrite                          Write;
   UnixGetenv                         Getenv;
@@ -177,9 +215,16 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
   UnixFSync                           FSync;
   UnixChmod                           Chmod;
   UnixUTime                           UTime;
-
-  UnixUgaCreate                              UgaCreate;
-
+  UnixTcflush                         Tcflush;
+  UnixUgaCreate                                          UgaCreate;
+  UnixPerror                          Perror;\r
+  UnixPrintf                          Printf;\r
+  UnixIoCtl                           IoCtl;\r
+  UnixFcntl                           Fcntl;\r
+  UnixCfsetispeed                     Cfsetispeed;\r
+  UnixCfsetospeed                     Cfsetospeed;\r
+  UnixTcgetattr                       Tcgetattr;\r
+  UnixTcsetattr                       Tcsetattr;\r
 } EFI_UNIX_THUNK_PROTOCOL;
 \r
 extern EFI_GUID gEfiUnixThunkProtocolGuid;\r