1 | /** @file
|
---|
2 | Support for the PCI Express 6.0 standard.
|
---|
3 |
|
---|
4 | This header file may not define all structures. Please extend as required.
|
---|
5 |
|
---|
6 | Copyright (c) 2024, American Megatrends International LLC. All rights reserved.<BR>
|
---|
7 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
8 |
|
---|
9 | **/
|
---|
10 |
|
---|
11 | #ifndef PCIEXPRESS60_H_
|
---|
12 | #define PCIEXPRESS60_H_
|
---|
13 |
|
---|
14 | #include <IndustryStandard/PciExpress50.h>
|
---|
15 |
|
---|
16 | /// The Physical Layer PCI Express Extended Capability definitions.
|
---|
17 | ///
|
---|
18 | /// Based on section 7.7.7 of PCI Express Base Specification 6.0.
|
---|
19 | ///@{
|
---|
20 | #define PCI_EXPRESS_EXTENDED_CAPABILITY_PHYSICAL_LAYER_64_0_ID 0x0031
|
---|
21 | #define PCI_EXPRESS_EXTENDED_CAPABILITY_PHYSICAL_LAYER_64_0_VER1 0x1
|
---|
22 |
|
---|
23 | // Register offsets from Physical Layer PCI-E Ext Cap Header
|
---|
24 | #define PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_CAPABILITIES_OFFSET 0x04
|
---|
25 | #define PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_CONTROL_OFFSET 0x08
|
---|
26 | #define PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_STATUS_OFFSET 0x0C
|
---|
27 | #define PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_LANE_EQUALIZATION_CONTROL_OFFSET 0x10
|
---|
28 |
|
---|
29 | #define PCI_EXPRESS_EXTENDED_CAPABILITY_DEVICE3_ID 0x002F
|
---|
30 | #define PCI_EXPRESS_EXTENDED_CAPABILITY_DEVICE3_VER1 0x1
|
---|
31 |
|
---|
32 | #define EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_3_OFFSET 0x04
|
---|
33 | #define EFI_PCIE_CAPABILITY_DEVICE_CONTROL_3_OFFSET 0x08
|
---|
34 | #define EFI_PCIE_CAPABILITY_DEVICE_STATUS_3_OFFSET 0x0C
|
---|
35 |
|
---|
36 | #pragma pack(1)
|
---|
37 |
|
---|
38 | typedef union {
|
---|
39 | struct {
|
---|
40 | UINT32 Reserved : 32; // Reserved bit 0:31
|
---|
41 | } Bits;
|
---|
42 | UINT32 Uint32;
|
---|
43 | } PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_CAPABILITIES;
|
---|
44 |
|
---|
45 | typedef union {
|
---|
46 | struct {
|
---|
47 | UINT32 Reserved : 32; // Reserved bit 0:31
|
---|
48 | } Bits;
|
---|
49 | UINT32 Uint32;
|
---|
50 | } PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_CONTROL;
|
---|
51 |
|
---|
52 | typedef union {
|
---|
53 | struct {
|
---|
54 | UINT32 EqualizationComplete : 1; // bit 0
|
---|
55 | UINT32 EqualizationPhase1Success : 1; // bit 1
|
---|
56 | UINT32 EqualizationPhase2Success : 1; // bit 2
|
---|
57 | UINT32 EqualizationPhase3Success : 1; // bit 3
|
---|
58 | UINT32 LinkEqualizationRequest : 1; // bit 4
|
---|
59 | UINT32 TransmitterPrecodingOn : 1; // bit 5
|
---|
60 | UINT32 TransmitterPrecodeRequest : 1; // bit 6
|
---|
61 | UINT32 NoEqualizationNeededRcvd : 1; // bit 7
|
---|
62 | UINT32 Reserved : 24; // Reserved bit 8:31
|
---|
63 | } Bits;
|
---|
64 | UINT32 Uint32;
|
---|
65 | } PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_STATUS;
|
---|
66 |
|
---|
67 | typedef union {
|
---|
68 | struct {
|
---|
69 | UINT8 DownstreamPortTransmitterPreset : 4; // bit 0..3
|
---|
70 | UINT8 UpstreamPortTransmitterPreset : 4; // bit 4..7
|
---|
71 | } Bits;
|
---|
72 | UINT8 Uint8;
|
---|
73 | } PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_LANE_EQUALIZATION_CONTROL;
|
---|
74 |
|
---|
75 | typedef struct {
|
---|
76 | PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header;
|
---|
77 | PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_CAPABILITIES Capablities;
|
---|
78 | PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_CONTROL Control;
|
---|
79 | PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_STATUS Status;
|
---|
80 | PCI_EXPRESS_REG_PHYSICAL_LAYER_64_0_LANE_EQUALIZATION_CONTROL LaneEqualizationControl[1];
|
---|
81 | } PCI_EXPRESS_EXTENDED_CAPABILITIES_PHYSICAL_LAYER_64_0;
|
---|
82 | ///@}
|
---|
83 |
|
---|
84 | typedef union {
|
---|
85 | struct {
|
---|
86 | UINT32 DmwrRequestRouting : 1; // bit 0
|
---|
87 | UINT32 FourteenBitTagCompleter : 1; // bit 1
|
---|
88 | UINT32 FourteenBitTagRequester : 1; // bit 2
|
---|
89 | UINT32 ReceiverL0p : 1; // bit 3
|
---|
90 | UINT32 PortL0pExitLatencyLatency : 3; // bit 4..6
|
---|
91 | UINT32 RetimerL0pExit : 3; // bit 7..9
|
---|
92 | UINT32 Reserved : 22; // bit 10..31
|
---|
93 | } Bits;
|
---|
94 | UINT32 Uint32;
|
---|
95 | } PCI_REG_PCIE_DEVICE_CAPABILITY3;
|
---|
96 |
|
---|
97 | typedef union {
|
---|
98 | struct {
|
---|
99 | UINT32 DmwrRequesterEnable : 1; // bit 0
|
---|
100 | UINT32 DmwrEgressBlocking : 1; // bit 1
|
---|
101 | UINT32 FourteenBitTagRequesterEnable : 1; // bit 2
|
---|
102 | UINT32 L0pEnable : 1; // bit 3
|
---|
103 | UINT32 TargetLinkWidth : 3; // bit 4..6
|
---|
104 | UINT32 Reserved : 25; // bit 7..31
|
---|
105 | } Bits;
|
---|
106 | UINT32 Uint32;
|
---|
107 | } PCI_REG_PCIE_DEVICE_CONTROL3;
|
---|
108 |
|
---|
109 | typedef union {
|
---|
110 | struct {
|
---|
111 | UINT32 InitialLinkWidth : 3; // bit 0..2
|
---|
112 | UINT32 SegmentCaptured : 1; // bit 3
|
---|
113 | UINT32 RemoteL0pSupported : 1; // bit 4
|
---|
114 | UINT32 Reserved : 27; // bit 5..31
|
---|
115 | } Bits;
|
---|
116 | UINT32 Uint32;
|
---|
117 | } PCI_REG_PCIE_DEVICE_STATUS3;
|
---|
118 |
|
---|
119 | #pragma pack()
|
---|
120 |
|
---|
121 | #endif
|
---|