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