【PCIe DL_Feature详解】

DL_Feature的引入

   Data Link Control and Management State Machine在PCIe Gen4引入了DL_Feature这个状态,该状态主要用来协商PCIe link 两端是否支持新的DL Feature,目前为止DL Feature只引入了Scaled Flow Control 来提高Gen4及以上的效率。在这里插入图片描述
  DL_Feature 这个状态是可选的,当 Data Link Feature Extended Capability中Data Link Feature Exchange Enable field为0时状态机就会跳过DL_Feature子状态。

DL Link Feature Protocol 介绍

   链路两端port在DL_Feature子状态通过DL Link Feature Protocol进行协商,判断两端port是否都支持DL_Feature, 为了支持DL_Link Feature,Data Link Feature Extended Capability中包含Data Link Feature Capabilities 和Data Link Feature Status寄存器:
Data Link Feature Capabilities Register:
在这里插入图片描述
在这里插入图片描述

Data Link Feature Status Register:
在这里插入图片描述
在这里插入图片描述

DL_Feature sub-status行为

  1. 进入DL_Feature:
    • Remote Feature Supported valid 和Remote Feature Supported 都要设置都应该为0.
  2. 在DL_Feature子状态:
    • PCIe Link 两端发送DL_Feature DLLP 进行协商,发送的Feature Supported 域要与Data Link Feature Capabilities Register中Local Feature Supported Field 一致,Feature Ack要与Data Link Feature Status Register中Remote_Data_Link_Feature_Supported_Valid保持一致, Remote_Data_Link_Feature_Supported 表示收到的DL_feature 中的Feature_Support 信息有效。
  3. 退出DL_Feature:
    • 收到InitFc1 DLLP
    • 收到Feature Ack
    • 收到MR_IOV Init DLLP

  下面以一个例子来具体说明DL_Feature Protocol:
Example: Local Port Initial DL Link Feature Protocol
Step 1.

  • Local Port transmit DL Link Feature DLL with DL Feature Supported bit equal to Data Link Feature Field in Data Link Control Capability Register
  • DL_Feature ACK = 0

Step 2.

  • Local Port record Remote Feature Supported bit, if Remote Data Link Feature Supported Valid is zero.
  • Check Remote Feature Ack from remote Port.

Step 3.

  • Local Port transmit Remote Feature Ack equal to the Remote_Data_Link_Feature_Supported_Valid recorded from Step 2 to Remote Port.

Note: 只有当为Remote_Data_Link_Feature_Supported_Valid零的时候port才会去采样对端发来的DL_feature中feature support信息.
在这里插入图片描述

### PCIE PM_PME 格式规范解释 #### 消息结构 PME (Power Management Event) 是一种特殊的消息TLP(Transaction Layer Packet)。这种消息源自PCIe端点(EP),PCI Express Legacy 端点或根端口(RP), 并被路由至根联合体(RC)[^2]。 #### 请求ID字段 在PME消息中,`Request ID` 字段表示触发电源管理状态改变的设备身份。这一特性使得系统能够识别哪个具体组件发出了电源状态变更的通知[^2]。 #### 数据格式细节 对于具体的PM_PME数据包而言, 它遵循标准的TLP头部定义,并在其基础上增加了特定于电源管理事件的信息: - **FMT/TYPE**: 设置为 `0b1011_000` 表明这是一个配置读取命令。 - **TC (Traffic Class)** 和其他控制位保持默认值。 - **TD (Tagged)** 及 **AT (Attribution Type)** 均设为零。 - **Length** 被设定成最小长度即 1 DW。 - **Requester ID** 如前所述携带源设备的身份信息。 - **Message Code** 设定为 `0x18`, 这是 PCIe 规范指定用来指示 PME 的代码。 ```cpp struct PciExpressPme { uint32_t fmt_type : 7; // FMT/TYPE field set to indicate a config read command. uint32_t tc : 3; // Traffic class and other control bits are default. uint32_t td_at : 2; // TD and AT both set to zero. uint32_t length : 10; // Length is minimal at one double word. uint32_t requester_id : 16;// Carries the source device identity info. uint32_t msg_code : 8; // Set to '0x18' as specified by PCI-E spec for PME. }; ``` 当Root Complex接收到此类消息之后会将该通知传递给系统的电力管理系统以便采取相应的措施来响应此事件[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值