Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / ia64 / stand / efi / include / efiser.h
blobe8b5d45352e7403bb691e53642178e772e2f0eec
1 /* $NetBSD: efiser.h,v 1.1 2006/04/07 14:21:29 cherry Exp $ */
2 /* $FreeBSD: src/sys/boot/efi/include/efiser.h,v 1.2 2002/05/19 03:17:21 marcel Exp $ */
4 #ifndef _EFI_SER_H
5 #define _EFI_SER_H
7 /*++
9 Copyright (c) 1998 Intel Corporation
11 Module Name:
13 efiser.h
15 Abstract:
17 EFI serial protocol
19 Revision History
21 --*/
24 * Serial protocol
27 #define SERIAL_IO_PROTOCOL \
28 { 0xBB25CF6F, 0xF1D4, 0x11D2, 0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD }
30 INTERFACE_DECL(_SERIAL_IO_INTERFACE);
32 typedef enum {
33 DefaultParity,
34 NoParity,
35 EvenParity,
36 OddParity,
37 MarkParity,
38 SpaceParity
39 } EFI_PARITY_TYPE;
41 typedef enum {
42 DefaultStopBits,
43 OneStopBit,
44 OneFiveStopBits,
45 TwoStopBits
46 } EFI_STOP_BITS_TYPE;
48 #define EFI_SERIAL_CLEAR_TO_SEND 0x0010
49 #define EFI_SERIAL_DATA_SET_READY 0x0020
50 #define EFI_SERIAL_RING_INDICATE 0x0040
51 #define EFI_SERIAL_CARRIER_DETECT 0x0080
52 #define EFI_SERIAL_REQUEST_TO_SEND 0x0002
53 #define EFI_SERIAL_DATA_TERMINAL_READY 0x0001
54 #define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x0100
55 #define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x0200
56 #define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x1000
57 #define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x2000
58 #define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x4000
60 typedef
61 EFI_STATUS
62 (EFIAPI *EFI_SERIAL_RESET) (
63 IN struct _SERIAL_IO_INTERFACE *This
66 typedef
67 EFI_STATUS
68 (EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (
69 IN struct _SERIAL_IO_INTERFACE *This,
70 IN UINT64 BaudRate,
71 IN UINT32 ReceiveFifoDepth,
72 IN UINT32 Timeout,
73 IN EFI_PARITY_TYPE Parity,
74 IN UINT8 DataBits,
75 IN EFI_STOP_BITS_TYPE StopBits
78 typedef
79 EFI_STATUS
80 (EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (
81 IN struct _SERIAL_IO_INTERFACE *This,
82 IN UINT32 Control
85 typedef
86 EFI_STATUS
87 (EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (
88 IN struct _SERIAL_IO_INTERFACE *This,
89 OUT UINT32 *Control
92 typedef
93 EFI_STATUS
94 (EFIAPI *EFI_SERIAL_WRITE) (
95 IN struct _SERIAL_IO_INTERFACE *This,
96 IN OUT UINTN *BufferSize,
97 IN VOID *Buffer
100 typedef
101 EFI_STATUS
102 (EFIAPI *EFI_SERIAL_READ) (
103 IN struct _SERIAL_IO_INTERFACE *This,
104 IN OUT UINTN *BufferSize,
105 OUT VOID *Buffer
108 typedef struct {
109 UINT32 ControlMask;
111 /* current Attributes. */
112 UINT32 Timeout;
113 UINT64 BaudRate;
114 UINT32 ReceiveFifoDepth;
115 UINT32 DataBits;
116 UINT32 Parity;
117 UINT32 StopBits;
118 } SERIAL_IO_MODE;
120 #define SERIAL_IO_INTERFACE_REVISION 0x00010000
122 typedef struct _SERIAL_IO_INTERFACE {
123 UINT32 Revision;
124 EFI_SERIAL_RESET Reset;
125 EFI_SERIAL_SET_ATTRIBUTES SetAttributes;
126 EFI_SERIAL_SET_CONTROL_BITS SetControl;
127 EFI_SERIAL_GET_CONTROL_BITS GetControl;
128 EFI_SERIAL_WRITE Write;
129 EFI_SERIAL_READ Read;
131 SERIAL_IO_MODE *Mode;
132 } SERIAL_IO_INTERFACE;
134 #endif