2 Header file for Pci shell Debug1 function.
4 Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
5 Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _EFI_SHELL_PCI_H_
17 #define _EFI_SHELL_PCI_H_
26 #define INDEX_OF(Field) ((UINT8 *) (Field) - (UINT8 *) mConfigSpace)
28 #define IS_PCIE_ENDPOINT(DevicePortType) \
29 ((DevicePortType) == PCIE_DEVICE_PORT_TYPE_PCIE_ENDPOINT || \
30 (DevicePortType) == PCIE_DEVICE_PORT_TYPE_LEGACY_PCIE_ENDPOINT || \
31 (DevicePortType) == PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_INTEGRATED_ENDPOINT)
33 #define IS_PCIE_SWITCH(DevicePortType) \
34 ((DevicePortType == PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT) || \
35 (DevicePortType == PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT))
39 // Data region after PCI configuration header(for cardbus bridge)
42 UINT16 SubVendorId
; // Subsystem Vendor ID
43 UINT16 SubSystemId
; // Subsystem ID
44 UINT32 LegacyBase
; // Optional 16-Bit PC Card Legacy
51 PCI_DEVICE_HEADER_TYPE_REGION Device
;
52 PCI_BRIDGE_CONTROL_REGISTER Bridge
;
53 PCI_CARDBUS_CONTROL_REGISTER CardBus
;
57 PCI_DEVICE_INDEPENDENT_REGION Common
;
58 NON_COMMON_UNION NonCommon
;