]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/PciPlatform/BoardPciPlatform.c
MdeModulePkg: Fix use-after-free error in InstallConfigurationTable()
[mirror_edk2.git] / Vlv2TbltDevicePkg / PciPlatform / BoardPciPlatform.c
CommitLineData
3cbfba02
DW
1/** @file\r
2\r
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
4 \r\r
5 This program and the accompanying materials are licensed and made available under\r\r
6 the terms and conditions of the BSD License that accompanies this distribution. \r\r
7 The full text of the license may be found at \r\r
8 http://opensource.org/licenses/bsd-license.php. \r\r
9 \r\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
12 \r\r
13\r
14Module Name:\r
15\r
16\r
17 BoardPciPlatform.c\r
18\r
19Abstract:\r
20\r
21Revision History:\r
22--*/\r
23\r
24\r
25#include "PciPlatform.h"\r
26#include "PchRegs.h"\r
27#include "VlvAccess.h"\r
28\r
29#define R_INTEL_LAN_VENDOR_ID 0x00\r
30#define V_INTEL_LAN_VENDOR_ID 0x8086 // INTEL 82574 Gbe Controller Vendor ID\r
31#define R_INTEL_LAN_DEVICE_ID 0x02\r
32#define V_INTEL_LAN_DEVICE_ID 0x153E // INTEL 82574 Gbe Controller Device ID\r
33\r
34//\r
35// Global variables for Option ROMs\r
36//\r
37\r
38#define ONBOARD_VIDEO_OPTION_ROM_FILE_GUID \\r
39{ 0xF2FE1FAA, 0xF04A, 0x4ba1, 0xAE, 0x73, 0xD1, 0x84, 0x6A, 0x6C, 0xD6, 0xD8 }\r
40\r
41#define PXE_UNDI_OPTION_ROM_INTELPXE_GUID \\r
42{0x49F2C48B, 0x4D8E, 0x4238, 0x8D, 0x82, 0x9B, 0x27, 0xF4, 0x38, 0x44, 0xB0}\r
43\r
44#define SATA_AHCI_ROM_GUID \\r
45 {0x592bfc62, 0xd817, 0x4d1a, 0x86, 0xf8, 0x33, 0x33, 0x4c, 0x9e, 0x90, 0xd8}\r
46\r
47#define NULL_ROM_FILE_GUID \\r
48{ 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }\r
49\r
50PCI_OPTION_ROM_TABLE mPciOptionRomTable[] = {\r
51 { ONBOARD_VIDEO_OPTION_ROM_FILE_GUID, 0, 0, 0x02, 0, IGD_VID, IGD_DID_VLV_A0, 0},\r
52 { ONBOARD_VIDEO_OPTION_ROM_FILE_GUID, 0, 0, 0x02, 0, IGD_VID, IGD_DID, 0}, // Desktop/Mobile IGD\r
53 { ONBOARD_VIDEO_OPTION_ROM_FILE_GUID, 0, 0, 0x02, 0, IGD_VID, IGD_DID_II, 0}, // Desktop/Mobile IGD\r
54 { ONBOARD_VIDEO_OPTION_ROM_FILE_GUID, 0, 0, 0x02, 0, IGD_VID, IGD_DID_QS, 0},\r
55 { NULL_ROM_FILE_GUID, 0, 0, 0, 0, 0xffff, 0xffff, 0}\r
56};\r
57\r
58UINTN mSizeOptionRomTable = sizeof(mPciOptionRomTable)/sizeof(PCI_OPTION_ROM_TABLE);\r
59\r
60\r