memorymemory-managementembeddedembedded-linuxnon-volatile

Working with memory on an embedded devices


Embedded device running Linux. As common, the MTD device file subsystem is used for interacting with flash memory.

I have a few questions about memory managing on such devices. Device memory map specification is not available. There us few methods to access memory on an embedded device, on of them is direct call to memory address, for example, when directly write some value to memory address when debug, or use command to read at physical address:

show <hex address> <number of words to display>

Does this command perform accessing to the NVRAM NOR flash memory or RAM memory of device? Does it possible do reverse this process, i.e. to find memory address where "lives" a particular setting? Assuming we know a specific value and we know that value is stored somewhere is memory. Is it ever possible to find address?


Solution

  • Does this command perform accessing to the NVRAM NOR flash memory or RAM memory of device?

    Yes, the command works for both types of memory, and usually any other memory that is listed in the OS memory map (i.e., PCI device memory).

    Does it possible do reverse this process, i.e. to find memory address where "lives" a particular setting? Assuming we know a specific value and we know that value is stored somewhere is memory. Is it ever possible to find address?

    Yes, if you have control of the compilation, there are tools like objdump and nm that allow you to decompose the binary. If you only have the deployed system, you want to look into reverse engineering.