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