Skip to content
Draft
42 changes: 42 additions & 0 deletions src/registers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
#[macro_use]
mod macros;

mod accdata_el1;
mod actlr_el1;
mod actlr_el2;
mod actlr_el3;
mod actlrmask_el1;
mod actlrmask_el2;
mod afsr0_el1;
mod afsr0_el2;
mod afsr0_el3;
mod afsr1_el1;
mod aidr_el1;
mod amair_el1;
mod apdakeyhi_el1;
mod apdakeylo_el1;
Expand All @@ -21,6 +27,7 @@ mod apiakeyhi_el1;
mod apiakeylo_el1;
mod apibkeyhi_el1;
mod apibkeylo_el1;
mod ccsidr2_el1;
mod ccsidr_el1;
mod clidr_el1;
mod cntfrq_el0;
Expand Down Expand Up @@ -57,6 +64,7 @@ mod far_el1;
mod far_el2;
mod far_el3;
mod fp;
mod hacr_el2;
mod hafgrtr_el2;
mod hcr_el2;
mod hdfgrtr_el2;
Expand Down Expand Up @@ -101,11 +109,17 @@ mod id_aa64dfr0_el1;
mod id_aa64dfr1_el1;
mod id_aa64isar0_el1;
mod id_aa64isar1_el1;
mod id_aa64isar2_el1;
mod id_aa64isar3_el1;
mod id_aa64mmfr0_el1;
mod id_aa64mmfr1_el1;
mod id_aa64mmfr2_el1;
mod id_aa64mmfr3_el1;
mod id_aa64mmfr4_el1;
mod id_aa64pfr0_el1;
mod id_aa64pfr1_el1;
mod id_aa64pfr2_el1;
mod id_aa64smfr0_el1;
mod lr;
mod mair_el1;
mod mair_el2;
Expand All @@ -114,8 +128,14 @@ mod mdcr_el2;
mod mdscr_el1;
mod midr_el1;
mod mpidr_el1;
mod mvfr0_el1;
mod mvfr1_el1;
mod mvfr2_el1;
mod osdlr_el1;
mod oslar_el1;
mod par_el1;
mod pmuserenr_el0;
mod revidr_el1;
mod rvbar_el1;
mod rvbar_el2;
mod rvbar_el3;
Expand All @@ -138,6 +158,7 @@ mod tcr_el2;
mod tpidr_el0;
mod tpidr_el1;
mod tpidr_el2;
mod tpidr_el3;
mod tpidrro_el0;
mod ttbr0_el1;
mod ttbr0_el2;
Expand All @@ -149,11 +170,17 @@ mod vmpidr_el2;
mod vtcr_el2;
mod vttbr_el2;

pub use accdata_el1::ACCDATA_EL1;
pub use actlr_el1::ACTLR_EL1;
pub use actlr_el2::ACTLR_EL2;
pub use actlr_el3::ACTLR_EL3;
pub use actlrmask_el1::ACTLRMASK_EL1;
pub use actlrmask_el2::ACTLRMASK_EL2;
pub use afsr0_el1::AFSR0_EL1;
pub use afsr0_el2::AFSR0_EL2;
pub use afsr0_el3::AFSR0_EL3;
pub use afsr1_el1::AFSR1_EL1;
pub use aidr_el1::AIDR_EL1;
pub use amair_el1::AMAIR_EL1;
pub use apdakeyhi_el1::APDAKEYHI_EL1;
pub use apdakeylo_el1::APDAKEYLO_EL1;
Expand All @@ -165,6 +192,7 @@ pub use apiakeyhi_el1::APIAKEYHI_EL1;
pub use apiakeylo_el1::APIAKEYLO_EL1;
pub use apibkeyhi_el1::APIBKEYHI_EL1;
pub use apibkeylo_el1::APIBKEYLO_EL1;
pub use ccsidr2_el1::CCSIDR2_EL1;
pub use ccsidr_el1::CCSIDR_EL1;
pub use clidr_el1::CLIDR_EL1;
pub use cntfrq_el0::CNTFRQ_EL0;
Expand Down Expand Up @@ -201,6 +229,7 @@ pub use far_el1::FAR_EL1;
pub use far_el2::FAR_EL2;
pub use far_el3::FAR_EL3;
pub use fp::FP;
pub use hacr_el2::HACR_EL2;
pub use hafgrtr_el2::HAFGRTR_EL2;
pub use hcr_el2::HCR_EL2;
pub use hdfgrtr_el2::HDFGRTR_EL2;
Expand Down Expand Up @@ -245,11 +274,17 @@ pub use id_aa64dfr0_el1::ID_AA64DFR0_EL1;
pub use id_aa64dfr1_el1::ID_AA64DFR1_EL1;
pub use id_aa64isar0_el1::ID_AA64ISAR0_EL1;
pub use id_aa64isar1_el1::ID_AA64ISAR1_EL1;
pub use id_aa64isar2_el1::ID_AA64ISAR2_EL1;
pub use id_aa64isar3_el1::ID_AA64ISAR3_EL1;
pub use id_aa64mmfr0_el1::ID_AA64MMFR0_EL1;
pub use id_aa64mmfr1_el1::ID_AA64MMFR1_EL1;
pub use id_aa64mmfr2_el1::ID_AA64MMFR2_EL1;
pub use id_aa64mmfr3_el1::ID_AA64MMFR3_EL1;
pub use id_aa64mmfr4_el1::ID_AA64MMFR4_EL1;
pub use id_aa64pfr0_el1::ID_AA64PFR0_EL1;
pub use id_aa64pfr1_el1::ID_AA64PFR1_EL1;
pub use id_aa64pfr2_el1::ID_AA64PFR2_EL1;
pub use id_aa64smfr0_el1::ID_AA64SMFR0_EL1;
pub use lr::LR;
pub use mair_el1::MAIR_EL1;
pub use mair_el2::MAIR_EL2;
Expand All @@ -258,8 +293,14 @@ pub use mdcr_el2::MDCR_EL2;
pub use mdscr_el1::MDSCR_EL1;
pub use midr_el1::MIDR_EL1;
pub use mpidr_el1::MPIDR_EL1;
pub use mvfr0_el1::MVFR0_EL1;
pub use mvfr1_el1::MVFR1_EL1;
pub use mvfr2_el1::MVFR2_EL1;
pub use osdlr_el1::OSDLR_EL1;
pub use oslar_el1::OSLAR_EL1;
pub use par_el1::PAR_EL1;
pub use pmuserenr_el0::PMUSERENR_EL0;
pub use revidr_el1::REVIDR_EL1;
pub use rvbar_el1::RVBAR_EL1;
pub use rvbar_el2::RVBAR_EL2;
pub use rvbar_el3::RVBAR_EL3;
Expand All @@ -282,6 +323,7 @@ pub use tcr_el2::TCR_EL2;
pub use tpidr_el0::TPIDR_EL0;
pub use tpidr_el1::TPIDR_EL1;
pub use tpidr_el2::TPIDR_EL2;
pub use tpidr_el3::TPIDR_EL3;
pub use tpidrro_el0::TPIDRRO_EL0;
pub use ttbr0_el1::TTBR0_EL1;
pub use ttbr0_el2::TTBR0_EL2;
Expand Down
35 changes: 35 additions & 0 deletions src/registers/accdata_el1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2018-2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Accelerator Data - EL1

use tock_registers::interfaces::{Readable, Writeable};
use tock_registers::register_bitfields;

pub struct Reg;

register_bitfields! {u64,
pub ACCDATA_EL1 [
ACCDATA OFFSET(0) NUMBITS(32) [],
]
}

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "ACCDATA_EL1", "x");
}

impl Writeable for Reg {
type T = u64;
type R = ();

sys_coproc_write_raw!(u64, "ACCDATA_EL1", "x");
}

pub const ACCDATA_EL1: Reg = Reg;
28 changes: 28 additions & 0 deletions src/registers/actlrmask_el1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2018-2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Auxiliary Control Masking Register - EL1

use tock_registers::interfaces::{Readable, Writeable};

pub struct Reg;

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "ACTLRMASK_EL1", "x");
}

impl Writeable for Reg {
type T = u64;
type R = ();

sys_coproc_write_raw!(u64, "ACTLRMASK_EL1", "x");
}

pub const ACTLRMASK_EL1: Reg = Reg;
28 changes: 28 additions & 0 deletions src/registers/actlrmask_el2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2018-2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Auxiliary Control Masking Register - EL1

use tock_registers::interfaces::{Readable, Writeable};

pub struct Reg;

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "ACTLRMASK_EL2", "x");
}

impl Writeable for Reg {
type T = u64;
type R = ();

sys_coproc_write_raw!(u64, "ACTLRMASK_EL2", "x");
}

pub const ACTLRMASK_EL2: Reg = Reg;
30 changes: 30 additions & 0 deletions src/registers/afsr0_el2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Auxiliary Fault Status Register 0 - EL2
//!
//! Provides IMPLEMENTATION DEFINED fault status information for synchronous aborts that are taken to EL2.

use tock_registers::interfaces::{Readable, Writeable};

pub struct Reg;

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "AFSR0_EL2", "x");
}

impl Writeable for Reg {
type T = u64;
type R = ();

sys_coproc_write_raw!(u64, "AFSR0_EL2", "x");
}

pub const AFSR0_EL2: Reg = Reg {};
30 changes: 30 additions & 0 deletions src/registers/afsr0_el3.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Auxiliary Fault Status Register 0 - EL3
//!
//! Provides IMPLEMENTATION DEFINED fault status information for synchronous aborts that are taken to EL3.

use tock_registers::interfaces::{Readable, Writeable};

pub struct Reg;

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "AFSR0_EL3", "x");
}

impl Writeable for Reg {
type T = u64;
type R = ();

sys_coproc_write_raw!(u64, "AFSR0_EL3", "x");
}

pub const AFSR0_EL3: Reg = Reg {};
21 changes: 21 additions & 0 deletions src/registers/aidr_el1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2018-2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Auxiliary ID Register - EL1

use tock_registers::interfaces::Readable;

pub struct Reg;

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "AIDR_EL1", "x");
}

pub const AIDR_EL1: Reg = Reg;
28 changes: 28 additions & 0 deletions src/registers/ccsidr2_el1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2018-2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Current Cache Size ID Register 2 - EL1

use tock_registers::interfaces::Readable;
use tock_registers::register_bitfields;

pub struct Reg;

register_bitfields! {u64,
pub CCSIDR2_EL1 [
NumSets OFFSET(0) NUMBITS(24) [],
]
}

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "CCSIDR2_EL1", "x");
}

pub const CCSIDR2_EL1: Reg = Reg;
28 changes: 28 additions & 0 deletions src/registers/hacr_el2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2018-2026 by the author(s)
//
// Author(s):
// - Callum Thomson <callumthom11@gmail.com>

//! Hypervisor Auxiliary Control Register - EL1

use tock_registers::interfaces::{Readable, Writeable};

pub struct Reg;

impl Readable for Reg {
type T = u64;
type R = ();

sys_coproc_read_raw!(u64, "HACR_EL2", "x");
}

impl Writeable for Reg {
type T = u64;
type R = ();

sys_coproc_write_raw!(u64, "HACR_EL2", "x");
}

pub const HACR_EL2: Reg = Reg;
Loading