Skip to content

New MECALL backend#10

Merged
romancardenas merged 9 commits intomainfrom
mecall
Feb 7, 2025
Merged

New MECALL backend#10
romancardenas merged 9 commits intomainfrom
mecall

Conversation

@romancardenas
Copy link
Owner

This backend triggers MachineEnvCall exceptions to obtain the desired behavior.

The examples/ecall.rs works following this approach. I still want to make sure that there are no soundness issues before merging this PR. I also use the new approach I'm developing for the RISC-V ecosystem, so it is better to wait until all these changes are published to crates.io.

If this approach works, then any RISC-V target will be compatible with riscv-slic, regardless of having CLINT or another software interrupt peripheral 😁

@romancardenas romancardenas mentioned this pull request Sep 8, 2024
}

/// Stabilized API for pending a software interrupt on the SLIC.
///

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like this should be an unsafe function, because of all the human-checked prerequisites.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the mecall-backend export code so it now makes sure that the mepc register is not neglected. In this way, users can now call pend safely outside and inside interrupt handlers.

@thejpster
Copy link

I think the mecall version should be built in CI. I'd like to see an RP235x example too and I'll try and look at that when I have time.

@romancardenas
Copy link
Owner Author

Will do! I have bought a couple of RP Pico 2 boards, so I will also do some on-board tests

@romancardenas
Copy link
Owner Author

I need to fine-tune the CI. Nonetheless, both CLINT and MECALL backends work as expected

@romancardenas romancardenas merged commit 2576295 into main Feb 7, 2025
6 checks passed
@romancardenas romancardenas deleted the mecall branch February 7, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants