Hi,
My kext creates it's own IOATAController and IOATADevice nub. After registering my IOATADevice nub, I get a kernel panic. Tracing through the stack, it looks like it's happening when the protocol service driver (IOATABlockStorage.kext) tries to load:
0x410e94 <IOService::startCandidate(IOService*)+344>: xor íx,íx
0x412c47 <IOService::probeCandidates(OSOrderedSet*)+1695>: mov %al,-0x3a(ëp)
0x4124ab <IOService::doServiceMatch(unsigned long)+375>: mov (ëx),êx
0x411127 <_IOConfigThread::main(_IOConfigThread*)+273>: jmp 0x411142 <_IOConfigThread::main(_IOConfigThread*)+300>
Is there something I could be doing wrong that is causing this panic? I find that if I register a device of type ATAPI, the matching is occuring correctly and the IOATAPI service driver loads against my nub.
It's only when I have my IOATADevice nub with the "ata device type" as "ata" and actually register the service that the panic occurs. Here's the log I receive:
panic(cpu 0 caller 0x001A8CD4): Kernel trap at 0x00000000, type 14=page fault, registers:
CR0: 0x8001003b, CR2: 0x00000000, CR3: 0x00fc0000, CR4: 0x00000660
EAX: 0x04bcbe00, EBX: 0x00000000, ECX: 0x00000000, EDX: 0x00010004
CR2: 0x00000000, EBP: 0x37157e48, ESI: 0x04bd1200, EDI: 0x03f55f00
EFL: 0x00010246, EIP: 0x00000000, CS: 0x00000008, DS: 0x00000010
Error code: 0x00000010
Backtrace, Format - Frame : Return Address (4 potential args on stack)
0x37157c28 : 0x12b0fa (0x4592a4 0x37157c5c 0x133243 0x0)
0x37157c78 : 0x1a8cd4 (0x46280c 0x0 0xe 0x461fbc)
0x37157d58 : 0x19ede5 (0x37157d70 0x4bd1200 0x37157e48 0x0)
0x37157d68 : 0x0 (0xe 0x48 0x10 0x41f0010)
0x37157e48 : 0x410e94 (0x4bd1200 0x3f55f00 0x1 0x3eb770)
0x37157ea8 : 0x412c47 (0x3f55f00 0x4bd1200 0x4c15d00 0x4c15ba0)
0x37157f28 : 0x4124ab (0x3f55f00 0x41f54c0 0x0 0xffffffff)
0x37157f78 : 0x411127 (0x3f55f00 0x0 0x37157fac 0x1)
0x37157fc8 : 0x19ebdc (0x3f4dc20 0x0 0x1a20b5 0x3c394f0)
Backtrace terminated-invalid frame pointer 0
BSD process name corresponding to current thread: kernel_task
Mac OS version:
9E17
Kernel version:
Darwin Kernel Version 9.4.0: Mon Jun 9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386