[OpenBIOS] FCode Limit (Was:Dictionary size limit per deviceinstance)

Asif Haswarey asif.haswarey at qlogic.com
Wed Aug 29 19:54:35 CEST 2007


> That being said, I'm still very puzzled:  What are you using for a
> tokenizer? I am quite certain that the tokenizer obtainable from the
> OpenBIOS project issues an unambiguous error-message when that limit
> is exceeded.

I did not give the details, but this error message is what led me to
conclude with further experimentation that the FCode-Number limit was
the culprit! Here is the error message:

| Fatal Error:  File junk1.fth, Line 2048.  (Output Position = 29766).
| (PCI-Block Position = 29714).  Too many definitions.  Assigned FCode
| exceeds limit specified by IEEE-1275.
| Tokenization terminating.
| Suppressing binary output.

Interesting to note that Sun's tokenizer does not catch this problem
and simply builds the image. I have not tried to find out the upper limit
at which the tokenizer complains.

> http://www.openbios.org/data/fcodesuite/Documents/toke.html#mozTocId573280

> These features allow you to re-use the assigned FCode numbers.
> It's a tricky operation, but done carefully, it will allow you
> to pack a lot of functionality into your code.  If you're still
> in contact with our mutual colleagues in Austin, ask them -- they
> should be able to give you more detailed advice.

I is a helpful pointer! I am going to investigate this further! Thanks!

> That isn't going to happen without an updated Standard.
> That would be a Good Thing, and I am certainly -- in
> principle -- in favor of it.  But it won't help with
> your short-term (i.e., present) needs.

Very unfortunate if the IEEE-1275 Std. never gets updated, and if that's
the case, it a grim indication of a serious lack of interest by the big
guys! However, I don't see what could stop the developers/maintainers of
OpenBIOS from updating the std. (with consultation from Mitch Bradley and
other _interested_ folks.)

_____________
Äsif Haswaréy
QLogic Corporation

-----Original Message-----
From: openbios-bounces at openbios.org [mailto:openbios-bounces at openbios.org] On Behalf Of David L. Paktor
Sent: Tuesday, August 28, 2007 11:23 PM
To: The OpenBIOS Mailinglist
Subject: [OpenBIOS] FCode Limit (Was:Dictionary size limit per deviceinstance)

Asif Haswarey wrote:
> 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.
>   

Oh, for goodness sake.  Sometimes, when we're looking for a mystery we overlook the most obvious thing!
> 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:
> http://www.openbios.org/viewvc/fcode-utils.tar.gz?view=tar&root=OpenBI
> OS&pathrev=113
>   

It's not merely a detail of implementation; it's fundamental to the structure of FCode.

And, as you noted, a part of the Standard.

That being said, I'm still very puzzled:  What are you using for a tokenizer?  I am quite certain that the tokenizer obtainable from the OpenBIOS project issues an unambiguous error-message when that limit is exceeded.

> 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?
>   

That isn't going to happen without an updated Standard.  That would be a Good Thing, and I am certainly -- in principle -- in favor of it.  But it won't help with your short-term (i.e., present) needs.

> Moreover, I am actually running into this limitation for one of our 
> PCI-E plugin cards!
>   

Indeed!  Devices are reaching new levels of complexity never envisioned when the '94 Standard was being developed.  Fortunately, you are not the only -- or first -- to run up against this limitation.  Even more fortunately, some of the earlier encounterers were among the Alpha-testers who inspired the features documented in the section of the OpenBIOS Tokenizer User's Guide to New Features (or whatever it's called...  ;-}  ) headed "Manipulating the FCode-Token-Number Assignment Counter" .  Look
under:

http://www.openbios.org/data/fcodesuite/Documents/toke.html#mozTocId573280

These features allow you to re-use the assigned FCode numbers.  It's a tricky operation, but done carefully, it will allow you to pack a lot of functionality into your code.  If you're still in contact with our mutual colleagues in Austin, ask them -- they should be able to give you more detailed advice.

I hope this helps...

-- 

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