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