From c10e7a3e89ea601db0173f48bd0e3a2dee12817d Mon Sep 17 00:00:00 2001 From: rmsyn Date: Sat, 25 Feb 2023 23:49:04 +0000 Subject: [PATCH] add FAR_EL3 register --- src/registers.rs | 2 ++ src/registers/far_el3.rs | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/registers/far_el3.rs diff --git a/src/registers.rs b/src/registers.rs index 5ed3e64..05674aa 100644 --- a/src/registers.rs +++ b/src/registers.rs @@ -47,6 +47,7 @@ mod esr_el1; mod esr_el2; mod far_el1; mod far_el2; +mod far_el3; mod fp; mod hcr_el2; mod id_aa64isar0_el1; @@ -131,6 +132,7 @@ pub use esr_el1::ESR_EL1; pub use esr_el2::ESR_EL2; pub use far_el1::FAR_EL1; pub use far_el2::FAR_EL2; +pub use far_el3::FAR_EL3; pub use fp::FP; pub use hcr_el2::HCR_EL2; pub use id_aa64isar0_el1::ID_AA64ISAR0_EL1; diff --git a/src/registers/far_el3.rs b/src/registers/far_el3.rs new file mode 100644 index 0000000..c892488 --- /dev/null +++ b/src/registers/far_el3.rs @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: Apache-2.0 OR MIT +// +// Copyright (c) 2018-2023 by the author(s) +// +// Author(s): +// - Andre Richter +// - rmsyn + +//! Fault Address Register - EL3 +//! +//! Holds the faulting Virtual Address for all synchronous Instruction or Data Abort, PC alignment +//! fault exceptions 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, "FAR_EL3", "x"); +} + +impl Writeable for Reg { + type T = u64; + type R = (); + + sys_coproc_write_raw!(u64, "FAR_EL3", "x"); +} + +pub const FAR_EL3: Reg = Reg {};