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 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef _EFI_SHELL_PCI_H_
11 #define _EFI_SHELL_PCI_H_
20 #define INDEX_OF(Field) ((UINT8 *) (Field) - (UINT8 *) mConfigSpace)
22 #define IS_PCIE_ENDPOINT(DevicePortType) \
23 ((DevicePortType) == PCIE_DEVICE_PORT_TYPE_PCIE_ENDPOINT || \
24 (DevicePortType) == PCIE_DEVICE_PORT_TYPE_LEGACY_PCIE_ENDPOINT || \
25 (DevicePortType) == PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_INTEGRATED_ENDPOINT)
27 #define IS_PCIE_SWITCH(DevicePortType) \
28 ((DevicePortType == PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT) || \
29 (DevicePortType == PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT))
33 // Data region after PCI configuration header(for cardbus bridge)
36 UINT16 SubVendorId
; // Subsystem Vendor ID
37 UINT16 SubSystemId
; // Subsystem ID
38 UINT32 LegacyBase
; // Optional 16-Bit PC Card Legacy
45 PCI_DEVICE_HEADER_TYPE_REGION Device
;
46 PCI_BRIDGE_CONTROL_REGISTER Bridge
;
47 PCI_CARDBUS_CONTROL_REGISTER CardBus
;
51 PCI_DEVICE_INDEPENDENT_REGION Common
;
52 NON_COMMON_UNION NonCommon
;