linux aspm,The ASPM issues on Linux 3.2 kernel

Some questions about ASPM

1.What is ASPM

ASPM stands for Active StatePowerManagement. It is a feature to save power when PCIE link is idle.

2.Related Bits about ASPMASPM support and compliance Bit

The first related bits are in PCIE Express Capability Structure,its name is link capabilities Register (offset 0CH)49a33fdf8370ae06de13f7c3e2c56bb0.png

ASPM Optionality Compliance:used to indicate whether it conforms to current specification.

ASPM Support: used to showwhether ASPM is supported.

The second relevant bit is inPCIE Root Complex Internal Link Control capabilities with name Root complexLink control Registers:

f872fad311d7ca2580c7c8f863532409.png

It is used to disable/enable ASPM.

Link Bandwidth Management Bit

This bit is used toindicate PCIE link width/speed changed or re-training occurs.

6a700d41d007f5fa4a3d458804aa4dbf.png3.Software behavior about ASPM

After scanning PCI buses anddevices, kernel will check whether ASPM is supported && enabled and thenbegin do ASPM initialization. During the ASPM initialization, Re-train controlBit will be set to trigger a PCIE link re-training. This behavior will triggerthe Link Bandwidth management Status Bit of Link Status Register (Offset 12H)in PCIE Capability Structure to be set.  For Eos platform, this bit will getpci_link_bandwidth_changed_status (Vendor Specific Information Capabilities: offset 30H)to be set according to followingrule:

ebbfe6249cc0784b36e012d6e3aa0185.png

Once SMI is triggered,   The SMI handler will pollpci_link_bandwidth_changed_status bit and post warning SEL as following if thebit has been set:

1 | 03/04/2015 |01:06:38 | PCI-e Device Errors CPU Integrated I/O 0 | Non-Fatal Error Detected| Asserted | bus:0x00 dev:0x01 func:0x00  // Root port of SLOT 3

ELOG(65) PCI link bandwidth changed status. Bus:00H Dev:01H Fn:00H PS:C0H

2 | 03/04/2015 |01:06:38 | PCI-e Device Errors CPU Integrated I/O 0 | Non-Fatal Error Detected| Asserted | bus:0x00 dev:0x02 func:0x00 // Root port of SLOT 0

ELOG(65) PCI link bandwidth changed status. Bus:00H Dev:02H Fn:00H PS:C0H

3 | 03/04/2015 |01:06:38 | PCI-e Device Errors CPU Integrated I/O 0 | Non-Fatal Error Detected| Asserted | bus:0x00 dev:0x02 func:0x02  // Root port of on-board PMC SAS

ELOG(65) PCI link bandwidth changed status.Bus:00H Dev:02H Fn:02H PS:C0H

Then the Bit is cleared bySMI handler. While in older platform, although the Link Bandwidth management Status Bitis also set, we never see any SEL/warning/Alert for this Bit.

If ASPM is not supported ordisabled, The ASPM initialization should be skipped after PCI scanning duringkernel boot phase.

4.Concerns about ASPM

Do we need enableASPM feature?

Currently, the ASPM isenabled and running, that is why all root port with SLIC inserted has beenre-trained. However, neither older nor new platform has SLOTs which ASPM feature is supported,although I did see some PCIE/intel device has ASPM support.

Why fail to disable ASPM in kernel?

Per the code in drivers/pci/pcie/aspm.c,ASPM can be forced off with appended “pcie_aspm=off” option in kernel commandline, then there won’t be any PCIE link re-training, however I still find theLink Bandwidth Management Bit is set with the option in kernel command line.The appended option “pcie_aspm=off” doesn’t work well until I changed the codeinpcie_aspm_sanity_check() as following:

/*

* If ASPM is disabled thenwe're not going to change

* the BIOS state. It's safe tocontinue even if it's a

* pre-1.1 device

*/

if (aspm_disabled)

return -EINVAL;

//continue;……………………………….

It seems to be a linux kernel, we have filed a bug for that.

If ASPM need tobe enabled, the SEL in new platform is not expected, correct? If ASPM is not required, dowe need/have other daemon to monitor related Link Bandwidth Bit?

Take Link width management Bit for example, the bit will be set if linkwidth/speed has changed (this has already been monitored by sms on older and new platform) or Link re-training occurs, should system management software takecare of the re-training case?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值