PCIe扫盲——TLP Header详解(四)

转:http://blog.chinaaet.com/justlxy/p/5100053463

PCIe中的Message主要是为了替代PCI中采用边带信号,这些边带信号的主要功能是中断,错误报告和电源管理等。所有的Message请求采用的都是4DW的TLP Header,但是并不是所有的空间都被利用上了,例如有的Message就没有使用Byte8到Byte15的空间。

Message请求的TLP Header格式如下图所示:

blob.png

blob.png

blob.png

blob.png

上面的表格中提到了,Message主要有九个类型:

1.    INTx Interrupt Signaling

2.    Power Management

3.    Error Signaling

4.    Locked Transaction Support

5.    Slot Power Limit Support

6.    Vendor‐Defined Messages

7.    Ignored Messages (related to Hot‐Plug support in spec revision 1.1)

8.    Latency Tolerance Reporting (LTR)

9.    Optimized Buffer Flush and Fill (OBFF)

下面将分别进行介绍一下,

INTx Interrupt Messages(中断消息)

PCI 2.3提出了MSI(Message Signaled Interrupt),但是早期的PCI并不支持这一功能,PCIe为此定义了一种Virtual Wire来模拟PCI的中断引脚(INTA-INTD)。如下图所示:

blob.png

INTx Message的使用规则如下:

·        They have no data payload and so the Length field is reserved.

·        They’re only issued by Upstream Ports. Checking this rule for received packets is optional but, if checked, violations will be handled as Malformed TLPs.

·        They are required to use the default traffic class TC0. Receivers must check for this and violations will be handled as Malformed TLPs.

·        Components at both ends of the Link must track the current state of the four virtual interrupts. If the logical state of one interrupt changes at the Upstream Port, it must send the appropriate INTx message.

·        INTx signaling is disabled when the Interrupt Disable bit of the Command Register is set = 1 (as would be the case for physical interrupt lines).

·        If any virtual INTx signals are active when the Interrupt Disable bit is set in the device, the Upstream Port must send corresponding Deassert_INTx messages.

·        Switches must track the state of the four INTx signals independently for each Downstream Port and combine the states for the Upstream Port.

·        The Root Complex must track the state of the four INTx lines independently and convert them into system interrupts in an implementation‐specific way.

·        They use the routing type “Local‐Terminate at Receiver” to allow a Switch to remap the designated interrupt pin when. Consequently, the Requester ID in an INTx message may be assigned by the last transmitter.

Power Management Messages(电源管理消息)

blob.png

Power Management Messages使用规则如下:

·        Power Management Messages don’t have a data payload, so the Length field is reserved.

·        They are required to use the default traffic class TC0. Receivers must check for this and handle violations as Malformed TLPs.

·        PM_Active_State_Nak is sent from a Downstream Port after it observes a request from the Link neighbor to change the Link power state to L1 but it has chosen not to do so (Local ‐ Terminate at Receiver routing).

·        PM_PME is sent upstream by the component requesting a Power Management Event (Implicitly Routed to the Root Complex).

·        PM_Turn_Off is sent downstream to all endpoints (Implicitly Broadcast from the Root Complex routing).

·        PME_TO_Ack is sent upstream by endpoints. For switches with multiple Downstream Ports, this message won’t be forwarded upstream until all Downstream Ports have received it (Gather and Route to the Root Complex routing).

Error Messages(错误消息)

blob.png

Error Message使用规则如下:

·        They are required to use the default traffic class TC0. Receivers must check for this and handle violations as Malformed TLPs.

·        They don’t have a data payload, so the Length field is reserved.

·        The Root Complex converts Error Messages into system‐specific events.

Locked Transaction Support

blob.png

Unlock Message使用规则:

·        They are required to use the default traffic class TC0. Receivers must check for this and handle violations as Malformed TLPs.

·        They don’t have a data payload, and the Length field is reserved.

Set Slot Power Limit Message

 blob.png

Set_Slot_Power_Limit Message使用规则:

·        They’re required to use the default traffic class TC0. Receivers must check for this and handle violations as Malformed TLPs.

·        The data payload is 1 DW and so the Length field is set to one. Only the lower 10 bits of the 32‐bit data payload are used for slot power scaling; the upper payload bits must be set to zero.

·        This message is sent automatically anytime the Data Link Layer transitions to DL_Up status or if a configuration write to the Slot Capabilities Register occurs while the Data Link Layer is already reporting DL_Up status.

·        If the card in the slot already consumes less power than the power limit specified, it’s allowed to ignore the Message.

Vendor‐Defined Message 0 and 1

blob.png

blob.pngv

厂商自定义Message使用规则:

·        A data payload may or may not be included with either type.

·        2. Messages are distinguished by the Vendor ID field.

·        3. Attribute bits [2] and [1:0] are not reserved.

·        4. If the Receiver doesn’t recognize the Message:

• Type 1 Messages are silently discarded

• Type 0 Messages are treated as an Unsupported Request error condition

Ignored Messages

blob.png

Hot Plug Message使用规则:

·        They are driven by a Downstream Port to the card in the slot.

·        The Attention Button Message is driven upstream by a slot device.

Latency Tolerance Reporting Message

blob.png

blob.png

LTR Message使用规则:

·        They are required to use the default traffic class TC0. Receivers must check for this and handle violations as Malformed TLPs.

·        They do not have a data payload, and the Length field is reserved.

Optimized Buffer Flush and Fill Messages

blob.png

blob.png

OBFF Message使用规则:

·        They are required to use the default traffic class TC0. Receivers must check for this and handle violations as Malformed TLPs.

·        They do not have a data payload, and the Length field is reserved.

·        The Requester ID must be set to the Transmitting Port’s ID.

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
PCI Express (PCIe) TLP (Transaction Layer Packet) 是 PCI Express 协议的一个重要部分,它用于在不同的 PCIe 设备之间传输数据。PCIe TLP 由四个部分组成:头部、有效载荷、可选的可扩展有效载荷和 FCS(帧校验序列)。 具体来说,PCIe TLP 的格式如下: |---------------------------| | PCIe TLP 头部 (12 字节) | |---------------------------| | 有效载荷 (0 - 1024 字节) | |---------------------------| | 可扩展有效载荷 (0 - 1024 字节) | |---------------------------| | FCS(帧校验序列)(4 字节) | |---------------------------| PCIe TLP 头部包括以下字段: - TC(传输类别):指定 TLP 的类型,比如请求(Memory Read/Write)、Completion 等。 - TD(传输方向):指定 TLP 的传输方向,是从上游设备到下游设备还是相反。 - EP(端点):指定 TLP 的目标设备端口号。 - Length(长度):指定有效载荷的长度。 - First DW BE(第一个双字节字节 Enable):指定有效载荷的第一个双字节的哪些字节是有效的。 - Last DW BE(最后一个双字节字节 Enable):指定有效载荷的最后一个双字节的哪些字节是有效的。 - Tag(标签):可选字段,用于匹配请求和 Completion TLP。 - Requester ID(请求者 ID):可选字段,用于标识发起 TLP 的设备。 - Completer ID(完成者 ID):可选字段,用于标识处理 TLP 的设备。 PCIe TLP 的有效载荷可以是数据、地址或控制信息。可扩展有效载荷在某些情况下用于传输额外的数据或信息。FCS 是一个校验序列,用于检测传输中的错误。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值