ARM-software / bsa-acs

Arm SystemReady : BSA Architecture Compliance Suite
Apache License 2.0
15 stars 41 forks source link

Test 835 - FLR test should poll for device readiness after reset #194

Closed samerhaj closed 11 months ago

samerhaj commented 11 months ago

BSA ACS Test 835 tests PCIe FLR as follows:

This results in a failure such as this:

835 : Check Function level reset
    BDF 0x2010000 not present

The PCIe spec requires that a function completes the FLR operation within 100ms, but subsequent function initialization may need more time. The function is allowed to return Request Retry Status (RRS) Completion Status indicating it needs more time.

The Linux FLR code pcie_flr() does the following:

This test should be modified to follow the PCIe spec. One suggestion is to do the following:

The Linux code uses 60 seconds because of issues seen in some NVMe drives. For the BSA ACS test, a timeout value of 5 seconds should be is more than enough.

The test can be further enhanced so that instead of assuming FFs is a fialure, check for a completion timeout/UR/CA on seeing all FF’s. If we do not get a completion timeout or other error like UR or CA, then we can assume that the device returned RRS.

samerhaj commented 11 months ago

Test confirmed to pass with the fix implemented in test build: https://github.com/Sujana-M/bsa-acs/blob/main/test_image/Bsa_timeout.efi. Thank you @gowthamsiddarthd. Will the patch wit hthe fix get committed ?

gowthamsiddarthd commented 11 months ago

Hi @samerhaj,

Thank you for confirming the patch. The fix has been raised by the PR: https://github.com/ARM-software/bsa-acs/pull/196

Regards, Gowtham, ACS Team