added -y/--side-by-side option
[dfdiff.git] / sys / boot / efi / include / efiser.h
blob763de97a483b508a7a9684a51a4c7dc2b6f66d0a
1 /*
2 * $FreeBSD: src/sys/boot/efi/include/efiser.h,v 1.2 2002/05/19 03:17:21 marcel Exp $
3 * $DragonFly: src/sys/boot/efi/include/efiser.h,v 1.1 2003/11/10 06:08:32 dillon Exp $
4 */
5 #ifndef _EFI_SER_H
6 #define _EFI_SER_H
8 /*++
10 Copyright (c) 1998 Intel Corporation
12 Module Name:
14 efiser.h
16 Abstract:
18 EFI serial protocol
20 Revision History
22 --*/
25 * Serial protocol
28 #define SERIAL_IO_PROTOCOL \
29 { 0xBB25CF6F, 0xF1D4, 0x11D2, 0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD }
31 INTERFACE_DECL(_SERIAL_IO_INTERFACE);
33 typedef enum {
34 DefaultParity,
35 NoParity,
36 EvenParity,
37 OddParity,
38 MarkParity,
39 SpaceParity
40 } EFI_PARITY_TYPE;
42 typedef enum {
43 DefaultStopBits,
44 OneStopBit,
45 OneFiveStopBits,
46 TwoStopBits
47 } EFI_STOP_BITS_TYPE;
49 #define EFI_SERIAL_CLEAR_TO_SEND 0x0010
50 #define EFI_SERIAL_DATA_SET_READY 0x0020
51 #define EFI_SERIAL_RING_INDICATE 0x0040
52 #define EFI_SERIAL_CARRIER_DETECT 0x0080
53 #define EFI_SERIAL_REQUEST_TO_SEND 0x0002
54 #define EFI_SERIAL_DATA_TERMINAL_READY 0x0001
55 #define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x0100
56 #define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x0200
57 #define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x1000
58 #define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x2000
59 #define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x4000
61 typedef
62 EFI_STATUS
63 (EFIAPI *EFI_SERIAL_RESET) (
64 IN struct _SERIAL_IO_INTERFACE *This
67 typedef
68 EFI_STATUS
69 (EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (
70 IN struct _SERIAL_IO_INTERFACE *This,
71 IN UINT64 BaudRate,
72 IN UINT32 ReceiveFifoDepth,
73 IN UINT32 Timeout,
74 IN EFI_PARITY_TYPE Parity,
75 IN UINT8 DataBits,
76 IN EFI_STOP_BITS_TYPE StopBits
79 typedef
80 EFI_STATUS
81 (EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (
82 IN struct _SERIAL_IO_INTERFACE *This,
83 IN UINT32 Control
86 typedef
87 EFI_STATUS
88 (EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (
89 IN struct _SERIAL_IO_INTERFACE *This,
90 OUT UINT32 *Control
93 typedef
94 EFI_STATUS
95 (EFIAPI *EFI_SERIAL_WRITE) (
96 IN struct _SERIAL_IO_INTERFACE *This,
97 IN OUT UINTN *BufferSize,
98 IN VOID *Buffer
101 typedef
102 EFI_STATUS
103 (EFIAPI *EFI_SERIAL_READ) (
104 IN struct _SERIAL_IO_INTERFACE *This,
105 IN OUT UINTN *BufferSize,
106 OUT VOID *Buffer
109 typedef struct {
110 UINT32 ControlMask;
112 /* current Attributes. */
113 UINT32 Timeout;
114 UINT64 BaudRate;
115 UINT32 ReceiveFifoDepth;
116 UINT32 DataBits;
117 UINT32 Parity;
118 UINT32 StopBits;
119 } SERIAL_IO_MODE;
121 #define SERIAL_IO_INTERFACE_REVISION 0x00010000
123 typedef struct _SERIAL_IO_INTERFACE {
124 UINT32 Revision;
125 EFI_SERIAL_RESET Reset;
126 EFI_SERIAL_SET_ATTRIBUTES SetAttributes;
127 EFI_SERIAL_SET_CONTROL_BITS SetControl;
128 EFI_SERIAL_GET_CONTROL_BITS GetControl;
129 EFI_SERIAL_WRITE Write;
130 EFI_SERIAL_READ Read;
132 SERIAL_IO_MODE *Mode;
133 } SERIAL_IO_INTERFACE;
135 #endif