| Summary: | devmem2 w (word) is 8 bytes in x86 64 systems | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Ciro Santilli <ciro.santilli> |
| Component: | Other | Assignee: | Carlos Santos <unixmania> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | buildroot |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Ciro Santilli
2017-08-05 20:20:22 UTC
FYI, the busybox version of devmem is the most up to date and supports quadword access. This app I believe is just for backwards compatibility and there are other address casting address issues with 32bit access on a 64bit bus (like on the SoC FPGA ARM processors) with this tool. Maybe a note should be added to the package to reflect it's in a partially depreciated state? Or we should remove it and make it a virtual package setting the busybox option to enabled? Thanks! I didn't know busybox had devmem2. And that one use uintX_t types already. The devmem2 package should be deprecated if possible. I'm taking this one. This bug has been frozen for two years. I think we could simply replace devmem2 by a shell script that invokes the busybox devmem utility, mapping the 'type' argument to the corresponding 'width' one, keeping backward compatibility: b -> 8 h -> 16 w -> 32 Do you agree? busybox 1.17.2 has:
Usage: devmem ADDRESS [WIDTH [VALUE]]
Read/write from physical address
ADDRESS Address to act upon
WIDTH Width (8/16/...)
VALUE Data to be written
I forgot the original motivation, but I think this covers it?
(In reply to Ciro Santilli from comment #4) I found that ti-gfx contains a script using devmem2 and submitted a patch to remove the dependency: https://patchwork.ozlabs.org/patch/1145451/ There are still 8 board configurations that select devmem2, for reasons that I don't know: - at91sam9x5ek_dev_defconfig - at91sam9x5ek_mmc_dev_defconfig - atmel_sama5d27_som1_ek_mmc_dev_defconfig - atmel_sama5d2_xplained_mmc_dev_defconfig - atmel_sama5d3_xplained_dev_defconfig - atmel_sama5d3_xplained_mmc_dev_defconfig - atmel_sama5d4_xplained_dev_defconfig - atmel_sama5d4_xplained_mmc_dev_defconfig Thanks Carlos for taking care of the issue. It certainly makes sense to use the devmem applet from Busybox, when Busybox is enabled. However, I'm wondering if it makes sense to keep a standalone version of this program. Most (all?) applets provided by Busybox also have a counterpart "full-blown" version, which can be useful in situations where Busybox is not used. Overall, it feels like this bug is not really a Buildroot bug: it's an upstream devmem2 bug, which should be reported to upstream and not to Buildroot. (In reply to Thomas Petazzoni from comment #6) Considering that devmem2 is abandoneware and that after commits 2f6e3eae55 and 559856480b6 it is not used by any package or board in Buildroot I think we can either leave it as is or simply drop the package. It can be resurrected later, if necessary. |