[OpenBIOS] FCode Limit (Was:Dictionary size limit per device instance)
David L. Paktor
dlpaktor at netscape.net
Wed Aug 29 08:23:06 CEST 2007
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=OpenBIOS&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
More information about the OpenBIOS
mailing list