1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
//**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2005, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 6145-F Northbelt Pkwy, Norcross, GA 30071 **
//** **
//** Phone: (770)-246-8600 **
//** **
//**********************************************************************
//**********************************************************************
//**********************************************************************
// $Header: /Alaska/BIN/Core/Include/Protocol/DeviceIo.h 4 3/13/06 1:40a Felixp $
//
// $Revision: 4 $
//
// $Date: 3/13/06 1:40a $
//*****************************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/Core/Include/Protocol/DeviceIo.h $
//
// 4 3/13/06 1:40a Felixp
//
// 3 8/15/05 9:03a Andriyn
//
// 2 3/04/05 10:33a Mandal
//
// 1 1/28/05 12:44p Felixp
//
// 2 1/18/05 3:21p Felixp
// PrintDebugMessage renamed to Trace
//
// 1 12/23/04 9:41a Felixp
//
// 1 8/26/04 3:56p Markw
//
//*****************************************************************************
//<AMI_FHDR_START>
//
// Name: DeviceIo_h
//
// Description: This file is an include file used to define the Protocol for the
// DeviceIo Protocol.
//
//<AMI_FHDR_END>
//*****************************************************************************
#ifndef __DEVICE_IO_PROTOCOL_H__
#define __DEVICE_IO_PROTOCOL_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <EFI.h>
// af6ac311-84c3-11d2-8e3c-00a0c969723b }
#define DEVICE_IO_PROTOCOL \
{0xaf6ac311,0x84c3,0x11d2,0x8e,0x3c,0x00,0xa0,0xc9,0x69,0x72,0x3b}
typedef struct _EFI_DEVICE_IO_INTERFACE EFI_DEVICE_IO_INTERFACE;
//*******************************************************
// EFI_IO_WIDTH
//*******************************************************
typedef enum {
IO_UINT8 = 0,
IO_UINT16 = 1,
IO_UINT32 = 2,
IO_UINT64 = 3
} EFI_IO_WIDTH;
//*******************************************************
// EFI_IO_OPERATION_TYPE
//*******************************************************
typedef enum {
EfiBusMasterRead,
EfiBusMasterWrite,
EfiBusMasterCommonBuffer
} EFI_IO_OPERATION_TYPE;
//*******************************************************
// EFI_DEVICE_IO
//*******************************************************
typedef EFI_STATUS (EFIAPI *EFI_DEVICE_IO) (
IN EFI_DEVICE_IO_INTERFACE *This,
IN EFI_IO_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN OUT VOID *Buffer
);
//*******************************************************
// EFI_IO_ACCESS
//*******************************************************
typedef struct {
EFI_DEVICE_IO Read;
EFI_DEVICE_IO Write;
} EFI_IO_ACCESS;
typedef EFI_STATUS (EFIAPI *EFI_PCI_DEVICE_PATH) (
IN EFI_DEVICE_IO_INTERFACE *This,
IN UINT64 PciAddress,
IN OUT EFI_DEVICE_PATH_PROTOCOL **PciDevicePath
);
typedef EFI_STATUS (EFIAPI *EFI_IO_MAP) (
IN EFI_DEVICE_IO_INTERFACE *This,
IN EFI_IO_OPERATION_TYPE Operation,
IN EFI_PHYSICAL_ADDRESS *HostAddress,
IN OUT UINTN *NumberOfBytes,
OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
);
typedef EFI_STATUS (EFIAPI *EFI_IO_UNMAP) (
IN EFI_DEVICE_IO_INTERFACE *This,
IN VOID *Mapping
);
typedef EFI_STATUS (EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
IN EFI_DEVICE_IO_INTERFACE *This,
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
IN OUT EFI_PHYSICAL_ADDRESS *HostAddress
);
typedef EFI_STATUS (EFIAPI *EFI_IO_FLUSH) (
IN EFI_DEVICE_IO_INTERFACE *This
);
typedef EFI_STATUS (EFIAPI *EFI_IO_FREE_BUFFER) (
IN EFI_DEVICE_IO_INTERFACE *This,
IN UINTN Pages,
IN EFI_PHYSICAL_ADDRESS HostAddress
);
struct _EFI_DEVICE_IO_INTERFACE {
EFI_IO_ACCESS Mem;
EFI_IO_ACCESS Io;
EFI_IO_ACCESS Pci;
EFI_IO_MAP Map;
EFI_PCI_DEVICE_PATH PciDevicePath;
EFI_IO_UNMAP Unmap;
EFI_IO_ALLOCATE_BUFFER AllocateBuffer;
EFI_IO_FLUSH Flush;
EFI_IO_FREE_BUFFER FreeBuffer;
};
/****** DO NOT WRITE BELOW THIS LINE *******/
#ifdef __cplusplus
}
#endif
#endif
//**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2005, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 6145-F Northbelt Pkwy, Norcross, GA 30071 **
//** **
//** Phone: (770)-246-8600 **
//** **
//**********************************************************************
//**********************************************************************
|