Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

About FCode driver

 
   Macintosh computer (Home) -> General Discussion RSS
Next:  That mysterious "dev" folder  
Author Message
roturier

External


Since: Aug 27, 2006
Posts: 2



(Msg. 1) Posted: Sun Aug 27, 2006 9:04 pm
Post subject: About FCode driver
Archived from groups: comp>sys>mac>programmer>misc, others (more info?)

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

 >> Stay informed about: About FCode driver 
Back to top
Login to vote
Dennis Ruffer

External


Since: Aug 28, 2006
Posts: 2



(Msg. 2) Posted: Mon Aug 28, 2006 9:48 am
Post subject: Re: About FCode driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2006-08-28 00:04:24 -0400, said:

> 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.
>
> 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.
>
> 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.
>
> 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.
>
> Thanks in advance for any help!
>
> KC

DaR

 >> Stay informed about: About FCode driver 
Back to top
Login to vote
roturier

External


Since: Aug 27, 2006
Posts: 2



(Msg. 3) Posted: Tue Aug 29, 2006 7:37 pm
Post subject: Re: About FCode driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
 >> Stay informed about: About FCode driver 
Back to top
Login to vote
Dennis Ruffer

External


Since: Aug 28, 2006
Posts: 2



(Msg. 4) Posted: Thu Aug 31, 2006 10:21 pm
Post subject: Re: About FCode driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2006-08-29 22:37:25 -0400, said:

> 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
 >> Stay informed about: About FCode driver 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
USB Device Driver for Mac OS X - Hi, I am trying to write a USB Device Driver for MAC OS X. Is there any sample code or guide to help me start with it. thanks, Amit

PCI driver examples - Hi.. are there any known to be good and actually complete & working examples of an OSX PCI driver for some simplish PCI card?? I have got material from PCIDDK etc. I just would like to have some more material before I start my crusade :) The aim - if...

USB HID keyboard device plugged in, driver not loaded -

modify OS X keyboard mappings - Hello, I need to have access to the french characters. I can do this with the Canadian - CSA keyboard. However, that keyboard has a "," as a decimal. I need a ".". Changing it in the international control panel does not change...

Shared memory - Hello all, If you're not on the beach maybe you can give me a little help. I need to implement shared memory between my application and a helper tool. At first I tried CFMessageProts. This works, but if you transport huge amounts of data the data get al...
   Macintosh computer (Home) -> General Discussion All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]