This repository was archived by the owner on Nov 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ mod mair_el1;
3232mod mair_el2;
3333mod midr_el1;
3434mod mpidr_el1;
35+ mod oslar_el1;
3536mod par_el1;
3637mod scr_el3;
3738mod sctlr_el1;
@@ -79,6 +80,7 @@ pub use mair_el1::MAIR_EL1;
7980pub use mair_el2:: MAIR_EL2 ;
8081pub use midr_el1:: MIDR_EL1 ;
8182pub use mpidr_el1:: MPIDR_EL1 ;
83+ pub use oslar_el1:: OSLAR_EL1 ;
8284pub use par_el1:: PAR_EL1 ;
8385pub use scr_el3:: SCR_EL3 ;
8486pub use sctlr_el1:: SCTLR_EL1 ;
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0 OR MIT
2+ //
3+ // Copyright (c) 2018-2022 by the author(s)
4+ //
5+ // Author(s):
6+ // - Andre Richter <andre.o.richter@gmail.com>
7+ // - Javier Alvarez <javier.alvarez@allthingsembedded.net>
8+
9+ //! OS Lock Access Register
10+ //!
11+ //! Used to lock or unlock the OS Lock.
12+ //!
13+ //! AArch64 System register OSLAR_EL1 bits [31:0] are architecturally mapped to External register
14+ //! OSLAR_EL1[31:0]. The OS Lock can also be locked or unlocked using DBGOSLAR.
15+
16+ use tock_registers:: {
17+ interfaces:: { Readable , Writeable } ,
18+ register_bitfields,
19+ } ;
20+
21+ register_bitfields ! { u64 ,
22+ pub OSLAR_EL1 [
23+ /// On writes to OSLAR_EL1, bit[0] is copied to the OS Lock.
24+ /// Use OSLSR_EL1.OSLK to check the current status of the lock.
25+ OSLK OFFSET ( 0 ) NUMBITS ( 1 ) [
26+ Unlocked = 0 ,
27+ Locked = 1
28+ ]
29+ ]
30+ }
31+
32+ pub struct Reg ;
33+
34+ impl Readable for Reg {
35+ type T = u64 ;
36+ type R = OSLAR_EL1 :: Register ;
37+
38+ sys_coproc_read_raw ! ( u64 , "OSLAR_EL1" , "x" ) ;
39+ }
40+
41+ impl Writeable for Reg {
42+ type T = u64 ;
43+ type R = OSLAR_EL1 :: Register ;
44+
45+ sys_coproc_write_raw ! ( u64 , "OSLAR_EL1" , "x" ) ;
46+ }
47+
48+ pub const OSLAR_EL1 : Reg = Reg { } ;
You can’t perform that action at this time.
0 commit comments