Skip to content

TCL CHERIoT hinting - #3

Merged
aurore-poirier merged 2 commits into
cheriotfrom
tcl_hinting
Jul 8, 2026
Merged

aurore-poirier merged 2 commits into
cheriotfrom
tcl_hinting

Conversation

@aurore-poirier

Copy link
Copy Markdown
Collaborator

Added a new command to hint for the right CHERIoT implementation in a configuration TCL, for example:

riscv enable_cheriot iceni

Where the options are:

  • sonata for Sonata One
  • mpw1 or mpw2, will add other ones if other ones exist
  • iceni currently pointing to mpw2

It allows to now use a single OpenOCD version for everything

@aurore-poirier
aurore-poirier requested a review from resistor July 7, 2026 15:51
@aurore-poirier aurore-poirier self-assigned this Jul 7, 2026
@aurore-poirier aurore-poirier added the enhancement New feature or request label Jul 7, 2026
Comment thread src/target/riscv/program.c Resolved
Comment thread src/target/riscv/program.c Outdated

int cheriot_save_register(struct target *target, enum gdb_regno regid) {
struct riscv_info *info = target->arch_info;
if (info->cheriot < CHERIOT_MPW_2) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it make sense to define helper functions for some of these comparisons? I don't know for certain if it will always be a monotonic progression.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think it would make sense for more complex ones, but for now they are all fairly simple. I could throw some alongside the enum definition, or in its own header

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Rebased and added a few helpers in a commit i will squash with my previous one if you're good with it

Comment thread src/target/riscv/riscv-013.c Resolved
Comment thread src/target/riscv/riscv.c Resolved
`riscv_info.cheriot` is now an enum instead of a boolean that can be
filled with the `riscv enable_cheriot [variant]` tcl command
@aurore-poirier
aurore-poirier merged commit acd65b0 into cheriot Jul 8, 2026
1 check passed
@aurore-poirier
aurore-poirier deleted the tcl_hinting branch July 8, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants