viewing and changing content in physical memory
My device is mapped into specific memory address (I think it is on PCI bus if it make any difference). In order to debug it I need to view/modify certain addresses. Is it possible to have some utility to do this from the command line. If I have something like:
void memset(int offset) { int *ptr = 0xffff0100; cache_invalidate(); ptr[offset]= 0x1234678; // cache_purge(); /* this might be better instead of * cache_invalidate() before changing * memory content */ } Does it really write to address 0xffff0100 or some virtual DRAM location? Are there standard library functions which deal with cache management? (I don't want to learn cache internals, and another assembly just for this purpose). BTW: on my target there is no /dev/mem - it is very lean embedded Linux. Thanks to everybody who could shed a light on the topic. |
You probably would get a better response in the programming forum.
might wanna ask an admin to move it. |
Moved.....
|
Have a look at (Corbett et al) LDD3.
Has a section just describing exactly this - including the memory update. Might give you some ideas. Uses kdb though - might be a bit tough to arrange in an embedded environment. |
All times are GMT -5. The time now is 07:56 AM. |