site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thanks for the prompt responses! Please see Technical Note 2063. <http://developer.apple.com/technotes/tn2002/tn2063.html>. Ok, I figured out how to get the logs, etc, out of it. I tried searching on google and the apple developer for the error it reports: AppleDART::mapAddr not mapped for I/O -- and couldn't find anything as to what could be going on. Any hints? Is there some other way to map memory pages? Here is a code snippet of what I'm doing: IOMemoryDescriptor* d = IOMemoryDescriptor::withPhysicalAddress(inStruct->offset, 4096, kIODirectionOut); if(d == NULL){ IOLog("Failed to grab a descriptor\n"); return kIOReturnError; } if(d->prepare() != kIOReturnSuccess){ IOLog("Failed to prepare the page\n"); return kIOReturnError; } char buf[4096]; int copied; copied = d->readBytes(0, (void*) buf, 4096); // <--- Removing this line gets rid of the panic -- makes me think the error is here. -- Terry _______________________________________________ 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... On Apr 4, 2008, at 1:59 PM, Timur Alperovich wrote: Typing "kernel panic" into the search engine on developer.apple.com would turn this up too. You can not do I/O to memory which is not in the I/O memory window mapped by the DART. You are passing it a random buffer, which you did not allocate out of the I/O memory space (apparently, it is off a kernel stack). If you have ever programmed for SPARC or DEC Alpha, they have the same thing. If you haven't, thing "bounce buffers" for 16 bit devices in a 32 PC operating system, or 32 bit devices in a 64 bit PC operating system. Basically, if you follow the examples from <http:// developer.apple.com> and use the proper allocation routine for the buffer, you will be fine. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert