Add pcie_test.py for testing PCIe ASPM and link speed (New) #2162
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Wait for PR #2166 merge or this github action will failed in unit test.
This PR adds a new test script
pcie_test.pyto validate PCIe device configurations on Ubuntu systems (x86 and ARM64).providers/base/bin/pcie_test.pythat useslspcito verify:Documentation
$ sudo ./pcie_test.py -h usage: pcie_test.py [-h] [--debug] {resource,check_speed,check_aspm} ... A script to test PCIe link state against hardware capability. positional arguments: {resource,check_speed,check_aspm} Available commands resource List all PCIe devices. check_speed Check the link speed and width of a specific PCIe device. check_aspm Check the ASPM state of a specific PCIe device. options: -h, --help show this help message and exit --debug Turn on debug level output for extra info during test run.Usage examples:
Tests
List all PCIe devices:
$ sudo ./pcie_test.py resource Discovering PCIe resources... pcie_num: 0000:00:00.0 pcie_name: Host bridge: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers (rev 01) pcie_num: 0000:00:02.0 pcie_name: VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01) pcie_num: 0000:00:04.0 pcie_name: Signal processing controller: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant (rev 01) pcie_num: 0000:00:0e.0 pcie_name: RAID bus controller: Intel Corporation Volume Management Device NVMe RAID Controller <.... skip ...>Check link speed:
Check ASPM state: