Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add information about types used in the kernel #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

2 participants