cortex_a/registers/elr_el2.rs
1// SPDX-License-Identifier: Apache-2.0 OR MIT
2//
3// Copyright (c) 2018-2022 by the author(s)
4//
5// Author(s):
6// - Andre Richter <andre.o.richter@gmail.com>
7
8//! Exception Link Register - EL2
9//!
10//! When taking an exception to EL2, holds the address to return to.
11
12use tock_registers::interfaces::{Readable, Writeable};
13
14pub struct Reg;
15
16impl Readable for Reg {
17 type T = u64;
18 type R = ();
19
20 sys_coproc_read_raw!(u64, "ELR_EL2", "x");
21}
22
23impl Writeable for Reg {
24 type T = u64;
25 type R = ();
26
27 sys_coproc_write_raw!(u64, "ELR_EL2", "x");
28}
29
30pub const ELR_EL2: Reg = Reg {};