-
Notifications
You must be signed in to change notification settings - Fork 703
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
kernel: make user-kernel boundary in Chip #1191
Conversation
6282006
to
4561a1c
Compare
This should be rejected or merged before release testing (obviously I vote merged!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a skim of the changes, it's not immediately obvious why, but presumably after the rebase, something broke and this doesn't work for me. From minimal debugging, it looks like it hangs at the first syscall? (tested hail+blink, hail+c_hello)
This removes the burden that the board author has to think about this, since once the chip has been decided, the architecture has been decided as well.
4561a1c
to
0891b60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out this just needed to be rebased further to pick up the fix the from #1196.
Tested and working on hail+blink/c_hello/accel_leds. Looks good overall.
bors r+ |
1191: kernel: make user-kernel boundary in Chip r=alevy a=bradjc ### Pull Request Overview This pull request adds a new trait type to the `Chip` trait that represents the code that handles switching between kernelspace and userspace. Because this is a hardware feature, it makes sense to include it with the chip so that a user doesn't accidentally choose the wrong arch for a given MCU. ```rust pub trait Chip { type MPU: mpu::MPU; type UserspaceKernelBoundary: syscall::UserspaceKernelBoundary; type SysTick: systick::SysTick; ... ``` This also simplifies main.rs as now setting up processes and the kernel only requires passing in the chip. ### Testing Strategy This pull request was tested by running a hail kernel. ### TODO or Help Wanted n/a ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make formatall`. Co-authored-by: Brad Campbell <[email protected]>
Build succeeded |
Pull Request Overview
This pull request adds a new trait type to the
Chip
trait that represents the code that handles switching between kernelspace and userspace. Because this is a hardware feature, it makes sense to include it with the chip so that a user doesn't accidentally choose the wrong arch for a given MCU.This also simplifies main.rs as now setting up processes and the kernel only requires passing in the chip.
Testing Strategy
This pull request was tested by running a hail kernel.
TODO or Help Wanted
n/a
Documentation Updated
/docs
, or no updates are required.Formatting
make formatall
.