Age | Commit message (Collapse) | Author | Files | Lines |
|
181: Add cfg to Peripheral fields r=thejpster a=hug-dev
The cfg conditional compilation attribute was only set on impl blocks of peripherals. This commit also sets it on the fields themselves to be more consistent.
Also adds Armv8-M Baseline to the blacklist of the ITM peripheral (cf rule `FMQF` of the Armv8-M ARM).
Co-authored-by: Hugues de Valon <hugues.devalon@arm.com>
|
|
180: Add Security Attribution Unit support r=thejpster a=hug-dev
The SAU is a Armv8-M core peripheral that, alongside the Implementation
Defined Attribution Unit, manages the security attribution of the memory
zones.
This driver provides abstraction to help setting the SAU up.
This pull-request adds a new dependency, `bitfield` which provides a really nice way to describe bit fields in registers with methods to access them. It makes it really easier to use/write rather than having to manually declare the shift number and mask constants.
Although `bitfield` does not have any dependency, I am well aware of the increased cost of memory its addition could cause to embedded targets.
I am really open to criticism about its use, if you would prefer me not to use it, or if you would like to see benchmarks of memory usage for some reference targets of embedded Rust 😃
Co-authored-by: Hugues de Valon <hugues.devalon@arm.com>
|
|
Update cfg attributes and code documentation to take into consideration
the new Armv8-M architecture profiles.
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
|
|
|
|
|
|
|
|
This is an alternative proposal to #202 as suggested in
https://github.com/rust-embedded/cortex-m/pull/202#issuecomment-600017553
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
|
|
201: Add UDF instruction. Closes #199. r=jonas-schievink a=adamgreig
Co-authored-by: Adam Greig <adam@adamgreig.com>
|
|
|
|
|
|
|
|
|
|
Clippy complains that the match expressions used for cfg gating could be
rewritten as a let statement, this is a false positive.
Also adds inline on two functions.
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
|
|
Armv8-M and Armv8.1-M architecture profiles have an optional Security
Extension which provides a set of Security features.
This patch adds initial support of the Cortex-M Security Extensions but
providing support for the TT intrinsics and helper functions on top of
it in the newly added cmse module of this crate.
The code is a Rust idiomatic implementation of the C
requirements described in this document:
https://developer.arm.com/docs/ecm0359818/latest
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
|
|
193: Make `Peripherals` non-exhaustive and improve its docs r=therealprof a=jonas-schievink
This means that it's no longer a breaking change to add fields to it, which is important since Arm is likely to add more in upcoming architectures. They could also add extensions that add peripherals.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
|
|
Otherwise Cargo complains!
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
|
|
192: Update and improve cache operations. r=jonas-schievink a=adamgreig
Closes #47, #188.
I've implemented the proposed methods from #47 and marked all d-cache invalidation functions as unsafe. It's not unsafe to invalidate i-cache or branch predictor as they are read-only caches. The clean and clean+invalidate operations do not alter memory from the executing core's point of view so are also safe.
It wasn't possible to remove the requirement to pass in `&mut CPUID` as you require synchronized access to `CPUID` to read the number of sets and ways in the cache, which is required to fully clean or invalidate them, which is required to enable or disable them. So it goes.
Breaking change due to changing safety of d-cache invalidation functions.
Co-authored-by: Adam Greig <adam@adamgreig.com>
|
|
|
|
Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com>
|
|
|
|
|
|
|
|
The Clippy lint was unnecessarily `#[allow]`ed.
|
|
Closes #47, #188.
Breaking change due to changing safety of d-cache invalidation
functions.
|
|
191: Remove deprecated APIs and the `const-fn` feature r=adamgreig a=jonas-schievink
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
|
|
|
|
|
|
|
|
The SAU is a Armv8-M core peripheral that, alongside the Implementation
Defined Attribution Unit, manages the security attribution of the memory
zones.
This driver provides abstraction to help setting the SAU up.
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
|
|
|
|
|
|
171: Add `#[inline]` to lots of trivial functions. r=korken89 a=m-ou-se
Now the only public non-inline functions left are:
- `write_all`
- `write_aligned`
- All (derived) `Debug` implementations
(Checked using Clippy's [`missing_inline_in_public_items`][1] lint.)
[1]: https://rust-lang.github.io/rust-clippy/master/#missing_inline_in_public_items
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
|
|
174: Enable clippy in CI r=thejpster a=m-ou-se
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
|
|
|
|
167: Deprecate basepri/basepri_max on thumbv8m.base r=korken89 a=JJJollyjim
First step in resolving #155
Co-authored-by: Jamie McClymont <jamie@kwiius.com>
|
|
|
|
Now the only public non-inline functions left are:
- write_all
- write_aligned
- All (derived) Debug implementations
(Checked using Clippy's missing_inline_in_public_items lint.)
|
|
|
|
172: Make Clippy happy. r=therealprof a=m-ou-se
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
|
|
today the alternative is an unsafe write to the LAR register
|
|
|
|
First step in resolving #155
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Aurabindo Jayamohanan <mail@aurabindo.in>
|
|
|
|
|
|
|