Messages in this thread | | | Subject | Walking all the physical memory in an x86 system | Date | Tue, 30 Nov 2004 08:41:17 -0700 | From | "Hanson, Jonathan M" <> |
| |
I've written a 2.4 kernel module where I'm trying to walk and record all of the physical memory contents in an x86 system. I have the following code fragment that does it but I suspect I'm missing a portion of the memory:
unsigned long memory_address = PAGE_OFFSET; struct sysinfo RC_sys_info;
si_meminfo(&RC_sys_info);
while (__pa(memory_address) < RC_sys_info.totalram * PAGE_SIZE) { /* Read and record memory contents here. */ memory_address += 4; }
Is there a better way to record all of the contents of physical memory since what I have above doesn't seem to get everything?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |