File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Unreleased
4+
5+ ### Improvements
6+
7+ - Made ` set_exception_vector ` public.
8+ - Made ` enable_mmu ` public.
9+
310## 0.4.0
411
512### Breaking changes
Original file line number Diff line number Diff line change @@ -47,17 +47,30 @@ pub use pagetable::{
4747 InitialPagetable ,
4848} ;
4949
50+ /// No-op when the `initial-pagetable` feature isn't enabled.
5051#[ cfg( not( feature = "initial-pagetable" ) ) ]
5152#[ unsafe( naked) ]
5253#[ unsafe( link_section = ".init" ) ]
5354#[ unsafe( export_name = "enable_mmu" ) ]
54- extern "C" fn enable_mmu ( ) {
55+ pub extern "C" fn enable_mmu ( ) {
5556 naked_asm ! ( "ret" )
5657}
5758
59+ #[ cfg( feature = "initial-pagetable" ) ]
60+ unsafe extern "C" {
61+ /// Enables the MMU and caches with the initial pagetable.
62+ ///
63+ /// This is called automatically from entry point code both for primary and secondary CPUs so
64+ /// you usually won't need to call this yourself, but is available in case you need to implement
65+ /// your own assembly entry point.
66+ pub safe fn enable_mmu ( ) ;
67+ }
68+
5869/// Sets the appropriate vbar to point to our `vector_table`, if the `exceptions` feature is
5970 /// enabled.
60- extern "C" fn set_exception_vector ( ) {
71+ ///
72+ /// If `exceptions` is not enabled then this is a no-op.
73+ pub extern "C" fn set_exception_vector ( ) {
6174 // SAFETY: We provide a valid vector table.
6275 #[ cfg( all( feature = "el1" , feature = "exceptions" ) ) ]
6376 unsafe {
You can’t perform that action at this time.
0 commit comments