|
1 | 1 | /** |
2 | 2 | * Copyright Notice: |
3 | | - * Copyright 2023-2024 Intel. All rights reserved. |
| 3 | + * Copyright 2023-2025 Intel. All rights reserved. |
4 | 4 | * License: BSD 3-Clause License. |
5 | 5 | **/ |
6 | 6 |
|
@@ -224,6 +224,115 @@ typedef struct |
224 | 224 | // PCIE_SEL_IDE_STREAM_REG_BLOCK sel_ide_stream_block; // number of elements is dynamic |
225 | 225 | } PCIE_IDE_ECAP; |
226 | 226 |
|
| 227 | +// 7.5.3.1 PCI Express Capability List Register (Offset 00h) |
| 228 | +typedef union |
| 229 | +{ |
| 230 | + struct |
| 231 | + { |
| 232 | + uint8_t id; |
| 233 | + uint8_t next_cap_offset; |
| 234 | + }; |
| 235 | + uint16_t raw; |
| 236 | +} PCIE_CAP_LIST; |
| 237 | + |
| 238 | +// 7.5.3.2 PCI Express Capabilities Register (Offset 02h) |
| 239 | +typedef union |
| 240 | +{ |
| 241 | + struct |
| 242 | + { |
| 243 | + uint16_t cap_version : 4; |
| 244 | + uint16_t dev_port_type : 4; |
| 245 | + uint16_t slot_impl : 1; |
| 246 | + uint16_t interrupt_msg_number : 5; |
| 247 | + uint16_t undefined : 1; |
| 248 | + uint16_t flit_mode_supported : 1; |
| 249 | + }; |
| 250 | + uint16_t raw; |
| 251 | +} PCIE_CAP; |
| 252 | + |
| 253 | +// 7.5.3.6 Link Capabilities Register (Offset 0Ch) |
| 254 | +typedef union |
| 255 | +{ |
| 256 | + struct |
| 257 | + { |
| 258 | + uint32_t max_link_speed : 4; |
| 259 | + uint32_t max_link_width : 6; |
| 260 | + uint32_t aspm_support : 2; |
| 261 | + uint32_t l0s_exit_latency : 3; |
| 262 | + uint32_t l1_exit_latency : 3; |
| 263 | + uint32_t clock_power_management : 1; |
| 264 | + uint32_t surprise_down_error_reporting : 1; |
| 265 | + uint32_t dll_active_reporting : 1; |
| 266 | + uint32_t link_bandwidth_notification : 1; |
| 267 | + uint32_t aspm_optionality : 1; |
| 268 | + uint32_t rsvd : 1; |
| 269 | + uint32_t port_number : 8; |
| 270 | + }; |
| 271 | + uint32_t raw; |
| 272 | +} PCIE_LINK_CAP; |
| 273 | + |
| 274 | +// 7.5.3.7 Link Control Register (Offset 10h) |
| 275 | +typedef union |
| 276 | +{ |
| 277 | + struct |
| 278 | + { |
| 279 | + uint16_t aspm_control : 2; |
| 280 | + uint16_t ptm_propagation_delay_adaption_interpretation_b : 1; |
| 281 | + uint16_t read_completion_boundary : 1; |
| 282 | + uint16_t link_disable : 1; |
| 283 | + uint16_t retrain_link : 1; |
| 284 | + uint16_t common_clock_config : 1; |
| 285 | + uint16_t extended_synch : 1; |
| 286 | + uint16_t enable_clock_power_management : 1; |
| 287 | + uint16_t hardware_autonomous_width_disable : 1; |
| 288 | + uint16_t link_bandwidth_management_interrupt_enable : 1; |
| 289 | + uint16_t link_autonomous_bandwidth_interrupt_enable : 1; |
| 290 | + uint16_t sris_clocking : 1; |
| 291 | + uint16_t flit_mode_disable : 1; |
| 292 | + uint16_t drs_signaling_control : 2; |
| 293 | + }; |
| 294 | + uint16_t raw; |
| 295 | +} PCIE_LINK_CTRL; |
| 296 | + |
| 297 | +// 7.5.3.8 Link Status Register (Offset 12h) |
| 298 | +typedef union |
| 299 | +{ |
| 300 | + struct |
| 301 | + { |
| 302 | + uint16_t current_link_speed : 4; |
| 303 | + uint16_t negotiated_link_width : 6; |
| 304 | + uint16_t undefined : 1; |
| 305 | + uint16_t link_training : 1; |
| 306 | + uint16_t slot_clock_config : 1; |
| 307 | + uint16_t data_link_layer_active : 1; |
| 308 | + uint16_t link_bandwidth_management_status : 1; |
| 309 | + uint16_t link_autonomous_bandwidth_status : 1; |
| 310 | + }; |
| 311 | + uint16_t raw; |
| 312 | +} PCIE_LINK_STATUS; |
| 313 | + |
| 314 | +// 7.5.3.20 Link Status 2 Register (Offset 32h) |
| 315 | +typedef union |
| 316 | +{ |
| 317 | + struct |
| 318 | + { |
| 319 | + uint16_t current_deemphasis_level : 1; |
| 320 | + uint16_t equalization_8gt_complete : 1; |
| 321 | + uint16_t equalization_8gt_phase1_successful : 1; |
| 322 | + uint16_t equalization_8gt_phase2_successful : 1; |
| 323 | + uint16_t equalization_8gt_phase3_successful : 1; |
| 324 | + uint16_t link_equalization_request_8gt : 1; |
| 325 | + uint16_t retimer_presence_detected : 1; |
| 326 | + uint16_t two_retimers_presence_detected : 1; |
| 327 | + uint16_t crosslink_resolution : 2; |
| 328 | + uint16_t flit_mode_status : 1; |
| 329 | + uint16_t rsvdz : 1; |
| 330 | + uint16_t downstream_component_presence : 3; |
| 331 | + uint16_t drs_message_received : 1; |
| 332 | + }; |
| 333 | + uint16_t raw; |
| 334 | +} PCIE_LINK_STATUS2; |
| 335 | + |
227 | 336 | #pragma pack(0) |
228 | 337 |
|
229 | 338 | // 6.33.3 IDE Key Management |
@@ -272,6 +381,8 @@ enum PCIE_IDE_STREAM_KEY_SUB_STREAM_ENUM { |
272 | 381 | #define IDE_STREAM_STATUS_SECURE 2 |
273 | 382 | #define IDE_STREAM_STATUS_INSECURE 0 |
274 | 383 |
|
| 384 | +#define PCIE_CAPABILITY_ID 0x10 |
| 385 | + |
275 | 386 | #define PCIE_CONFIG_SPACE_SIZE 0x1000 |
276 | 387 | #define PCIE_EXT_CAP_START 0x100 |
277 | 388 |
|
|
0 commit comments