Discussion:
About FCode driver
(too old to reply)
r***@gmail.com
2006-08-28 04:04:24 UTC
Permalink
Hi there,

First of all, this messgae is cross-posted in both
comp.sys.mac.programmer.misc and comp.lang.forth.mac.

I am writing the FCode driver for some storage adapter
for PPC Mac. Some work has been done so far that Mac
OSX can install into the volume of the adapter. However,
after system reboots, the BUSY LED of the adapter flashs
for like 5 seconds(lots of data have been read) and system
just hangs. Apple logo is shown then but not the spinner,
and system fan starts full-speed running after a few
seconds. The adapter firmware side is checked; All issued
commands are completed normally, and they are all from
FCode driver, not any one from encapsulated runtime driver.

The kernel panic messages looks like this. (with boot-args
flag -v)

standard timeslicing quantum is 10000 us
vm_page_bootstrap: 122540 free pages
mig_table_max_displ = 70
Added extension "comp.xxxxx.xxxxxx"(vendor name)from archive.
^^^^^^^^^^^^^^ is runtime driver loaded ok??? ^^^^^^^^^^^^^^^
Can't find vtable 10AppleMacIO in (memory-resident kernel)
kld can't map kernel fileerror mapping module file
comp.apple.driver.AppleMacRISC4PE
Can't map comp.apple.driver.AppleMacRISC4PE in preparation for loading
:
blah blah
:

The following points are concerned.

1. Since the documentation for Mac specific open firmware driver
writing is either incomplete or out of date, some mandatory
methods might not be [fully] implemented. I have referenced
the FCode drivers of other vendors' adapters(by "see" UI
command) and some docs/sample codes, but I can't find any
critical methods missing in my driver.

2. Is it possible the transition between FCode driver and the
encapsulated runtime driver is not smooth in some way? Since
OSX can install in the first time, I am not sure if this is
really an issue.

So is there any way to debug in such situation? Or any good
documentation/expert out there?

Thanks in advance for any help!

KC
Dennis Ruffer
2006-08-28 13:48:11 UTC
Permalink
Post by r***@gmail.com
Hi there,
First of all, this messgae is cross-posted in both
comp.sys.mac.programmer.misc and comp.lang.forth.mac.
I am writing the FCode driver for some storage adapter
for PPC Mac. Some work has been done so far that Mac
OSX can install into the volume of the adapter. However,
after system reboots, the BUSY LED of the adapter flashs
for like 5 seconds(lots of data have been read) and system
just hangs. Apple logo is shown then but not the spinner,
and system fan starts full-speed running after a few
seconds. The adapter firmware side is checked; All issued
commands are completed normally, and they are all from
FCode driver, not any one from encapsulated runtime driver.
The appearance of the Apple logo means that Open Firmware has
transfered control to the boot image. The boot image has drawn the
logo, but has not started to load the rest of the kernel yet. In other
words, your FCode driver has succeeded, and as your kernel panic
messages below indicate, you are in the kernel.

The fans ramping up simply mean that no software is controlling them.
The OF driver is no longer running and the OS driver hasn't been
started.
Post by r***@gmail.com
The kernel panic messages looks like this. (with boot-args
flag -v)
standard timeslicing quantum is 10000 us
vm_page_bootstrap: 122540 free pages
mig_table_max_displ = 70
Added extension "comp.xxxxx.xxxxxx"(vendor name)from archive.
^^^^^^^^^^^^^^ is runtime driver loaded ok??? ^^^^^^^^^^^^^^^
Can't find vtable 10AppleMacIO in (memory-resident kernel)
kld can't map kernel fileerror mapping module file
comp.apple.driver.AppleMacRISC4PE
Can't map comp.apple.driver.AppleMacRISC4PE in preparation for loading
blah blah
The following points are concerned.
1. Since the documentation for Mac specific open firmware driver
writing is either incomplete or out of date, some mandatory
methods might not be [fully] implemented. I have referenced
the FCode drivers of other vendors' adapters(by "see" UI
command) and some docs/sample codes, but I can't find any
critical methods missing in my driver.
I'm not sure that this transition logic has ever been documented
properly. Most of the documentation was written before OSX was
introduced.
Post by r***@gmail.com
2. Is it possible the transition between FCode driver and the
encapsulated runtime driver is not smooth in some way? Since
OSX can install in the first time, I am not sure if this is
really an issue.
There is no definition for "smooth" here, only the adjustment of watch
dog values to cover the transition time.
Post by r***@gmail.com
So is there any way to debug in such situation? Or any good
documentation/expert out there?
The are few people who know the pitfalls, and with the Intel
transition, they are all doing something else now.
Post by r***@gmail.com
Thanks in advance for any help!
KC
DaR
r***@gmail.com
2006-08-30 02:37:25 UTC
Permalink
Dennis,

The problem *seems* to be kernel driver matching issue.
I may now let go the FCode driver part and try debugging
in runtime driver side.

Thanks a lot for your kindly help!

KC
Dennis Ruffer
2006-09-01 02:21:14 UTC
Permalink
Post by r***@gmail.com
Dennis,
The problem *seems* to be kernel driver matching issue.
I may now let go the FCode driver part and try debugging
in runtime driver side.
Thanks a lot for your kindly help!
KC
Glad I could be of some help. It does sound like you are on the correct track.

DaR

Loading...