system memory map info when system boots up
Hi All,
I am working on memory diagnostics which includes test suit and utilities. One of the utility ( ‘memory dump’) requires to access entire physical memory and dump its content.
Physical addresses can be accessed through following API’s which are used at different situations
ioremap(offset, size) ;
phys_to_virt(phys_addr);
phys_to_virt() takes the physical address as an argument and gives the already mapped virtual address at system boot up. It will not create any page table entry. So this API is used to get already mapped virtual addresses.
ioremap API creates a page table entry and maps the specified size and returns the starting virtual address. But this API can’t be used for the physical addresses which is already mapped when system comes up.
Now, I want to know the ‘last(final) physical address which is mapped already when system boots up. Where can I get this info ? Any data structure stores this info ?
This info helps me to use above mentioned API’s at right conditions
Thanks
Pradeep
|