-
Notifications
You must be signed in to change notification settings - Fork 13
Home
This is a variation of the honorable devmem utility (a.k.a. devmem or "mem").
It is similar to the devmem, but not 100% compatible. The original devmem cannot be used as drop-in replacement of this one.
Differences:
- Validation of parameters. The original variant skips it.
- Limited the spew to help parsing output (this is breaking change for parsing/screening the output)
- Removed the mandatory reads before and after write (but left read-back after write as option). May be a breaking change if reads from the device are destructive.
The memory we need to access is I/O memory, a memory mapped thru some PCI device's BARs. The BAR physical base address will vary on different host systems. (Yes we know about /sys/bus/pci/...
- but we have existing code that uses fixed physical addresses to maintain).
We have also a simple "devmem library" for C and Python programs that need memory access; it will hide the ugly details of mmap'ing /dev/mem -- or it can use /sys/bus/pci/...
instead of /dev/mem
for PCI BARs and config space. It is in devmemlib repo.
For Linux only.
Enjoy.
NOTE: The other branch (TC-feature) will be deleted. Do not use it.