Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit c7b7039

Browse files
vbe0201andre-richter
authored andcommitted
Define ACTLR_EL* registers
1 parent c6f8932 commit c7b7039

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed

src/registers.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
#[macro_use]
77
mod macros;
88

9+
mod actlr_el1;
10+
mod actlr_el2;
11+
mod actlr_el3;
912
mod ccsidr_el1;
1013
mod clidr_el1;
1114
mod cntfrq_el0;
@@ -61,6 +64,9 @@ mod ttbr1_el1;
6164
mod vbar_el1;
6265
mod vbar_el2;
6366

67+
pub use actlr_el1::ACTLR_EL1;
68+
pub use actlr_el2::ACTLR_EL2;
69+
pub use actlr_el3::ACTLR_EL3;
6470
pub use ccsidr_el1::CCSIDR_EL1;
6571
pub use clidr_el1::CLIDR_EL1;
6672
pub use cntfrq_el0::CNTFRQ_EL0;

src/registers/actlr_el1.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Copyright (c) 2018-2022 by the author(s)
4+
//
5+
// Author(s):
6+
// - Valentin B. <valentin.be@protonmail.com>
7+
8+
//! Auxiliary Control Register - EL1
9+
//!
10+
//! Provides implementation-defined configuration and control options for execution
11+
//! at EL1 and EL0.
12+
13+
use tock_registers::interfaces::{Readable, Writeable};
14+
15+
pub struct Reg;
16+
17+
impl Readable for Reg {
18+
type T = u64;
19+
type R = ();
20+
21+
sys_coproc_read_raw!(u64, "ACTLR_EL1", "x");
22+
}
23+
24+
impl Writeable for Reg {
25+
type T = u64;
26+
type R = ();
27+
28+
sys_coproc_write_raw!(u64, "ACTLR_EL1", "x");
29+
}
30+
31+
pub const ACTLR_EL1: Reg = Reg;

src/registers/actlr_el2.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Copyright (c) 2018-2022 by the author(s)
4+
//
5+
// Author(s):
6+
// - Valentin B. <valentin.be@protonmail.com>
7+
8+
//! Auxiliary Control Register - EL2
9+
//!
10+
//! Provides implementation-defined configuration and control options for execution
11+
//! at EL2.
12+
13+
use tock_registers::interfaces::{Readable, Writeable};
14+
15+
pub struct Reg;
16+
17+
impl Readable for Reg {
18+
type T = u64;
19+
type R = ();
20+
21+
sys_coproc_read_raw!(u64, "ACTLR_EL2", "x");
22+
}
23+
24+
impl Writeable for Reg {
25+
type T = u64;
26+
type R = ();
27+
28+
sys_coproc_write_raw!(u64, "ACTLR_EL2", "x");
29+
}
30+
31+
pub const ACTLR_EL2: Reg = Reg;

src/registers/actlr_el3.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Copyright (c) 2018-2022 by the author(s)
4+
//
5+
// Author(s):
6+
// - Valentin B. <valentin.be@protonmail.com>
7+
8+
//! Auxiliary Control Register - EL3
9+
//!
10+
//! Provides implementation-defined configuration and control options for execution
11+
//! at EL3.
12+
13+
use tock_registers::interfaces::{Readable, Writeable};
14+
15+
pub struct Reg;
16+
17+
impl Readable for Reg {
18+
type T = u64;
19+
type R = ();
20+
21+
sys_coproc_read_raw!(u64, "ACTLR_EL3", "x");
22+
}
23+
24+
impl Writeable for Reg {
25+
type T = u64;
26+
type R = ();
27+
28+
sys_coproc_write_raw!(u64, "ACTLR_EL3", "x");
29+
}
30+
31+
pub const ACTLR_EL3: Reg = Reg;

0 commit comments

Comments
 (0)