ci: add Erbium and ET-SOC1 tests to CI and fix related issues - #80
Open
AFOliveira wants to merge 8 commits into
Open
ci: add Erbium and ET-SOC1 tests to CI and fix related issues#80AFOliveira wants to merge 8 commits into
AFOliveira wants to merge 8 commits into
Conversation
Member
|
AFOliveira
force-pushed
the
feat/ci-add-all-tests
branch
from
February 20, 2026 13:22
407e9c4 to
e52b7d2
Compare
After warm_reset(), all harts are set to State::unavailable, and recalculate_thread0_enable decides which ones to bring back based on thread0_disable. For non-disabled harts with resethaltreq set, the original code called enter_debug_mode() directly on the unavailable hart, which would transition it to halted. But since f82280f added an is_unavailable() guard to enter_debug_mode() — to prevent the debugger from reviving harts disabled by thread0_disable — that call now silently returns, and the hart stays unavailable forever. The fix calls start_running() first to transition the hart from unavailable to active, then enter_debug_mode() halts it. The end result is the same as before — the hart ends up halted in debug mode after reset — but the path through the code changes because enter_debug_mode() is now stricter about which states it accepts.
warm_reset() used immediate links.unlink(), but become_unavailable() was changed to use pending_unlink in f82280f. Apply the same pattern here to avoid iterator corruption if warm_reset() is triggered while the simulation is iterating the active list.
Add missing #include "esrs.h" to debug.c and diag.h to fix build errors. The code references functions and macros defined in esrs.h (write_dmctrl, read_hastatus0, DMACTIVE, etc.) but the header was not included.
Follows emulator change 418b0f4. Per the RISC-V Debug Spec, resumeack is cleared when resumereq is written 1 (start of a new resume), not when resumereq transitions 1->0. After a successful resume, resumeack stays set in hastatus0 until the next resume request. Update halt_resume, halt_resume_4n, and progbuf_break to expect resumeack (bit 32) in hastatus0 after resume.
The test was failing because the minion returned from main() before the SPIO could halt it, which caused become_unavailable() to be called on the hart. When the SPIO then called Halt_Harts(), enter_debug_mode() silently skipped the unavailable hart. Since the hart was never halted, the program buffer could not execute, so Read_All_GPR's instructions never ran and ddata0 stayed at 0. Every GPR read back as 0, causing the EXPECTX checks to fail. Add a handshake so the minion spins until the SPIO has finished the debug operations and explicitly releases it.
Add comprehensive test coverage to CI: - Erbium emulator tests (25 tests) - Erbium GDB tests (1 test) - ET-SOC1 debug tests (13 tests)
The Docker build fetches the RISC-V toolchain release from the GitHub API, which has a 60 req/hour limit for unauthenticated requests. CI runners share IPs and hit this limit, causing the build to fail. Pass GITHUB_TOKEN through the Docker build to authenticate the API request, raising the limit to 5000 req/hour.
AFOliveira
force-pushed
the
feat/ci-add-all-tests
branch
from
February 20, 2026 15:43
01ba2c2 to
e7d5ae6
Compare
Member
Author
|
Scope creep hit this PR, but the commit history should make the different parts clearly. |
AFOliveira
marked this pull request as ready for review
February 20, 2026 15:44
Member
Author
|
One question I still have here is whether or not I should rename the debug_tests/ folder to somewhere else? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #52
Also adds all tests to CI.
Just need to look at why some et-soc1 tests are failing.