PCI_ER_06: replace coarse DPC link-recovery waits with bounded polling
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with test_pool/exerciser/e024.c and trace the PCI_ER_06 DPC recovery check after Secondary Bus Reset deassertion. Review its timeout and DLL Link Active handling, then validate bounded polling against the stated deadline and failure cases while preserving the separate initialization delay and cleanup. Done means recovery succeeds only when observed within 100 ms and the existing endpoint and error-mode coverage still passes.
Written by the indexing model from the issue text.
Description
Summary
The DPC functionality check in test_pool/exerciser/e024.c spends unnecessary time waiting for link recovery after Secondary Bus Reset (SBR). Polling DLL Link Active with an architectural-counter deadline reduced this check's elapsed simulated time from approximately 332.9 ms to 174.0 ms (47.7%) on one emulation platform, with the check passing.
Current behavior
After deasserting SBR, the check:
- Executes an uncalibrated
TIMEOUT_LARGEspin. - Reads DLL Link Active.
- If the link is inactive and reporting is supported, requests a 100 ms delay before checking again.
This cannot detect recovery during the requested delay, even if the link becomes active much sooner. The spin also does not provide a portable time-based recovery window.
There is a separate 100 ms post-link initialization delay. That delay is not the target of this proposal.
Proposed change
Replace the spin and one-shot recovery delay with:
- An immediate DLL Link Active check, followed by 1 ms polling-delay requests.
- A 100 ms recovery window measured using
val_get_timeout_to_ticks()andArmArchTimerReadReg(CntPct), rather than the number of requested delays. - Success as soon as the link is observed active within the deadline; failure if it remains inactive or is first observed active after the deadline.
- Explicit failure for invalid counter frequency, failed delay calls, or unsupported/unexpected link-status reporting.
Counter-based accounting matters because a PAL may scale delay requests. Counting polling iterations instead could unintentionally shorten the recovery window.
Preserve the SBR assertion hold time, separate post-link initialization delay, both error-injection modes, endpoint coverage, configuration restoration, and existing cleanup.
Behavioral point for review: unsupported DLL Link Active reporting previously could continue without demonstrating recovery. The proposed implementation fails recovery in that case; this is an intentional stricter behavior, not merely a timing change.
Validation
On an emulation configuration with eight exerciser endpoints and two error modes per endpoint:
| Version | PCI_ER_06 elapsed simulated time | Result |
|---|---|---|
| Before | 332.866 ms | Passed |
| With bounded polling | 173.954 ms | Passed |
The updated run exercised all eight endpoints, with two recovery iterations per endpoint. These are check-local timings, not whole-suite or wall-clock improvements. The platform scales PAL delays, so the percentage should not be assumed to apply to other platforms. Full-suite validation is still in progress.
Additional validation:
- 13 actual-source host scenarios passed at both
-O0and-O2, covering immediate/early recovery, scaled delays, deadline boundaries, persistent link-down, late status reads, unsupported/unexpected status, delay failure, invalid counter frequency, and counter wraparound. - The changed source cross-compiled for AArch64 with GCC 13.2 at both optimization levels, with
-Wall -Wextra -Werror.
An implementation and focused regression tests are prepared for a follow-up PR.
- Dominant language
- C
- Stars
- 23
- Forks
- 40
- Avg merge
- 6h 36m
- Merged PRs (30d)
- 92
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ARM-software/sysarch-acs
-
e040 (CXL_02) sends its device-to-memory DMA with AT=Translated but an untranslated IOVA, corrupting memory and aborting the ACS runPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ARM-software/sysarch-acs#634 ·
Maintainers usually reply within 1 day
-
SMMU_03 (i033, test 333) gates SMMU_IDR5.D128 on FEAT_LSE2; should the gate be FEAT_D128?Possibly taken @chetan-rathore claimed this 22 days ago. Openbsa
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ARM-software/sysarch-acs#600 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
sbsa-acs : S_L7ENT_1 test coverage mismatch between testcase checklist and NIST user guidePossibly taken @chetan-rathore claimed this 22 days ago. Opensbsa
Difficulty 1/5 Under an hour Newbie friendliness 85/100
ARM-software/sysarch-acs#525 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 52/100
ARM-software/sysarch-acs#676 ·
Maintainers usually reply within 1 day
-
p004/p005 (PCI_IN_13) leave 0xABABABAB in endpoint BAR memory, corrupting the MSI-X table so later PCI_MSI_2 / S_L3GI_02 failPossibly taken @La1itchauhan claimed this 6 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
ARM-software/sysarch-acs#650 · 1 comment ·
Maintainers usually reply within 1 day
All issues in ARM-software/sysarch-acs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
JustAResearcher/gpu-unlock-ada#124 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
inflate: total_in uses plain += on c_ulong (32-bit on Windows), panics in debug for streams > 4 GiBOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
trifectatechfoundation/zlib-rs#570 · 1 comment ·
-
vim.filetype.match() prefixes a URL buffer name with the cwd before passing it to filetype functionsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
compilation errorOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
COVESA/dlt-daemon#925 · 1 reaction ·