Walking all the physical memory in an x86 system
From: Hanson, Jonathan M (jonathan.m.hanson_at_intel.com)
Date: 11/30/04
- Previous message: David Woodhouse: "Re: [RFC] Splitting kernel headers and deprecating __KERNEL__"
- Next in thread: Jan Engelhardt: "Re: Walking all the physical memory in an x86 system"
- Reply: Jan Engelhardt: "Re: Walking all the physical memory in an x86 system"
- Maybe reply: Hanson, Jonathan M: "RE: Walking all the physical memory in an x86 system"
- Maybe reply: Jan Engelhardt: "Re: Walking all the physical memory in an x86 system"
- Maybe reply: Hanson, Jonathan M: "RE: Walking all the physical memory in an x86 system"
- Maybe reply: Hanson, Jonathan M: "RE: Walking all the physical memory in an x86 system"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Nov 2004 08:41:17 -0700 To: <linux-kernel@vger.kernel.org>
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/
- Previous message: David Woodhouse: "Re: [RFC] Splitting kernel headers and deprecating __KERNEL__"
- Next in thread: Jan Engelhardt: "Re: Walking all the physical memory in an x86 system"
- Reply: Jan Engelhardt: "Re: Walking all the physical memory in an x86 system"
- Maybe reply: Hanson, Jonathan M: "RE: Walking all the physical memory in an x86 system"
- Maybe reply: Jan Engelhardt: "Re: Walking all the physical memory in an x86 system"
- Maybe reply: Hanson, Jonathan M: "RE: Walking all the physical memory in an x86 system"
- Maybe reply: Hanson, Jonathan M: "RE: Walking all the physical memory in an x86 system"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|