RE: Basic Kernel Extension Programming questions
RE: Basic Kernel Extension Programming questions
- Subject: RE: Basic Kernel Extension Programming questions
- From: Hajime Inoue <email@hidden>
- Date: Fri, 18 Nov 2011 12:04:30 -0500 (GMT-05:00)
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=email@hidden
[mailto:darwin-kernel-bounces+hinoue=email@hidden] On
Behalf Of Andrew Gallatin
Sent: Friday, November 18, 2011 11:46 AM
To: Eric Gorr
Cc: email@hidden
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
om
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden