riscv/csr/
mepc.rs

1// Licensed under the Apache License, Version 2.0 or the MIT License.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Copyright Tock Contributors 2022.
4
5use kernel::utilities::registers::register_bitfields;
6
7// mepc contains address of instruction where trap occurred
8register_bitfields![usize,
9    pub mepc [
10        trap_addr OFFSET(0) NUMBITS(crate::XLEN) []
11    ]
12];