]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c
Vlv2TbltDevicePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / PlatformBdsLib / PlatformData.c
1 /** @file
2
3 Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7
8
9 Module Name:
10
11 PlatformData.c
12
13 Abstract:
14
15 Defined the platform specific device path which will be used by
16 platform Bbd to perform the platform policy connect.
17
18 --*/
19
20 #include "BdsPlatform.h"
21
22 //
23 // Predefined platform default time out value
24 //
25 UINT16 gPlatformBootTimeOutDefault = 10;
26
27 //
28 // Predefined platform root bridge
29 //
30 PLATFORM_ROOT_BRIDGE_DEVICE_PATH gPlatformRootBridge0 = {
31 gPciRootBridge,
32 gEndEntire
33 };
34
35 EFI_DEVICE_PATH_PROTOCOL* gPlatformRootBridges [] = {
36 (EFI_DEVICE_PATH_PROTOCOL*)&gPlatformRootBridge0,
37 NULL
38 };
39
40 //
41 // Platform specific ISA keyboard device path
42 //
43 PLATFORM_ISA_KEYBOARD_DEVICE_PATH gIsaKeyboardDevicePath = {
44 gPciRootBridge,
45 gPciIsaBridge,
46 gPnpPs2Keyboard,
47 gEndEntire
48 };
49
50 //
51 // Platform specific on chip PCI VGA device path
52 //
53 PLATFORM_ONBOARD_VGA_DEVICE_PATH gOnChipPciVgaDevicePath = {
54 gPciRootBridge,
55 PCI_DEVICE_PATH_NODE(0, 0x2),
56 gEndEntire
57 };
58
59 //
60 // Platform specific plug in PCI VGA device path
61 //
62 PLATFORM_OFFBOARD_VGA_DEVICE_PATH gPlugInPciVgaDevicePath = {
63 gPciRootBridge,
64 PCI_DEVICE_PATH_NODE(0, 0x1),
65 PCI_DEVICE_PATH_NODE(0, 0x0),
66 gEndEntire
67 };
68
69 //
70 // Platform specific ISA serial device path
71 //
72 PLATFORM_ISA_SERIAL_DEVICE_PATH gIsaSerialDevicePath = {
73 gPciRootBridge,
74 gPciIsaBridge,
75 gPnp16550ComPort,
76 gUart(115200, 8, 1, 1),
77 gPcAnsiTerminal,
78 gEndEntire
79 };
80
81
82 //
83 // Platform specific Button Array device path
84 //
85 HII_VENDOR_DEVICE_PATH gHiiVendorDevicePath0 = {
86 {
87 {
88 HARDWARE_DEVICE_PATH,
89 HW_VENDOR_DP,
90 {
91 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
92 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
93 }
94 },
95
96 //
97 // {C8752FDE-B5C8-4528-897D-6920FE771E38}
98 //
99 { 0xC8752FDE, 0xB5C8, 0x4528, { 0x89, 0x7D, 0x69, 0x20, 0xFE, 0x77, 0x1E, 0x38 } }
100 },
101 {
102 END_DEVICE_PATH_TYPE,
103 END_ENTIRE_DEVICE_PATH_SUBTYPE,
104 {
105 (UINT8) (END_DEVICE_PATH_LENGTH),
106 (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
107 }
108 }
109 };
110
111 USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath = {
112 gUsbKeyboardMouse,
113 gEndEntire
114 };
115
116 //
117 // Debug Agent UART Console device path
118 //
119 VENDOR_UART_DEVICE_PATH gDebugAgentUartDevicePath = {
120 {
121 {
122 HARDWARE_DEVICE_PATH,
123 HW_VENDOR_DP,
124 {
125 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
126 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
127 }
128 },
129 EFI_DEBUG_AGENT_GUID,
130 },
131 {
132 {
133 MESSAGING_DEVICE_PATH,
134 MSG_UART_DP,
135 {
136 (UINT8) (sizeof (UART_DEVICE_PATH)),
137 (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
138 }
139 },
140 0, // Reserved
141 0, // BaudRate - Default
142 0, // DataBits - Default
143 0, // Parity - Default
144 0, // StopBits - Default
145 },
146 {
147 {
148 MESSAGING_DEVICE_PATH,
149 MSG_VENDOR_DP,
150 {
151 (UINT8)(sizeof (VENDOR_DEVICE_PATH)),
152 (UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
153 }
154 },
155 DEVICE_PATH_MESSAGING_PC_ANSI
156 },
157 gEndEntire
158 };
159
160 //
161 // Predefined platform default console device path
162 //
163 BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole [] = {
164 {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL},
165 {(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN},
166 {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaKeyboardDevicePath, CONSOLE_IN},
167 {(EFI_DEVICE_PATH_PROTOCOL*)&gDebugAgentUartDevicePath, CONSOLE_ALL},
168 {(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN},
169 {NULL, 0}
170 };
171
172 //
173 // All the possible platform PCI VGA device path
174 //
175 EFI_DEVICE_PATH_PROTOCOL* gPlatformAllPossiblePciVgaConsole [] = {
176 (EFI_DEVICE_PATH_PROTOCOL*)&gOnChipPciVgaDevicePath,
177 (EFI_DEVICE_PATH_PROTOCOL*)&gPlugInPciVgaDevicePath,
178 NULL
179 };
180
181 //
182 // Legacy hard disk boot option
183 //
184 LEGACY_HD_DEVICE_PATH gLegacyHd = {
185 {
186 BBS_DEVICE_PATH,
187 BBS_BBS_DP,
188 (UINT8)(sizeof(BBS_BBS_DEVICE_PATH)),
189 (UINT8)((sizeof(BBS_BBS_DEVICE_PATH)) >> 8),
190 BBS_TYPE_HARDDRIVE,
191 0,
192 0
193 },
194 gEndEntire
195 };
196
197 //
198 // Legacy cdrom boot option
199 //
200 LEGACY_HD_DEVICE_PATH gLegacyCdrom = {
201 {
202 BBS_DEVICE_PATH,
203 BBS_BBS_DP,
204 (UINT8)(sizeof(BBS_BBS_DEVICE_PATH)),
205 (UINT8)((sizeof(BBS_BBS_DEVICE_PATH)) >> 8),
206 BBS_TYPE_CDROM,
207 0,
208 0
209 },
210 gEndEntire
211 };
212
213 //
214 // Predefined platform specific perdict boot option
215 //
216 EFI_DEVICE_PATH_PROTOCOL* gPlatformBootOption [] = {
217 (EFI_DEVICE_PATH_PROTOCOL*)&gLegacyHd,
218 (EFI_DEVICE_PATH_PROTOCOL*)&gLegacyCdrom,
219 NULL
220 };
221
222 //
223 // Predefined platform specific driver option
224 //
225 EFI_DEVICE_PATH_PROTOCOL* gPlatformDriverOption [] = {
226 NULL
227 };
228
229 //
230 // Predefined platform connect sequence
231 //
232 EFI_DEVICE_PATH_PROTOCOL* gPlatformConnectSequence [] = {
233 (EFI_DEVICE_PATH_PROTOCOL *)&gPlatformRootBridge0, // Force PCI enumer before Legacy OpROM shadow
234 NULL
235 };
236
237 //
238 // Platform specific USB controller device path
239 //
240 PLATFORM_USB_DEVICE_PATH gUsbDevicePath0 = {
241 gPciRootBridge,
242 PCI_DEVICE_PATH_NODE(0, 0x1D),
243 gEndEntire
244 };
245
246 PLATFORM_USB_DEVICE_PATH gUsbDevicePath1 = {
247 gPciRootBridge,
248 PCI_DEVICE_PATH_NODE(1, 0x1D),
249 gEndEntire
250 };
251
252 PLATFORM_USB_DEVICE_PATH gUsbDevicePath2 = {
253 gPciRootBridge,
254 PCI_DEVICE_PATH_NODE(2, 0x1D),
255 gEndEntire
256 };
257
258 PLATFORM_USB_DEVICE_PATH gUsbDevicePath3 = {
259 gPciRootBridge,
260 PCI_DEVICE_PATH_NODE(3, 0x1D),
261 gEndEntire
262 };
263
264 //
265 // Predefined platform device path for user authtication
266 //
267 EFI_DEVICE_PATH_PROTOCOL* gUserAuthenticationDevice[] = {
268 //
269 // Predefined device path for secure card (USB disk).
270 //
271 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath0,
272 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath1,
273 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath2,
274 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath3,
275 NULL
276 };
277
278 //
279 // Predefined platform console device path
280 //
281 BDS_CONSOLE_CONNECT_ENTRY gPlatformSimpleConsole [] = {
282 {(EFI_DEVICE_PATH_PROTOCOL*)&gOnChipPciVgaDevicePath, CONSOLE_OUT},
283 {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL},
284 {(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN},
285 {(EFI_DEVICE_PATH_PROTOCOL*)&gDebugAgentUartDevicePath, CONSOLE_ALL},
286 {(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN},
287 {NULL, 0}
288 };
289
290 //
291 // eMMC device at BDF(0x0, 0x17, 0x0)
292 //
293 PLATFORM_PCI_DEVICE_PATH gEmmcBootDevPath0 = {
294 gPciRootBridge,
295 PCI_DEVICE_PATH_NODE (0x00, 0x10),
296 gEndEntire
297 };
298
299 //
300 // Predefined platform specific perdict boot option
301 //
302 EFI_DEVICE_PATH_PROTOCOL* gPlatformSimpleBootOption [] = {
303 (EFI_DEVICE_PATH_PROTOCOL*)&gEmmcBootDevPath0,
304 NULL
305 };
306