-
-
Notifications
You must be signed in to change notification settings - Fork 672
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
Core firmware split #4188
Core firmware split #4188
Conversation
26d1025
to
3c561cf
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.
First part of the review, focusing mainly on drivers up to introduction of non-blocking i2c driver, of which the review is not yet complete.
core/embed/trezorhal/stm32u5/xdisplay/stm32u5a9j-dk/display_ltdc_dsi.c
Outdated
Show resolved
Hide resolved
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.
some more stuff related to drivers part, up to and excluding the new mpu driver.
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.
some more issues/questions related to the last part - mpu, split and tasks+etc.
[no changelog]
[no changelog]
[no changelog]
[no changelog]
…mode [no changelog]
5a2da1e
to
6075662
Compare
…factoring [no changelog]
[no changelog]
[no changelog]
[no changelog]
[no changelog]
[no changelog]
e39ede7
to
23ff195
Compare
QA OK been using 2.8.4 FW for some time without any issue |
This PR introduces a significant conceptual change to our Trezor firmware. It divides the firmware into two parts: a privileged and an unprivileged section. We refer to these as the
kernel
and thecoreapp
.The kernel includes all hardware drivers, storage management, and necessary cryptographic functions. It operates in privileged mode, providing interfaces to the less trusted coreapp via approximately 100 syscalls.
The coreapp contains the MicroPython core, MicroPython applications, and the Rust-based UI. It runs entirely in unprivileged mode, with no direct access to hardware, except for DMA2D in its current implementation.
Kernel
andcoreapp
are built as two separate applications but eventually glued together by build scripts as a single binary. So you canmake firmware
as before with no change at the first glance.Benefits:
Known issues:
These issues need to be resolved soon, but they do not have a significant impact on security at the moment, as they have not been addressed in the firmware until now.
This PR brings also a lot of changes and improvements to drivers code:
systick
driver that offer more precise time measurement.systimer
for scheduling timer callbacks for background operations.i2c_bus
driver, enabling non-blocking i2c operationsmpu
driver for region banking, that overcomes cortex-m cpu limitations.systask
module, which allows manuall switching between privileged and unprivileged taskssystem
module with more reliable error handling (emergency mode)