diff options
| author | taitep <taitep@taitep.se> | 2025-12-27 21:33:39 +0100 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-12-27 21:33:39 +0100 |
| commit | 5c008bfc0446e4631dbab64be61159af04f78dd1 (patch) | |
| tree | 852f7ee883f675b4c67cf424b8f7d17357e7742d /src/main.rs | |
| parent | b5d36b7969f2759147d58a80e0e5b62c215d2998 (diff) | |
Add exception values (what will go in mtval/stval)
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 53c2938..780534f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ use clap::Parser; use trve::{ consts::{Addr, Byte, DWord, HWord, Word}, core::Core, - exceptions::MemoryExceptionType, + exceptions::MemoryException, gdb, mem::{MemConfig, MemDeviceInterface, MmioRoot, Ram}, }; @@ -70,22 +70,22 @@ mod basic_uart; struct DbgOut; impl MemDeviceInterface for DbgOut { - fn write_dword(&self, addr: Addr, value: DWord) -> Result<(), MemoryExceptionType> { + fn write_dword(&self, addr: Addr, value: DWord) -> Result<(), MemoryException> { eprintln!("Wrote DWord {value:016x} to Debug-Out address {addr:x}"); Ok(()) } - fn write_word(&self, addr: Addr, value: Word) -> Result<(), MemoryExceptionType> { + fn write_word(&self, addr: Addr, value: Word) -> Result<(), MemoryException> { eprintln!("Wrote Word {value:08x} to Debug-Out address {addr:x}"); Ok(()) } - fn write_hword(&self, addr: Addr, value: HWord) -> Result<(), MemoryExceptionType> { + fn write_hword(&self, addr: Addr, value: HWord) -> Result<(), MemoryException> { eprintln!("Wrote HWord {value:04x} to Debug-Out address {addr:x}"); Ok(()) } - fn write_byte(&self, addr: Addr, value: Byte) -> Result<(), MemoryExceptionType> { + fn write_byte(&self, addr: Addr, value: Byte) -> Result<(), MemoryException> { eprintln!("Wrote Byte {value:02x} to Debug-Out address {addr:x}"); Ok(()) } |
