]>
Commit | Line | Data |
---|---|---|
5d73d92f | 1 | /** @file\r |
2 | Header file for Pci shell Debug1 function.\r | |
3 | \r | |
541ddf44 | 4 | Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\r |
0c84a69f | 5 | Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>\r |
56ba3746 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
5d73d92f | 7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef _EFI_SHELL_PCI_H_\r | |
11 | #define _EFI_SHELL_PCI_H_\r | |
12 | \r | |
13 | typedef enum {\r | |
14 | PciDevice,\r | |
15 | PciP2pBridge,\r | |
16 | PciCardBusBridge,\r | |
17 | PciUndefined\r | |
18 | } PCI_HEADER_TYPE;\r | |
19 | \r | |
47d20b54 | 20 | #define INDEX_OF(Field) ((UINT8 *) (Field) - (UINT8 *) mConfigSpace)\r |
5d73d92f | 21 | \r |
5d73d92f | 22 | #define IS_PCIE_ENDPOINT(DevicePortType) \\r |
0c84a69f RN |
23 | ((DevicePortType) == PCIE_DEVICE_PORT_TYPE_PCIE_ENDPOINT || \\r |
24 | (DevicePortType) == PCIE_DEVICE_PORT_TYPE_LEGACY_PCIE_ENDPOINT || \\r | |
25 | (DevicePortType) == PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_INTEGRATED_ENDPOINT)\r | |
5d73d92f | 26 | \r |
27 | #define IS_PCIE_SWITCH(DevicePortType) \\r | |
0c84a69f RN |
28 | ((DevicePortType == PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT) || \\r |
29 | (DevicePortType == PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT))\r | |
5d73d92f | 30 | \r |
31 | #pragma pack(1)\r | |
5d73d92f | 32 | //\r |
33 | // Data region after PCI configuration header(for cardbus bridge)\r | |
34 | //\r | |
35 | typedef struct {\r | |
47d20b54 MK |
36 | UINT16 SubVendorId; // Subsystem Vendor ID\r |
37 | UINT16 SubSystemId; // Subsystem ID\r | |
38 | UINT32 LegacyBase; // Optional 16-Bit PC Card Legacy\r | |
5d73d92f | 39 | // Mode Base Address\r |
40 | //\r | |
47d20b54 | 41 | UINT32 Data[46];\r |
5d73d92f | 42 | } PCI_CARDBUS_DATA;\r |
43 | \r | |
a1d4bfcc | 44 | typedef union {\r |
47d20b54 MK |
45 | PCI_DEVICE_HEADER_TYPE_REGION Device;\r |
46 | PCI_BRIDGE_CONTROL_REGISTER Bridge;\r | |
47 | PCI_CARDBUS_CONTROL_REGISTER CardBus;\r | |
a1d4bfcc | 48 | } NON_COMMON_UNION;\r |
49 | \r | |
5d73d92f | 50 | typedef struct {\r |
47d20b54 MK |
51 | PCI_DEVICE_INDEPENDENT_REGION Common;\r |
52 | NON_COMMON_UNION NonCommon;\r | |
53 | UINT32 Data[48];\r | |
5d73d92f | 54 | } PCI_CONFIG_SPACE;\r |
55 | \r | |
5d73d92f | 56 | #pragma pack()\r |
57 | \r | |
58 | #endif // _PCI_H_\r |