File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 44
55use core:: ops:: RangeInclusive ;
66
7- use aarch64_cpu:: { asm:: barrier, registers:: * } ;
8- use tock_registers:: interfaces:: { ReadWriteable , Readable , Writeable } ;
7+ use aarch64_cpu:: {
8+ asm:: barrier,
9+ registers:: { Readable , Writeable , * } ,
10+ } ;
911
1012use self :: interface:: Mmu ;
1113
@@ -287,7 +289,10 @@ impl interface::Mmu for MemoryManagementUnit {
287289 barrier:: isb ( barrier:: SY ) ;
288290
289291 // Enable the MMU and turn on data and instruction caching.
290- SCTLR_EL1 . modify ( SCTLR_EL1 :: M :: Enable + SCTLR_EL1 :: C :: Cacheable + SCTLR_EL1 :: I :: Cacheable ) ;
292+ SCTLR_EL1 . modify_no_read (
293+ SCTLR_EL1 . extract ( ) ,
294+ SCTLR_EL1 :: M :: Enable + SCTLR_EL1 :: C :: Cacheable + SCTLR_EL1 :: I :: Cacheable ,
295+ ) ;
291296
292297 // Force MMU init to complete before next instruction.
293298 barrier:: isb ( barrier:: SY ) ;
Original file line number Diff line number Diff line change 22// Copyright (C) 2023 Akira Moroo
33
44use aarch64_cpu:: registers:: * ;
5- use tock_registers:: interfaces:: ReadWriteable ;
65
76pub fn setup_simd ( ) {
8- CPACR_EL1 . modify ( CPACR_EL1 :: FPEN :: TrapNothing ) ;
7+ CPACR_EL1 . modify_no_read ( CPACR_EL1 . extract ( ) , CPACR_EL1 :: FPEN :: TrapNothing ) ;
98}
You can’t perform that action at this time.
0 commit comments