Migrate GOP driver from R8.6 for NT32. Add a new PCD "PcdWinNtGop". Setting NT32...
[mirror_edk2.git] / EdkNt32Pkg / Dxe / PlatformBds / PlatformData.c
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 PlatformData.c
15
16 Abstract:
17
18 Defined the platform specific device path which will be used by
19 platform Bbd to perform the platform policy connect.
20
21 --*/
22
23 #include "Generic/Bds.h"
24 #include "BdsPlatform.h"
25
26 //
27 // Predefined platform default time out value
28 //
29 UINT16 gPlatformBootTimeOutDefault = 10;
30
31 //
32 // Platform specific keyboard device path
33 //
34 NT_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath0 = {
35 {
36 HARDWARE_DEVICE_PATH,
37 HW_VENDOR_DP,
38 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
39 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
40 EFI_WIN_NT_THUNK_PROTOCOL_GUID
41 },
42 {
43 HARDWARE_DEVICE_PATH,
44 HW_VENDOR_DP,
45 (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),
46 (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),
47 EFI_WIN_NT_UGA_GUID,
48 0
49 },
50 gEndEntire
51 };
52
53 NT_PLATFORM_UGA_DEVICE_PATH gUgaDevicePath1 = {
54 {
55 HARDWARE_DEVICE_PATH,
56 HW_VENDOR_DP,
57 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
58 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
59 EFI_WIN_NT_THUNK_PROTOCOL_GUID
60 },
61 {
62 HARDWARE_DEVICE_PATH,
63 HW_VENDOR_DP,
64 (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),
65 (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),
66 EFI_WIN_NT_UGA_GUID,
67 1
68 },
69 gEndEntire
70 };
71 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
72 NT_PLATFORM_GOP_DEVICE_PATH gGopDevicePath0 = {
73 {
74 HARDWARE_DEVICE_PATH,
75 HW_VENDOR_DP,
76 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
77 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
78 EFI_WIN_NT_THUNK_PROTOCOL_GUID
79 },
80 {
81 HARDWARE_DEVICE_PATH,
82 HW_VENDOR_DP,
83 (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),
84 (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),
85 EFI_WIN_NT_GOP_GUID,
86 0
87 },
88 gEndEntire
89 };
90
91 NT_PLATFORM_GOP_DEVICE_PATH gGopDevicePath1 = {
92 {
93 HARDWARE_DEVICE_PATH,
94 HW_VENDOR_DP,
95 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
96 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
97 EFI_WIN_NT_THUNK_PROTOCOL_GUID
98 },
99 {
100 HARDWARE_DEVICE_PATH,
101 HW_VENDOR_DP,
102 (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),
103 (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),
104 EFI_WIN_NT_GOP_GUID,
105 1
106 },
107 gEndEntire
108 };
109 #endif
110
111 //
112 // Platform specific serial device path
113 //
114 NT_ISA_SERIAL_DEVICE_PATH gNtSerialDevicePath0 = {
115 {
116 HARDWARE_DEVICE_PATH,
117 HW_VENDOR_DP,
118 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
119 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
120 EFI_WIN_NT_THUNK_PROTOCOL_GUID
121 },
122 {
123 HARDWARE_DEVICE_PATH,
124 HW_VENDOR_DP,
125 (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),
126 (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),
127 EFI_WIN_NT_SERIAL_PORT_GUID
128 },
129 {
130 MESSAGING_DEVICE_PATH,
131 MSG_UART_DP,
132 (UINT8) (sizeof (UART_DEVICE_PATH)),
133 (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8),
134 0,
135 115200,
136 8,
137 1,
138 1
139 },
140 {
141 MESSAGING_DEVICE_PATH,
142 MSG_VENDOR_DP,
143 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
144 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
145 DEVICE_PATH_MESSAGING_PC_ANSI
146 },
147 gEndEntire
148 };
149
150 NT_ISA_SERIAL_DEVICE_PATH gNtSerialDevicePath1 = {
151 {
152 HARDWARE_DEVICE_PATH,
153 HW_VENDOR_DP,
154 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
155 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
156 EFI_WIN_NT_THUNK_PROTOCOL_GUID
157 },
158 {
159 HARDWARE_DEVICE_PATH,
160 HW_VENDOR_DP,
161 (UINT8) (sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)),
162 (UINT8) ((sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)) >> 8),
163 EFI_WIN_NT_SERIAL_PORT_GUID,
164 1
165 },
166 {
167 MESSAGING_DEVICE_PATH,
168 MSG_UART_DP,
169 (UINT8) (sizeof (UART_DEVICE_PATH)),
170 (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8),
171 0,
172 115200,
173 8,
174 1,
175 1
176 },
177 {
178 MESSAGING_DEVICE_PATH,
179 MSG_VENDOR_DP,
180 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
181 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
182 DEVICE_PATH_MESSAGING_PC_ANSI
183 },
184 gEndEntire
185 };
186
187 //
188 // Predefined platform default console device path
189 //
190 BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = {
191 {
192 (EFI_DEVICE_PATH_PROTOCOL *) &gNtSerialDevicePath0,
193 (CONSOLE_OUT | CONSOLE_IN)
194 },
195 {
196 (EFI_DEVICE_PATH_PROTOCOL *) &gNtSerialDevicePath1,
197 (CONSOLE_OUT | CONSOLE_IN)
198 },
199 {
200 (EFI_DEVICE_PATH_PROTOCOL *) &gUgaDevicePath0,
201 (CONSOLE_OUT | CONSOLE_IN)
202 },
203 {
204 (EFI_DEVICE_PATH_PROTOCOL *) &gUgaDevicePath1,
205 (CONSOLE_OUT | CONSOLE_IN)
206 },
207 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
208 {
209 (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath0,
210 (CONSOLE_OUT | CONSOLE_IN)
211 },
212 {
213 (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath1,
214 (CONSOLE_OUT | CONSOLE_IN)
215 },
216 #endif
217 {
218 NULL,
219 0
220 }
221 };
222
223 //
224 // Predefined platform specific driver option
225 //
226 EFI_DEVICE_PATH_PROTOCOL *gPlatformDriverOption[] = { NULL };
227
228 //
229 // Predefined platform connect sequence
230 //
231 EFI_DEVICE_PATH_PROTOCOL *gPlatformConnectSequence[] = { NULL };