Skip to content

Pma directed, fix trap handler

Created by: silabs-robin

This PR updates the pma directed tests so that the trap handler returns consistently correct.

Previously: Several parts of the test has been commented away, waiting for the RTL to get the new features implemented. Now we want to start re-enabling these parts but an issue was found in the test's trap handler. When inducing pma exceptions, the trap handler didn't return correctly for all cases. (Hadn't been tested because there was nothing to test it on.) (The typical PC+4/2 can't be used when jumping to arbitrary locations.)

Solution: Use function calls ("provoke()") as a way to determine where the test continues execution. Additionally, explicitly manage the stack pointer and save/restore GPRs.

The test passes when using a 40x from one of Øystein's branches and without iss, but it should not work with 40x current master. @silabs-oysteink can you confirm whether this test works as expected when running with your latest rtl fixes? Both with and without iss?

Merge request reports

Loading