Page MenuHomeFreeBSD

D43479.diff
No OneTemporary

D43479.diff

diff --git a/sys/arm64/arm64/db_interface.c b/sys/arm64/arm64/db_interface.c
--- a/sys/arm64/arm64/db_interface.c
+++ b/sys/arm64/arm64/db_interface.c
@@ -124,14 +124,20 @@
if (ret == 0) {
src = (const char *)addr;
+
+ /*
+ * Perform a native-sized memory access, if possible. This
+ * enables reading from MMIO devices that don't support single
+ * byte access.
+ */
if (size == 8 && (addr & 7) == 0) {
- tmp64 = *((const int *)src);
+ tmp64 = *((const uint64_t *)src);
src = (const char *)&tmp64;
} else if (size == 4 && (addr & 3) == 0) {
- tmp32 = *((const int *)src);
+ tmp32 = *((const uint32_t *)src);
src = (const char *)&tmp32;
} else if (size == 2 && (addr & 1) == 0) {
- tmp16 = *((const short *)src);
+ tmp16 = *((const uint16_t *)src);
src = (const char *)&tmp16;
}
while (size-- > 0)

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 1:23 PM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14535691
Default Alt Text
D43479.diff (854 B)

Event Timeline