]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c
Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / PlatformBdsLib / PlatformData.c
1 /** @file
2
3 Copyright (c) 2004 - 2014, 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 // Predefined platform default console device path
123 //
124 BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole [] = {
125 {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL},
126 {(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN},
127 {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaKeyboardDevicePath, CONSOLE_IN},
128 {(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN},
129 {NULL, 0}
130 };
131
132 //
133 // All the possible platform PCI VGA device path
134 //
135 EFI_DEVICE_PATH_PROTOCOL* gPlatformAllPossiblePciVgaConsole [] = {
136 (EFI_DEVICE_PATH_PROTOCOL*)&gOnChipPciVgaDevicePath,
137 (EFI_DEVICE_PATH_PROTOCOL*)&gPlugInPciVgaDevicePath,
138 NULL
139 };
140
141 //
142 // Legacy hard disk boot option
143 //
144 LEGACY_HD_DEVICE_PATH gLegacyHd = {
145 {
146 BBS_DEVICE_PATH,
147 BBS_BBS_DP,
148 (UINT8)(sizeof(BBS_BBS_DEVICE_PATH)),
149 (UINT8)((sizeof(BBS_BBS_DEVICE_PATH)) >> 8),
150 BBS_TYPE_HARDDRIVE,
151 0,
152 0
153 },
154 gEndEntire
155 };
156
157 //
158 // Legacy cdrom boot option
159 //
160 LEGACY_HD_DEVICE_PATH gLegacyCdrom = {
161 {
162 BBS_DEVICE_PATH,
163 BBS_BBS_DP,
164 (UINT8)(sizeof(BBS_BBS_DEVICE_PATH)),
165 (UINT8)((sizeof(BBS_BBS_DEVICE_PATH)) >> 8),
166 BBS_TYPE_CDROM,
167 0,
168 0
169 },
170 gEndEntire
171 };
172
173 //
174 // Predefined platform specific perdict boot option
175 //
176 EFI_DEVICE_PATH_PROTOCOL* gPlatformBootOption [] = {
177 (EFI_DEVICE_PATH_PROTOCOL*)&gLegacyHd,
178 (EFI_DEVICE_PATH_PROTOCOL*)&gLegacyCdrom,
179 NULL
180 };
181
182 //
183 // Predefined platform specific driver option
184 //
185 EFI_DEVICE_PATH_PROTOCOL* gPlatformDriverOption [] = {
186 NULL
187 };
188
189 //
190 // Predefined platform connect sequence
191 //
192 EFI_DEVICE_PATH_PROTOCOL* gPlatformConnectSequence [] = {
193 (EFI_DEVICE_PATH_PROTOCOL *)&gPlatformRootBridge0, // Force PCI enumer before Legacy OpROM shadow
194 NULL
195 };
196
197 //
198 // Platform specific USB controller device path
199 //
200 PLATFORM_USB_DEVICE_PATH gUsbDevicePath0 = {
201 gPciRootBridge,
202 PCI_DEVICE_PATH_NODE(0, 0x1D),
203 gEndEntire
204 };
205
206 PLATFORM_USB_DEVICE_PATH gUsbDevicePath1 = {
207 gPciRootBridge,
208 PCI_DEVICE_PATH_NODE(1, 0x1D),
209 gEndEntire
210 };
211
212 PLATFORM_USB_DEVICE_PATH gUsbDevicePath2 = {
213 gPciRootBridge,
214 PCI_DEVICE_PATH_NODE(2, 0x1D),
215 gEndEntire
216 };
217
218 PLATFORM_USB_DEVICE_PATH gUsbDevicePath3 = {
219 gPciRootBridge,
220 PCI_DEVICE_PATH_NODE(3, 0x1D),
221 gEndEntire
222 };
223
224 //
225 // Predefined platform device path for user authtication
226 //
227 EFI_DEVICE_PATH_PROTOCOL* gUserAuthenticationDevice[] = {
228 //
229 // Predefined device path for secure card (USB disk).
230 //
231 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath0,
232 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath1,
233 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath2,
234 (EFI_DEVICE_PATH_PROTOCOL*)&gUsbDevicePath3,
235 NULL
236 };
237
238 //
239 // Predefined platform console device path
240 //
241 BDS_CONSOLE_CONNECT_ENTRY gPlatformSimpleConsole [] = {
242 {(EFI_DEVICE_PATH_PROTOCOL*)&gOnChipPciVgaDevicePath, CONSOLE_OUT},
243 {(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL},
244 {(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN},
245 {(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN},
246 {NULL, 0}
247 };
248
249 //
250 // eMMC device at BDF(0x0, 0x17, 0x0)
251 //
252 PLATFORM_PCI_DEVICE_PATH gEmmcBootDevPath0 = {
253 gPciRootBridge,
254 PCI_DEVICE_PATH_NODE (0x00, 0x10),
255 gEndEntire
256 };
257
258 //
259 // Predefined platform specific perdict boot option
260 //
261 EFI_DEVICE_PATH_PROTOCOL* gPlatformSimpleBootOption [] = {
262 (EFI_DEVICE_PATH_PROTOCOL*)&gEmmcBootDevPath0,
263 NULL
264 };
265