Skip to content

Commit

Permalink
add FAR_EL3 register
Browse files Browse the repository at this point in the history
  • Loading branch information
rmsyn committed Jul 20, 2023
1 parent 0ef7038 commit c10e7a3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/registers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
32 changes: 32 additions & 0 deletions src/registers/far_el3.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Copyright (c) 2018-2023 by the author(s)
//
// Author(s):
// - Andre Richter <andre.o.richter@gmail.com>
// - rmsyn <rmsynchls@gmail.com>

//! 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 {};

0 comments on commit c10e7a3

Please sign in to comment.