summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authortaitep <taitep@taitep.se>2025-12-31 13:16:32 +0100
committertaitep <taitep@taitep.se>2025-12-31 13:16:32 +0100
commit21a8479ce99f54012150cc948ed7e5bb066c61e0 (patch)
tree49c5e5fa8736f7990016e410f2714d6e1b0db8ee /src/main.rs
parent09fe12f5165d582c7b83537e38ef8e5d85716f8b (diff)
Make MMIO devices not have control of the address of exceptions
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 11330bd..4e02745 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,7 +10,7 @@ use clap::Parser;
use trve::{
core::Core,
- exceptions::MemoryException,
+ exceptions::MemoryExceptionType,
gdb,
mem::{MemConfig, MemDeviceInterface, MmioRoot, Ram},
};
@@ -69,22 +69,22 @@ mod basic_uart;
struct DbgOut;
impl MemDeviceInterface for DbgOut {
- fn write_dword(&self, addr: u64, value: u64) -> Result<(), MemoryException> {
+ fn write_dword(&self, addr: u64, value: u64) -> Result<(), MemoryExceptionType> {
eprintln!("Wrote DWord {value:016x} to Debug-Out address {addr:x}");
Ok(())
}
- fn write_word(&self, addr: u64, value: u32) -> Result<(), MemoryException> {
+ fn write_word(&self, addr: u64, value: u32) -> Result<(), MemoryExceptionType> {
eprintln!("Wrote Word {value:08x} to Debug-Out address {addr:x}");
Ok(())
}
- fn write_hword(&self, addr: u64, value: u16) -> Result<(), MemoryException> {
+ fn write_hword(&self, addr: u64, value: u16) -> Result<(), MemoryExceptionType> {
eprintln!("Wrote HWord {value:04x} to Debug-Out address {addr:x}");
Ok(())
}
- fn write_byte(&self, addr: u64, value: u8) -> Result<(), MemoryException> {
+ fn write_byte(&self, addr: u64, value: u8) -> Result<(), MemoryExceptionType> {
eprintln!("Wrote Byte {value:02x} to Debug-Out address {addr:x}");
Ok(())
}