Skip to content

Conversation

@bradjc
Copy link
Contributor

@bradjc bradjc commented Sep 24, 2024

This documents the difference between usize/u32/etc.

No need to merge this right away until we have more of the CHERI work included.

This documents the difference between usize/u32/etc.
Comment on lines +19 to +21
- Machine-sized types (e.g., `usize`): These types should be used for a value
that should fit exactly into a register, like a abstract argument to the
`command` syscall.
Copy link
Member

Choose a reason for hiding this comment

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

Is this example really what we want to have? Way back when we talked about this for the 2.0 system call interface, we converged on having the current system call interface and driver traits use u32s consistently, and implement an additional, 64-bit specific trait for such platforms when we have them. I know that at least for command args, we're currently not living this reality, though we arguably ought to be.

I still think this is a good idea, because this way we don't have to reason about edge-cases on different platforms for the system call interface. Driver (interfaces) behave identically across these platforms.

I'll have to check whether the CHERI PR (tock/tock#4174) changes this.

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.

3 participants