Updated MSA by putting Specification element at the end of the header section
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / CirrusLogic / Dxe / CirrusLogic5430.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 CirrusLogic5430.h\r
15 \r
16Abstract:\r
17\r
18 Cirrus Logic 5430 Controller Driver\r
19\r
20Revision History\r
21\r
22--*/\r
23\r
24//\r
25// Cirrus Logic 5430 Controller Driver\r
26//\r
27\r
28#ifndef _CIRRUS_LOGIC_5430_H_\r
29#define _CIRRUS_LOGIC_5430_H_\r
30\r
31\r
f0ec738d 32#include <IndustryStandard/pci22.h>\r
878ddf1f 33//\r
34// Cirrus Logic 5430 PCI Configuration Header values\r
35//\r
36#define CIRRUS_LOGIC_VENDOR_ID 0x1013\r
37#define CIRRUS_LOGIC_5430_DEVICE_ID 0x00a8\r
38#define CIRRUS_LOGIC_5430_ALTERNATE_DEVICE_ID 0x00a0\r
39#define CIRRUS_LOGIC_5446_DEVICE_ID 0x00b8\r
40\r
41//\r
42// Cirrus Logic Graphical Mode Data\r
43//\r
44#define CIRRUS_LOGIC_5430_UGA_DRAW_MODE_COUNT 3\r
45\r
46typedef struct {\r
47 UINT32 HorizontalResolution;\r
48 UINT32 VerticalResolution;\r
49 UINT32 ColorDepth;\r
50 UINT32 RefreshRate;\r
51} CIRRUS_LOGIC_5430_UGA_DRAW_MODE_DATA;\r
52\r
53//\r
54// Cirrus Logic 5440 Private Data Structure\r
55//\r
56#define CIRRUS_LOGIC_5430_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('C', 'L', '5', '4')\r
57\r
58typedef struct {\r
59 UINT64 Signature;\r
60 EFI_HANDLE Handle;\r
61 EFI_PCI_IO_PROTOCOL *PciIo;\r
62 EFI_UGA_DRAW_PROTOCOL UgaDraw;\r
63\r
64 //\r
65 // UGA Draw Private Data\r
66 //\r
67 BOOLEAN HardwareNeedsStarting;\r
68 UINTN CurrentMode;\r
69 UINTN MaxMode;\r
70 CIRRUS_LOGIC_5430_UGA_DRAW_MODE_DATA ModeData[CIRRUS_LOGIC_5430_UGA_DRAW_MODE_COUNT];\r
71 UINT8 *LineBuffer;\r
72} CIRRUS_LOGIC_5430_PRIVATE_DATA;\r
73\r
74#define CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS(a) \\r
75 CR(a, CIRRUS_LOGIC_5430_PRIVATE_DATA, UgaDraw, CIRRUS_LOGIC_5430_PRIVATE_DATA_SIGNATURE)\r
76\r
77//\r
78// Global Variables\r
79//\r
80extern EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding;\r
81extern EFI_COMPONENT_NAME_PROTOCOL gCirrusLogic5430ComponentName;\r
82\r
83//\r
84// Io Registers defined by VGA\r
85//\r
86#define CRTC_ADDRESS_REGISTER 0x3d4\r
87#define CRTC_DATA_REGISTER 0x3d5\r
88#define SEQ_ADDRESS_REGISTER 0x3c4\r
89#define SEQ_DATA_REGISTER 0x3c5\r
90#define GRAPH_ADDRESS_REGISTER 0x3ce\r
91#define GRAPH_DATA_REGISTER 0x3cf\r
92#define ATT_ADDRESS_REGISTER 0x3c0\r
93#define MISC_OUTPUT_REGISTER 0x3c2\r
94#define INPUT_STATUS_1_REGISTER 0x3da\r
95#define DAC_PIXEL_MASK_REGISTER 0x3c6\r
96#define PALETTE_INDEX_REGISTER 0x3c8\r
97#define PALETTE_DATA_REGISTER 0x3c9\r
98\r
99//\r
100// UGA Draw Hardware abstraction internal worker functions\r
101//\r
102EFI_STATUS\r
103CirrusLogic5430UgaDrawConstructor (\r
104 CIRRUS_LOGIC_5430_PRIVATE_DATA *Private\r
105 )\r
106/*++\r
107\r
108Routine Description:\r
109\r
110 TODO: Add function description\r
111\r
112Arguments:\r
113\r
114 Private - TODO: add argument description\r
115\r
116Returns:\r
117\r
118 TODO: add return values\r
119\r
120--*/\r
121;\r
122\r
123EFI_STATUS\r
124CirrusLogic5430UgaDrawDestructor (\r
125 CIRRUS_LOGIC_5430_PRIVATE_DATA *Private\r
126 )\r
127/*++\r
128\r
129Routine Description:\r
130\r
131 TODO: Add function description\r
132\r
133Arguments:\r
134\r
135 Private - TODO: add argument description\r
136\r
137Returns:\r
138\r
139 TODO: add return values\r
140\r
141--*/\r
142;\r
143\r
144//\r
145// EFI 1.1 driver model prototypes for Cirrus Logic 5430 UGA Draw\r
146//\r
147EFI_STATUS\r
148EFIAPI\r
149CirrusLogic5430DriverEntryPoint (\r
150 IN EFI_HANDLE ImageHandle,\r
151 IN EFI_SYSTEM_TABLE *SystemTable\r
152 )\r
153/*++\r
154\r
155Routine Description:\r
156\r
157 TODO: Add function description\r
158\r
159Arguments:\r
160\r
161 ImageHandle - TODO: add argument description\r
162 SystemTable - TODO: add argument description\r
163\r
164Returns:\r
165\r
166 TODO: add return values\r
167\r
168--*/\r
169;\r
170\r
171//\r
172// EFI_DRIVER_BINDING_PROTOCOL Protocol Interface\r
173//\r
174EFI_STATUS\r
175EFIAPI\r
176CirrusLogic5430ControllerDriverSupported (\r
177 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
178 IN EFI_HANDLE Controller,\r
179 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
180 )\r
181/*++\r
182\r
183Routine Description:\r
184\r
185 TODO: Add function description\r
186\r
187Arguments:\r
188\r
189 This - TODO: add argument description\r
190 Controller - TODO: add argument description\r
191 RemainingDevicePath - TODO: add argument description\r
192\r
193Returns:\r
194\r
195 TODO: add return values\r
196\r
197--*/\r
198;\r
199\r
200EFI_STATUS\r
201EFIAPI\r
202CirrusLogic5430ControllerDriverStart (\r
203 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
204 IN EFI_HANDLE Controller,\r
205 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
206 )\r
207/*++\r
208\r
209Routine Description:\r
210\r
211 TODO: Add function description\r
212\r
213Arguments:\r
214\r
215 This - TODO: add argument description\r
216 Controller - TODO: add argument description\r
217 RemainingDevicePath - TODO: add argument description\r
218\r
219Returns:\r
220\r
221 TODO: add return values\r
222\r
223--*/\r
224;\r
225\r
226EFI_STATUS\r
227EFIAPI\r
228CirrusLogic5430ControllerDriverStop (\r
229 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
230 IN EFI_HANDLE Controller,\r
231 IN UINTN NumberOfChildren,\r
232 IN EFI_HANDLE *ChildHandleBuffer\r
233 )\r
234/*++\r
235\r
236Routine Description:\r
237\r
238 TODO: Add function description\r
239\r
240Arguments:\r
241\r
242 This - TODO: add argument description\r
243 Controller - TODO: add argument description\r
244 NumberOfChildren - TODO: add argument description\r
245 ChildHandleBuffer - TODO: add argument description\r
246\r
247Returns:\r
248\r
249 TODO: add return values\r
250\r
251--*/\r
252;\r
253\r
254#endif\r