[OpenBIOS] Dictionary size limit per device instance

Asif Haswarey asif.haswarey at qlogic.com
Wed Aug 29 00:06:41 CEST 2007

Ok, I found out what the problem is!
It's the FCode-Number limit, ie. 0x0fff.
For details please look at:
OpenFirmware IEEE-1275 (1994) spec. section 2.3.43.

If I got this right, I am allowed to define/declare only 0x0fff number of
constants and/or functions, variables, defers etc. for which the
tokenizer assigns a FCode-Number in the final tokenized FCode image.
Please look at the constant symbol FCODE_LIMIT in nextfcode.h
in fcode-utils-1.0.2 suite at:

Now given that today we have complex feature rich PCI based
plugin cards, I can see FCode images of size 50K+ in order to
support the various features. I don't expect to see a revision of the
original OpenFirmware IEEE-1275 (1994) spec., but should we reconsider this
FCode-Number limitation?

Moreover, I am actually running into this limitation for one of our PCI-E
plugin cards!
Äsif Haswaréy
QLogic Corporation
FCode Driver Development

-----Original Message-----
From: openbios-bounces at openbios.org [mailto:openbios-bounces at openbios.org] On Behalf Of David L. Paktor
Sent: Wednesday, August 22, 2007 7:30 PM
To: The OpenBIOS Mailinglist
Subject: Re: [OpenBIOS] Dictionary size limit per device instance

Asif Haswarey wrote:
>> With that arrangement, the amount of dictionary space available to plug-in device drivers was virtually unlimited! 
> Weel, I ran into this problem while testing (QLogic iSCSI) FCode I had developed for the SPARC.
> I experimented with a dummy fcode consisting of only constant declarations.
> The FCode failed to get interpreted when the total tokenized size 
> reached just a little above 50KB (that's kilo-bytes). Unfortunately I system OBP would not let me use the "here"
> word to find out the exact size of the dictionary space my dummy FCode 
> used up. So I figured the dictionary space available for my FCode is 
> basically a portion of the overall dictionary space available to the 
> system. In short, every device FCode has a limit of dictionary space available to it.
> Is my understand correct? If so, then this is what my question is about concerning OpenBIOS.

Well, it's not an inherent characteristic of Open Firmware, nor of OBP.  
It might depend on the
platform where you were running your test.  If it was one of the E{3..6}{0,5}00 servers, that would be consistent.  Incidentally, what happened when you hit the limit?

As for seeing "here" from FCode:

defer my_here
 '  noop to my_here
" here" $find if  to my_here  then

( you might need a  "drop"  after  the "if"; I forgot whether  $find returns just the XT or the "immediate" indicator, too...)

Then you can rock'n'roll with  my_here  to show you where you are...


David L. Paktor             dlpaktor at netscape.net

OpenBIOS                 http://openbios.org/
Mailinglist:  http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you

More information about the OpenBIOS mailing list