Skip to content

Commit

Permalink
Merge pull request #11 from rmsyn/far_el3
Browse files Browse the repository at this point in the history
Add FAR_EL3 register
  • Loading branch information
nchong-at-aws authored Jul 20, 2023
2 parents 4d9d491 + c10e7a3 commit e61ca45
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 @@ -48,6 +48,7 @@ mod esr_el2;
mod esr_el3;
mod far_el1;
mod far_el2;
mod far_el3;
mod fp;
mod hcr_el2;
mod id_aa64isar0_el1;
Expand Down Expand Up @@ -134,6 +135,7 @@ pub use esr_el2::ESR_EL2;
pub use esr_el3::ESR_EL3;
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 e61ca45

Please sign in to comment.