From 2c5d474c56043a66bbc6b1f4d83e6eeb678e6872 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Wed, 20 Sep 2023 00:27:05 -0500 Subject: [PATCH] fix(v5te): fix off by one in DTCM handler --- src/arm.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arm.zig b/src/arm.zig index dfb8005..b10f20d 100644 --- a/src/arm.zig +++ b/src/arm.zig @@ -229,7 +229,7 @@ pub fn Arm32(comptime isa: Architecture) type { if (address < 0x0000_0000 + self.itcm.virt.size) return readInt(T, self.itcm.buf[address & self.itcm.virt.mask ..][0..@sizeOf(T)]); - if (dtcm_base < address and address < dtcm_base + dtcm_size) + if (dtcm_base <= address and address < dtcm_base + dtcm_size) return readInt(T, self.dtcm.buf[address & self.dtcm.virt.mask ..][0..@sizeOf(T)]); }