Title: Re: Kernel panic on Intel based Mac with more than
2GB of
Or, you can use
IOBufferMemoryDescriptor::inTaskWithPhysicalAddress() to allocate your
DMA buffers, and you can pass a mask to restrict them to be allocated
in 32-bit physical address space. This is particularly important
if your DMA hardware only supports 32 bit physical addresses.
One nice thing about this is that you don't have to change any of your
IOMemoryCursor code (and update to IODMACursor), it just works.
Also, this is nice if you need to support older (PPC) systems.
You can just call inTaskWithPhysicalAddress() if compiling for Intel,
and then require 10.4.8 on the Intel side (this API is present on all
Intel systems as of 10.4.8). On the PPC side you just leave it
as it was. Then you can have a single universal binary.
If you need to support older that 10.4.8 on the Intel side,
things get a bit more complicated, and you may need to do what Garth
suggests with separate KEXTs.
Jim
At 2:01 PM -0700 10/6/06, Garth Cummings wrote:
Hi Dave,
On Oct 6, 2006, at 1:33 PM, Dave Canfield
wrote:
We have a universal binary driver for a
SATA HBA that seems to work fine
unless its running on an Intel Mac with
more than 2GB of memory
installed. If there is more than
2GB of memory the system eventually
will panic with the following message in
the panic log:
panic(cpu 3 caller 0x003A1D25):
getPhysicalSegment() out of 32b range
0x100000000, len 0x8000, class
IOGeneralMemoryDescriptor
The problem is that getPhysicalSegment
returns a 32 bit address. The panic means that the physical address
won't fit in 32 bits, which is the case on Mac Pro systems with more
than 2.5 GB of physical memory.
Depending on what you're doing, you need
to move to using IODMACommand, or use getPhysicalSegment64. These
functions are new as of the Mac Pro but work on all 64-bit capable
machines as of 10.4.8.
If you need to support machines older
than 10.4.8 (duh!) you'll need to have a KEXT that uses the old API
that loads on those systems and a separate KEXT that uses the new API
for newer systems. Each KEXT will have to have its own
CFBundleIdentifier, and one KEXT can live in the PlugIns directory
within the other for ease of installation. Use the OSBundleLibraries
version numbers to control which KEXT loads on which OS
versions.
If you drop a line to <email@hidden> we can get you a
sample PCI driver that shows how to use IODMACommand.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden
This email sent to email@hidden