VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.h@ 105670

Last change on this file since 105670 was 99404, checked in by vboxsync, 20 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/** @file
2 Header file for Pci shell Debug1 function.
3
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
7
8**/
9
10#ifndef _EFI_SHELL_PCI_H_
11#define _EFI_SHELL_PCI_H_
12
13typedef enum {
14 PciDevice,
15 PciP2pBridge,
16 PciCardBusBridge,
17 PciUndefined
18} PCI_HEADER_TYPE;
19
20#define INDEX_OF(Field) ((UINT8 *) (Field) - (UINT8 *) mConfigSpace)
21
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)
26
27#define IS_PCIE_SWITCH(DevicePortType) \
28 ((DevicePortType == PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT) || \
29 (DevicePortType == PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT))
30
31#pragma pack(1)
32//
33// Data region after PCI configuration header(for cardbus bridge)
34//
35typedef struct {
36 UINT16 SubVendorId; // Subsystem Vendor ID
37 UINT16 SubSystemId; // Subsystem ID
38 UINT32 LegacyBase; // Optional 16-Bit PC Card Legacy
39 // Mode Base Address
40 //
41 UINT32 Data[46];
42} PCI_CARDBUS_DATA;
43
44typedef union {
45 PCI_DEVICE_HEADER_TYPE_REGION Device;
46 PCI_BRIDGE_CONTROL_REGISTER Bridge;
47 PCI_CARDBUS_CONTROL_REGISTER CardBus;
48} NON_COMMON_UNION;
49
50typedef struct {
51 PCI_DEVICE_INDEPENDENT_REGION Common;
52 NON_COMMON_UNION NonCommon;
53 UINT32 Data[48];
54} PCI_CONFIG_SPACE;
55
56#pragma pack()
57
58#endif // _PCI_H_
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette