forked from tock/tock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel/syscall: split out encode_syscall_return, create TRD104 subset
Because all architecture crates depend on the kernel crate, we use it not just for architecture-agnostic core kernel infrastructure, but also architecture-specific code that happens to be shared between two or more `arch` crates. Prior to this change, we conflated these helpers with the core kernel infrastructure in `syscall.rs`. With this change, we split out the 32-bit and TRD 104-specific `encode_syscall_return` helper, shared between the 32-bit RISC-V and Cortex-M architecture implementations, into its own dedicated module under utilities. We create a separate `SyscallReturn` subset for those return values as specified in TRD 104, and create a function that translates between these types. This allows architectures which use these functions to guarantee that they are conformant to TRD 104 by first explicitly converting into this type, and then encoding it into their stored registers using the TRD 104 encoding helper.
- Loading branch information
1 parent
f3feec6
commit a001b33
Showing
5 changed files
with
454 additions
and
269 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.