The tool called mdevx was developed in Year 2008 for Coldfire 7475 silicon.
https://www.rockbox.org/wiki/pub/Main/DataSheets/CFPRM.pdf
mdevx is a simple user space command-line tool, used to read /write to hardware locations in a 32 bit Armv7-A and INTEL x86_64 architectures:
ARM Cortex-A5
ARM Cortex-A7
ARM Cortex-A8
ARM Cortex-A9
ARM Cortex-A12
ARM Cortex-A15
ARM Cortex-A17
X86_64
It is a standalone tool.
It it reccommended for the 32 bit MMU class of silicon: armv7, ColdFire and similar architectures.
It does a similar functionality/job as the Open Source tool: devmem2 .
I strongly reccommend for x86 and x86_64 architecture the following tool:
gcc mdevx.c -o mdevx
gcc -o mdevx mdevx.c
Usage is very simple - help built-in/included within the tool:
$ sudo ./mdevx
# mdevx
--------------------------------------------------------------------------------
Mdevx Read/Write Utility
Copyright (c) 2008 - 2025 Zoran Stojsavljevic. All rights reserved.
--------------------------------------------------------------------------------
Usage: ./mdevx <addr> <data> (for writing tool expects 2, 4 or 8 nibbles exact)
Usage: ./mdevx <addr> <format> <#> (for # (default 1) reading, format is b/h/w)
Usage: ./mdevx <addr> (interactive mode, 8 nibbles exact for <addr>)
Interactive mode: <offset> <data/format> (description for data/format above)
Interactive mode: <cr> (repeat previous format by entering <cr>)
--------------------------------------------------------------------------------
I reccommend to test the tool browsing BBB memory (from kernel source code, the file:
<kernel_root_directory>/arch/arm/boot/dts/am335x-bone-common.dtsi
line 13: memory@80000000 {
line 14: device_type = "memory";
line 15: reg = <0x80000000 0x10000000>; /* 256 MB */
line 16: }
Write command:
root@arm:/home/debian/mdevx# ./mdevx 0x82000000 0x41424344
32 bit data written [0x82000000] = 0x41424344
Read command:
root@arm:/home/debian/mdevx# ./mdevx 0x82000000 w
32 bit data read [0x82000000] = 0x41424344
Interactive mode examples:
root@arm:/home/debian/mdevx# ./mdevx 0x82000000
[base address 0x82000000], <offset> <data|b/h/w>? 0 b <<== offset 0, byte size (8 bit)
8 bit data read [0x82000000] = 0x44
[base address 0x82000000], <offset> <data|b/h/w>?
8 bit data read [0x82000001] = 0x43
[base address 0x82000000], <offset> <data|b/h/w>?
8 bit data read [0x82000002] = 0x42
[base address 0x82000000], <offset> <data|b/h/w>?
8 bit data read [0x82000003] = 0x41
[base address 0x82000000], <offset> <data|b/h/w>?
root@arm:/home/debian/mdevx# ./mdevx 0x82000000
[base address 0x82000000], <offset> <data|b/h/w>? 0 w <<== offset 0, word size (32 bit)
32 bit data read [0x82000000] = 0x41424344
[base address 0x82000000], <offset> <data|b/h/w>?
32 bit data read [0x82000004] = 0x13105a4d
[base address 0x82000000], <offset> <data|b/h/w>?
32 bit data read [0x82000008] = 0x13105a4d
[base address 0x82000000], <offset> <data|b/h/w>?
32 bit data read [0x8200000c] = 0x13105a4d
[base address 0x82000000], <offset> <data|b/h/w>?
Memory dump example:
root@arm:/home/debian/mdevx# ./mdevx 0x82000000 b 256
0x82000000 0x44 0x43 0x42 0x41 0x4d 0x5a 0x10 0x13 - 0x4d 0x5a 0x10 0x13 0x4d 0x5a 0x10 0x13 DCBAMZ..MZ..MZ..
0x82000010 0x4d 0x5a 0x10 0x13 0x4d 0x5a 0x10 0x13 - 0x4d 0x5a 0x10 0x13 0x03 0xf0 0x4f 0xe2 MZ..MZ..MZ....O.
0x82000020 0x00 0xf0 0xee 0xbf 0x18 0x28 0x6f 0x01 - 0x00 0x00 0x00 0x00 0x00 0x32 0x86 0x00 .....(o......2..
0x82000030 0x01 0x02 0x03 0x04 0x45 0x45 0x45 0x45 - 0x1c 0x68 0x00 0x00 0x40 0x00 0x00 0x00 ....EEEE.h..@...
0x82000040 0x50 0x45 0x00 0x00 0xc2 0x01 0x02 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 PE..............
0x82000050 0x00 0x00 0x00 0x00 0x90 0x00 0x06 0x03 - 0x0b 0x01 0x02 0x14 0x00 0x20 0x86 0x00 ............. ..
0x82000060 0x00 0x14 0x00 0x00 0x00 0x00 0x00 0x00 - 0x51 0x25 0x00 0x00 0x00 0x10 0x00 0x00 ........Q%......
0x82000070 0x00 0x30 0x86 0x00 0x00 0x00 0x00 0x00 - 0x00 0x10 0x00 0x00 0x00 0x02 0x00 0x00 .0..............
0x82000080 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0x82000090 0x00 0x44 0x86 0x00 0x00 0x10 0x00 0x00 - 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 .D..............
0x820000a0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0x820000b0 0x00 0x00 0x00 0x00 0x06 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0x820000c0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0x820000d0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0x820000e0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x2e 0x74 0x65 0x78 0x74 0x00 0x00 0x00 .........text...
0x820000f0 0x00 0x20 0x86 0x00 0x00 0x10 0x00 0x00 - 0x00 0x20 0x86 0x00 0x00 0x10 0x00 0x00 . ....... ......
ID_VENDOR=Hewlett-Packard
ID_MODEL=HP EliteBook 840 G1
Using a PHY_ADDR MCHBAR: 0xfed10000 (aligned to a PHY_ADDR_SIZE) PHY_ADDR_SIZE is 4096 bytes long.
Please, do note that on this PC archlinux is also used as OS!
Read command:
[vuser@archlinux tool_mdevx]$ sudo ./mdevx 0xfed10000 w
32 bit data read [0xfed10000] = 0x06b0d53f
Interactive mode examples:
[vuser@archlinux tool_mdevx]$ sudo ./mdevx 0xfed10000
[base address 0xfed10000], <offset> <data|b/h/w>? 0 w <<== offset 0, word size (32 bit)
32 bit data read [0xfed10000] = 0x06b0d53f
[base address 0xfed10000], <offset> <data|b/h/w>?
32 bit data read [0xfed10004] = 0x06b0d745
[base address 0xfed10000], <offset> <data|b/h/w>?
32 bit data read [0xfed10008] = 0x00000000
[base address 0xfed10000], <offset> <data|b/h/w>?
32 bit data read [0xfed1000c] = 0x00000000
[base address 0xfed10000], <offset> <data|b/h/w>?
32 bit data read [0xfed10010] = 0x7775ab9a
[base address 0xfed10000], <offset> <data|b/h/w>?
Memory dump example:
[vuser@archlinux tool_mdevx]$ sudo ./mdevx 0xfed10000 b 256
0xfed10000 0x3f 0xd5 0xb0 0x06 0x45 0xd7 0xb0 0x06 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 �h٬�?...E...........
0xfed10010 0x9a 0xab 0x75 0x77 0xaa 0xbb 0x76 0x77 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ..uw..vw........
0xfed10020 0x2a 0x15 0x72 0x03 0x2c 0x19 0x72 0x03 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 *.r.,.r.........
0xfed10030 0xba 0xab 0x95 0x66 0xa9 0xab 0x75 0x66 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ...f..uf........
0xfed10040 0x05 0x84 0x33 0x19 0x08 0x0e 0x53 0x23 - 0x00 0x00 0x00 0x00 0x77 0x77 0x77 0x77 ..3...S#....wwww
0xfed10050 0x9f 0xfd 0xef 0xfe 0xbb 0x7d 0xef 0xfe - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 .....}..........
0xfed10060 0x10 0x65 0x38 0x2c 0x00 0xb0 0x02 0x00 - 0x3a 0x45 0x0e 0x00 0x64 0x81 0x4d 0x00 .e8,....:E..d.M.
0xfed10070 0x00 0x00 0x00 0x00 0x00 0x00 0x40 0x04 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ......@.........
0xfed10080 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0xfed10090 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0xfed100a0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0xfed100b0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0xfed100c0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0xfed100d0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0xfed100e0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................
0xfed100f0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ................