site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Mar 16, 2006, at 10:39 AM, david tay wrote: Hi, Program received signal SIGTRAP, Trace/breakpoint trap. 0x0009ff50 in hpfBadPmap () My memory allocations are done either myMemory = IOMalloc(), buffer2 = OSTypeAlloc(), buffer2->initSubRange(); buffer2->prepare(); -- 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... I'm getting random kernel panics when my kext is used with the following message - It seems that the physical mapping is somehow incorrect. Any ideas on what could be causing this? buffer = IOBufferMemoryDescriptor:withOptions(kIODirectionInOut, some_computed_size, page_size); bufferPtr = buffer->getBytesNoCopy(); Check that the pointers returned to your allocation requests have not been denied, before you dereference the pointers. Turn on the debugging flags indicated in the kernel debugging documentation that comes with the kernel debug kits, and also on developer.apple.com, so that you can provide better information other than "it panic's" - e.g. Is it a DAR panic, and if so, at what address does the panic happen, and if it's a low address, is this indicative of you dereferencing a NULL pointer, etc., etc.. If none of this is happening because of a direct coding error, then that panic is somewhat indicative of your kext going off into the weeds and corrupting pmap data structures in memory. If your kext is a device driver for a device that uses DMA, make sure that the DMA target addresses are not required to be in low memory because the device in question is unable to address as much memory as you have in the system, either as a result of a devie limitation or a bus limitation - if you pass a DMA request an out of range memory address, it will (obviously) wrap to that address modulo the number of bits it's capable of addressing, and then the transfer will take place to memory other than the memory you were intending it to go to. In general, it's probably time for you to start to become comfortable with two machine kernel debugging. More information is available from developer.apple.com. This email sent to site_archiver@lists.apple.com