Skip to content

Commit

Permalink
Merge pull request #15 from JaviMerino/esr_elx_writeable
Browse files Browse the repository at this point in the history
Set ESR_EL{1,2} writable
  • Loading branch information
nchong-at-aws authored Jul 18, 2023
2 parents e5387fd + 4fa310b commit 179925b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/registers/esr_el1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
//!
//! Holds syndrome information for an exception taken to EL1.
use tock_registers::{interfaces::Readable, register_bitfields};
use tock_registers::{
interfaces::{Readable, Writeable},
register_bitfields,
};

register_bitfields! {u64,
pub ESR_EL1 [
Expand Down Expand Up @@ -79,4 +82,11 @@ impl Readable for Reg {
sys_coproc_read_raw!(u64, "ESR_EL1", "x");
}

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

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

pub const ESR_EL1: Reg = Reg {};
12 changes: 11 additions & 1 deletion src/registers/esr_el2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
//!
//! Holds syndrome information for an exception taken to EL2.
use tock_registers::{interfaces::Readable, register_bitfields};
use tock_registers::{
interfaces::{Readable, Writeable},
register_bitfields,
};

register_bitfields! {u64,
pub ESR_EL2 [
Expand Down Expand Up @@ -91,4 +94,11 @@ impl Readable for Reg {
sys_coproc_read_raw!(u64, "ESR_EL2", "x");
}

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

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

pub const ESR_EL2: Reg = Reg {};

0 comments on commit 179925b

Please sign in to comment.