Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102094221
D43479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
854 B
Referenced Files
None
Subscribers
None
D43479.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D43479: arm64: fix db_read_bytes() for size == 8
Attached
Detach File
Event Timeline
Log In to Comment