]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Renamed to match filename naming recommendations.
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 17 Mar 2008 21:15:31 +0000 (21:15 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 17 Mar 2008 21:15:31 +0000 (21:15 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4872 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIO/SerialIo.c [deleted file]
EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIO/SerialIo.h [deleted file]
EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIo/SerialIo.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIo/SerialIo.h [new file with mode: 0644]

diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIO/SerialIo.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIO/SerialIo.c
deleted file mode 100644 (file)
index c77072a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2004, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-  \r
-    SerialIo.c\r
-\r
-Abstract:\r
-\r
-  Serial IO protocol as defined in the EFI 1.0 specification.\r
-\r
-  Abstraction of a basic serial device. Targeted at 16550 UART, but\r
-  could be much more generic.\r
-\r
---*/\r
-\r
-#include "EfiSpec.h"\r
-#include EFI_PROTOCOL_DEFINITION (SerialIo)\r
-\r
-EFI_GUID  gEfiSerialIoProtocolGuid = EFI_SERIAL_IO_PROTOCOL_GUID;\r
-\r
-EFI_GUID_STRING(&gEfiSerialIoProtocolGuid, "SerialIo Protocol", "EFI 1.0 Serial IO Protocol");\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIO/SerialIo.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIO/SerialIo.h
deleted file mode 100644 (file)
index 54a653a..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2004, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-\r
-  SerialIo.h\r
-\r
-Abstract:\r
-\r
-  Serial IO protocol as defined in the EFI 1.0 specification.\r
-\r
-  Abstraction of a basic serial device. Targeted at 16550 UART, but\r
-  could be much more generic.\r
-\r
---*/\r
-\r
-#ifndef _SERIAL_IO_H_\r
-#define _SERIAL_IO_H_\r
-\r
-#define EFI_SERIAL_IO_PROTOCOL_GUID \\r
-  { \\r
-    0xBB25CF6F, 0xF1D4, 0x11D2, 0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD \\r
-  }\r
-\r
-EFI_FORWARD_DECLARATION (EFI_SERIAL_IO_PROTOCOL);\r
-\r
-//\r
-// Serial IO Data structures\r
-//\r
-typedef enum {\r
-  DefaultParity,\r
-  NoParity,\r
-  EvenParity,\r
-  OddParity,\r
-  MarkParity,\r
-  SpaceParity\r
-} EFI_PARITY_TYPE;\r
-\r
-typedef enum {\r
-  DefaultStopBits,\r
-  OneStopBit,\r
-  OneFiveStopBits,\r
-  TwoStopBits\r
-} EFI_STOP_BITS_TYPE;\r
-\r
-//\r
-// define for Control bits, grouped by read only, write only, and read write\r
-//\r
-//\r
-// Read Only\r
-//\r
-#define EFI_SERIAL_CLEAR_TO_SEND        0x00000010\r
-#define EFI_SERIAL_DATA_SET_READY       0x00000020\r
-#define EFI_SERIAL_RING_INDICATE        0x00000040\r
-#define EFI_SERIAL_CARRIER_DETECT       0x00000080\r
-#define EFI_SERIAL_INPUT_BUFFER_EMPTY   0x00000100\r
-#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY  0x00000200\r
-\r
-//\r
-// Write Only\r
-//\r
-#define EFI_SERIAL_REQUEST_TO_SEND      0x00000002\r
-#define EFI_SERIAL_DATA_TERMINAL_READY  0x00000001\r
-\r
-//\r
-// Read Write\r
-//\r
-#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE     0x00001000\r
-#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE     0x00002000\r
-#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000\r
-\r
-//\r
-// Serial IO Member Functions\r
-//\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SERIAL_RESET) (\r
-  IN EFI_SERIAL_IO_PROTOCOL * This\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Reset the serial device.\r
-\r
-  Arguments:\r
-    This     - Protocol instance pointer.\r
-\r
-  Returns:\r
-    EFI_SUCCESS      - The device was reset.\r
-    EFI_DEVICE_ERROR - The serial device could not be reset.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (\r
-  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
-  IN UINT64                         BaudRate,\r
-  IN UINT32                         ReceiveFifoDepth,\r
-  IN UINT32                         Timeout,\r
-  IN EFI_PARITY_TYPE                Parity,\r
-  IN UINT8                          DataBits,\r
-  IN EFI_STOP_BITS_TYPE             StopBits\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Sets the baud rate, receive FIFO depth, transmit/receice time out, parity, \r
-    data buts, and stop bits on a serial device.\r
-\r
-  Arguments:\r
-    This     - Protocol instance pointer.\r
-    BaudRate - The requested baud rate. A BaudRate value of 0 will use the the\r
-                device's default interface speed.\r
-    ReveiveFifoDepth - The requested depth of the FIFO on the receive side of the\r
-                       serial interface. A ReceiveFifoDepth value of 0 will use \r
-                       the device's dfault FIFO depth.\r
-    Timeout - The requested time out for a single character in microseconds. \r
-              This timeout applies to both the transmit and receive side of the\r
-              interface. A Timeout value of 0 will use the device's default time\r
-              out value.\r
-    Parity  - The type of parity to use on this serial device. A Parity value of\r
-               DefaultParity will use the device's default parity value. \r
-    DataBits - The number of data bits to use on the serial device. A DataBits\r
-                vaule of 0 will use the device's default data bit setting.\r
-    StopBits - The number of stop bits to use on this serial device. A StopBits\r
-                value of DefaultStopBits will use the device's default number of\r
-                stop bits. \r
-\r
-  Returns:\r
-    EFI_SUCCESS      - The device was reset.\r
-    EFI_DEVICE_ERROR - The serial device could not be reset.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (\r
-  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
-  IN UINT32                         Control\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Set the control bits on a serial device\r
-\r
-  Arguments:\r
-    This    - Protocol instance pointer.\r
-    Control - Set the bits of Control that are settable.\r
-\r
-  Returns:\r
-    EFI_SUCCESS      - The new control bits were set on the serial device.\r
-    EFI_UNSUPPORTED  - The serial device does not support this operation.\r
-    EFI_DEVICE_ERROR - The serial device is not functioning correctly.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (\r
-  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
-  OUT UINT32                        *Control\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves the status of thecontrol bits on a serial device\r
-\r
-  Arguments:\r
-    This    - Protocol instance pointer.\r
-    Control - A pointer to return the current Control signals from the serial\r
-               device.\r
-\r
-  Returns:\r
-    EFI_SUCCESS      - The control bits were read from the serial device.\r
-    EFI_DEVICE_ERROR - The serial device is not functioning correctly.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SERIAL_WRITE) (\r
-  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
-  IN OUT UINTN                      *BufferSize,\r
-  IN VOID                           *Buffer\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Writes data to a serial device.\r
-\r
-  Arguments:\r
-    This    - Protocol instance pointer.\r
-    BufferSize - On input, the size of the Buffer. On output, the amount of \r
-                  data actually written.\r
-    Buffer - The buffer of data to write\r
-\r
-  Returns:\r
-    EFI_SUCCESS      - The data was written.\r
-    EFI_DEVICE_ERROR - The device reported an error.\r
-    EFI_TIMEOUT      - The data write was stopped due to a timeout.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SERIAL_READ) (\r
-  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
-  IN OUT UINTN                      *BufferSize,\r
-  OUT VOID                          *Buffer\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Writes data to a serial device.\r
-\r
-  Arguments:\r
-    This    - Protocol instance pointer.\r
-    BufferSize - On input, the size of the Buffer. On output, the amount of \r
-                  data returned in Buffer.\r
-    Buffer - The buffer to return the data into.\r
-\r
-  Returns:\r
-    EFI_SUCCESS      - The data was read.\r
-    EFI_DEVICE_ERROR - The device reported an error.\r
-    EFI_TIMEOUT      - The data write was stopped due to a timeout.\r
-\r
---*/\r
-;\r
-\r
-/*++\r
-\r
-  The data values in SERIAL_IO_MODE are read-only and are updated by the code \r
-  that produces the SERIAL_IO_PROTOCOL member functions.\r
-\r
-  ControlMask - A mask fo the Control bits that the device supports. The device\r
-                 must always support the Input Buffer Empty control bit.\r
-  TimeOut  - If applicable, the number of microseconds to wait before timing out\r
-              a Read or Write operation.\r
-  BaudRate - If applicable, the current baud rate setting of the device; otherwise,\r
-              baud rate has the value of zero to indicate that device runs at the\r
-              device's designed speed.\r
-  ReceiveFifoDepth - The number of characters the device will buffer on input\r
-  DataBits - The number of characters the device will buffer on input\r
-  Parity   - If applicable, this is the EFI_PARITY_TYPE that is computed or \r
-             checked as each character is transmitted or reveived. If the device\r
-             does not support parity the value is the default parity value.\r
-  StopBits - If applicable, the EFI_STOP_BITS_TYPE number of stop bits per\r
-              character. If the device does not support stop bits the value is\r
-              the default stop bit values.\r
-\r
---*/\r
-typedef struct {\r
-  UINT32  ControlMask;\r
-\r
-  //\r
-  // current Attributes\r
-  //\r
-  UINT32  Timeout;\r
-  UINT64  BaudRate;\r
-  UINT32  ReceiveFifoDepth;\r
-  UINT32  DataBits;\r
-  UINT32  Parity;\r
-  UINT32  StopBits;\r
-} EFI_SERIAL_IO_MODE;\r
-\r
-#define SERIAL_IO_INTERFACE_REVISION  0x00010000\r
-\r
-typedef struct _EFI_SERIAL_IO_PROTOCOL {\r
-  UINT32                      Revision;\r
-  EFI_SERIAL_RESET            Reset;\r
-  EFI_SERIAL_SET_ATTRIBUTES   SetAttributes;\r
-  EFI_SERIAL_SET_CONTROL_BITS SetControl;\r
-  EFI_SERIAL_GET_CONTROL_BITS GetControl;\r
-  EFI_SERIAL_WRITE            Write;\r
-  EFI_SERIAL_READ             Read;\r
-\r
-  EFI_SERIAL_IO_MODE          *Mode;\r
-} EFI_SERIAL_IO_PROTOCOL;\r
-\r
-extern EFI_GUID gEfiSerialIoProtocolGuid;\r
-\r
-#endif\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIo/SerialIo.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIo/SerialIo.c
new file mode 100644 (file)
index 0000000..c77072a
--- /dev/null
@@ -0,0 +1,30 @@
+/*++\r
+\r
+Copyright (c) 2004, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+  \r
+    SerialIo.c\r
+\r
+Abstract:\r
+\r
+  Serial IO protocol as defined in the EFI 1.0 specification.\r
+\r
+  Abstraction of a basic serial device. Targeted at 16550 UART, but\r
+  could be much more generic.\r
+\r
+--*/\r
+\r
+#include "EfiSpec.h"\r
+#include EFI_PROTOCOL_DEFINITION (SerialIo)\r
+\r
+EFI_GUID  gEfiSerialIoProtocolGuid = EFI_SERIAL_IO_PROTOCOL_GUID;\r
+\r
+EFI_GUID_STRING(&gEfiSerialIoProtocolGuid, "SerialIo Protocol", "EFI 1.0 Serial IO Protocol");\r
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIo/SerialIo.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SerialIo/SerialIo.h
new file mode 100644 (file)
index 0000000..54a653a
--- /dev/null
@@ -0,0 +1,296 @@
+/*++\r
+\r
+Copyright (c) 2004, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  SerialIo.h\r
+\r
+Abstract:\r
+\r
+  Serial IO protocol as defined in the EFI 1.0 specification.\r
+\r
+  Abstraction of a basic serial device. Targeted at 16550 UART, but\r
+  could be much more generic.\r
+\r
+--*/\r
+\r
+#ifndef _SERIAL_IO_H_\r
+#define _SERIAL_IO_H_\r
+\r
+#define EFI_SERIAL_IO_PROTOCOL_GUID \\r
+  { \\r
+    0xBB25CF6F, 0xF1D4, 0x11D2, 0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD \\r
+  }\r
+\r
+EFI_FORWARD_DECLARATION (EFI_SERIAL_IO_PROTOCOL);\r
+\r
+//\r
+// Serial IO Data structures\r
+//\r
+typedef enum {\r
+  DefaultParity,\r
+  NoParity,\r
+  EvenParity,\r
+  OddParity,\r
+  MarkParity,\r
+  SpaceParity\r
+} EFI_PARITY_TYPE;\r
+\r
+typedef enum {\r
+  DefaultStopBits,\r
+  OneStopBit,\r
+  OneFiveStopBits,\r
+  TwoStopBits\r
+} EFI_STOP_BITS_TYPE;\r
+\r
+//\r
+// define for Control bits, grouped by read only, write only, and read write\r
+//\r
+//\r
+// Read Only\r
+//\r
+#define EFI_SERIAL_CLEAR_TO_SEND        0x00000010\r
+#define EFI_SERIAL_DATA_SET_READY       0x00000020\r
+#define EFI_SERIAL_RING_INDICATE        0x00000040\r
+#define EFI_SERIAL_CARRIER_DETECT       0x00000080\r
+#define EFI_SERIAL_INPUT_BUFFER_EMPTY   0x00000100\r
+#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY  0x00000200\r
+\r
+//\r
+// Write Only\r
+//\r
+#define EFI_SERIAL_REQUEST_TO_SEND      0x00000002\r
+#define EFI_SERIAL_DATA_TERMINAL_READY  0x00000001\r
+\r
+//\r
+// Read Write\r
+//\r
+#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE     0x00001000\r
+#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE     0x00002000\r
+#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000\r
+\r
+//\r
+// Serial IO Member Functions\r
+//\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SERIAL_RESET) (\r
+  IN EFI_SERIAL_IO_PROTOCOL * This\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Reset the serial device.\r
+\r
+  Arguments:\r
+    This     - Protocol instance pointer.\r
+\r
+  Returns:\r
+    EFI_SUCCESS      - The device was reset.\r
+    EFI_DEVICE_ERROR - The serial device could not be reset.\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (\r
+  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
+  IN UINT64                         BaudRate,\r
+  IN UINT32                         ReceiveFifoDepth,\r
+  IN UINT32                         Timeout,\r
+  IN EFI_PARITY_TYPE                Parity,\r
+  IN UINT8                          DataBits,\r
+  IN EFI_STOP_BITS_TYPE             StopBits\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Sets the baud rate, receive FIFO depth, transmit/receice time out, parity, \r
+    data buts, and stop bits on a serial device.\r
+\r
+  Arguments:\r
+    This     - Protocol instance pointer.\r
+    BaudRate - The requested baud rate. A BaudRate value of 0 will use the the\r
+                device's default interface speed.\r
+    ReveiveFifoDepth - The requested depth of the FIFO on the receive side of the\r
+                       serial interface. A ReceiveFifoDepth value of 0 will use \r
+                       the device's dfault FIFO depth.\r
+    Timeout - The requested time out for a single character in microseconds. \r
+              This timeout applies to both the transmit and receive side of the\r
+              interface. A Timeout value of 0 will use the device's default time\r
+              out value.\r
+    Parity  - The type of parity to use on this serial device. A Parity value of\r
+               DefaultParity will use the device's default parity value. \r
+    DataBits - The number of data bits to use on the serial device. A DataBits\r
+                vaule of 0 will use the device's default data bit setting.\r
+    StopBits - The number of stop bits to use on this serial device. A StopBits\r
+                value of DefaultStopBits will use the device's default number of\r
+                stop bits. \r
+\r
+  Returns:\r
+    EFI_SUCCESS      - The device was reset.\r
+    EFI_DEVICE_ERROR - The serial device could not be reset.\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (\r
+  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
+  IN UINT32                         Control\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Set the control bits on a serial device\r
+\r
+  Arguments:\r
+    This    - Protocol instance pointer.\r
+    Control - Set the bits of Control that are settable.\r
+\r
+  Returns:\r
+    EFI_SUCCESS      - The new control bits were set on the serial device.\r
+    EFI_UNSUPPORTED  - The serial device does not support this operation.\r
+    EFI_DEVICE_ERROR - The serial device is not functioning correctly.\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (\r
+  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
+  OUT UINT32                        *Control\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Retrieves the status of thecontrol bits on a serial device\r
+\r
+  Arguments:\r
+    This    - Protocol instance pointer.\r
+    Control - A pointer to return the current Control signals from the serial\r
+               device.\r
+\r
+  Returns:\r
+    EFI_SUCCESS      - The control bits were read from the serial device.\r
+    EFI_DEVICE_ERROR - The serial device is not functioning correctly.\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SERIAL_WRITE) (\r
+  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
+  IN OUT UINTN                      *BufferSize,\r
+  IN VOID                           *Buffer\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Writes data to a serial device.\r
+\r
+  Arguments:\r
+    This    - Protocol instance pointer.\r
+    BufferSize - On input, the size of the Buffer. On output, the amount of \r
+                  data actually written.\r
+    Buffer - The buffer of data to write\r
+\r
+  Returns:\r
+    EFI_SUCCESS      - The data was written.\r
+    EFI_DEVICE_ERROR - The device reported an error.\r
+    EFI_TIMEOUT      - The data write was stopped due to a timeout.\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SERIAL_READ) (\r
+  IN EFI_SERIAL_IO_PROTOCOL         * This,\r
+  IN OUT UINTN                      *BufferSize,\r
+  OUT VOID                          *Buffer\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Writes data to a serial device.\r
+\r
+  Arguments:\r
+    This    - Protocol instance pointer.\r
+    BufferSize - On input, the size of the Buffer. On output, the amount of \r
+                  data returned in Buffer.\r
+    Buffer - The buffer to return the data into.\r
+\r
+  Returns:\r
+    EFI_SUCCESS      - The data was read.\r
+    EFI_DEVICE_ERROR - The device reported an error.\r
+    EFI_TIMEOUT      - The data write was stopped due to a timeout.\r
+\r
+--*/\r
+;\r
+\r
+/*++\r
+\r
+  The data values in SERIAL_IO_MODE are read-only and are updated by the code \r
+  that produces the SERIAL_IO_PROTOCOL member functions.\r
+\r
+  ControlMask - A mask fo the Control bits that the device supports. The device\r
+                 must always support the Input Buffer Empty control bit.\r
+  TimeOut  - If applicable, the number of microseconds to wait before timing out\r
+              a Read or Write operation.\r
+  BaudRate - If applicable, the current baud rate setting of the device; otherwise,\r
+              baud rate has the value of zero to indicate that device runs at the\r
+              device's designed speed.\r
+  ReceiveFifoDepth - The number of characters the device will buffer on input\r
+  DataBits - The number of characters the device will buffer on input\r
+  Parity   - If applicable, this is the EFI_PARITY_TYPE that is computed or \r
+             checked as each character is transmitted or reveived. If the device\r
+             does not support parity the value is the default parity value.\r
+  StopBits - If applicable, the EFI_STOP_BITS_TYPE number of stop bits per\r
+              character. If the device does not support stop bits the value is\r
+              the default stop bit values.\r
+\r
+--*/\r
+typedef struct {\r
+  UINT32  ControlMask;\r
+\r
+  //\r
+  // current Attributes\r
+  //\r
+  UINT32  Timeout;\r
+  UINT64  BaudRate;\r
+  UINT32  ReceiveFifoDepth;\r
+  UINT32  DataBits;\r
+  UINT32  Parity;\r
+  UINT32  StopBits;\r
+} EFI_SERIAL_IO_MODE;\r
+\r
+#define SERIAL_IO_INTERFACE_REVISION  0x00010000\r
+\r
+typedef struct _EFI_SERIAL_IO_PROTOCOL {\r
+  UINT32                      Revision;\r
+  EFI_SERIAL_RESET            Reset;\r
+  EFI_SERIAL_SET_ATTRIBUTES   SetAttributes;\r
+  EFI_SERIAL_SET_CONTROL_BITS SetControl;\r
+  EFI_SERIAL_GET_CONTROL_BITS GetControl;\r
+  EFI_SERIAL_WRITE            Write;\r
+  EFI_SERIAL_READ             Read;\r
+\r
+  EFI_SERIAL_IO_MODE          *Mode;\r
+} EFI_SERIAL_IO_PROTOCOL;\r
+\r
+extern EFI_GUID gEfiSerialIoProtocolGuid;\r
+\r
+#endif\r