On Mon, Jul 29, 2019 at 06:44:19PM +0200, BALATON Zoltan wrote:
On Mon, 29 Jul 2019, Segher Boessenkool wrote:
On Mon, Jul 29, 2019 at 04:34:18PM +0200, BALATON Zoltan wrote:
Note that all those are bus-specific, and a correct implementation of these words has to look at the FCode 235 (etc.) of the bus you are on, and inherited from its parent bus, etc.
I don't understand any of the above... What's FCode 235? Also OpenBIOS
FCode hex 235. The FCode generated for rl! iirc. This is pretty trivial to look up, btw.
I did try to look up but haven't succeeded. Checked forth/device/table.fs in OpenBIOS but that does not have indexes so it's not obvious what 235 means
You look at the Open Firmware specification. You can for example google for "of1275.pdf". Searching in that pdf for the string "235" gets you to what you need to know immediately.
(also wasn't sure if it's hex or dec, now I at least know its h# 235 or 0x $ h or whatever convention one prefers).
0eb is a reserved FCode.
I've also tried searching for "fcode bytecode" to find out which did turn up some docs but not any tables about which number means what so it does not look too trivial to decode this. Maybe if you know where to look it is so you could tell us.
Annex G.2, "Assigned FCode numbers", is something you want to know how to find, just like all of Annex A.
only handles one PCI bus at the moment so not sure that additional complexity you mention exists in it yet. The io* words do what needs to be done to read and write mapped registers (on ppc doing eieio or similar,
Which isn't enough in all cases.
In what cases is it not enough?
In many cases. OF requires the access to have been performed wrt to the actual device that is accessed before the next word starts executing. This doesn't come natural to PowerPC at all. You can cheat a little bit here, but not much. "eieio" might be enough for stores in some cases, but it isn't for loads, not on most real hardware at least.
Sure it's a step up from not doing anything here, but you will run into trouble very soon.
If you see where we might run into trouble please explain so we don't have to debug that when it happens and we're aware of the limitations this solution has.
That's what I did!
You need to implement rb@ and friends *per bus node*, and redirect via FCode for them. Which is unusual, but there you have it.
Segher