RE: Basic Kernel Extension Programming questions
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: AcymEZdNk3KhPFbgRIKs1DDbuCgSZwAAC0/w You are making the assumption that physical memory is contiguous. This will give you an error (or crash the machine) if you insist on reading device-backed memory. This is easy to do because device-mapped regions end up between regions of actual memory. Amit Singh's blog has a dtrace macro that replicates the showbootermemorymap kernel debug macro: http://osxbook.com/blog/2009/02/25/displaying-the-physical-memory-map/ This will give you the map and the type of memory in each region. I think it's safe to read all region types except MemMapIO and MemPortIO. -Jim -----Original Message----- From: darwin-kernel-bounces+hinoue=atc-nycorp.com@lists.apple.com [mailto:darwin-kernel-bounces+hinoue=atc-nycorp.com@lists.apple.com] On Behalf Of Andrew Gallatin Sent: Friday, November 18, 2011 11:46 AM To: Eric Gorr Cc: darwin-kernel@lists.apple.com Subject: Re: Basic Kernel Extension Programming questions On 11/18/11 11:41, Eric Gorr wrote:
Thank you for the reply.
I had considered that and tried 4096 bytes -1 page. Still panics. Very frustrating especially since I know doing this is possible ( google MacMemoryReader ).
It may be a bit smarter, and try to discover what physical addresses are actually backed by memory, rather than devices, and avoid device backed memory. Drew _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/hinoue%40atc-nycorp.c om This email sent to hinoue@atc-nycorp.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Hajime Inoue