On Sun, 14 Jul 2019, Mark Cave-Ayland wrote:
On 13/07/2019 21:34, BALATON Zoltan wrote:
I think we can conclude that it gets exception because all the words it tries to use: map-in, config-b@, config-b! are missing in OpenBIOS so it can't really work and likely trips on map-in already.
Right. Certainly words like my-parent won't work in FCode for PCI devices until I finish work getting the PCI ihandle instance chain fixed up, and as JD mentioned before, the PCI config words aren't yet implemented but should be fairly trivial.
OK so it's even worse. Not only map-in and config-b[!@] words are missing but also the my-* words don't return what they should that's what you're saying? Looks like that's the case. In OpenBIOS:
0 > " /pci/ATY" select-dev ok 0 > .properties name "ATY" vendor-id 1002 device-id 5046 revision-id 0 class-code 30000 min-grant 0 max-latency 0 devsel-speed 0 subsystem-vendor-id 1af4 subsystem-id 1100 cache-line-size 0 device_type "display" model "ATY Rage128" compatible "VGA" assigned-addresses -- 3c : 42 00 78 10 00 00 00 00 81 00 00 00 00 00 00 00 01 00 00 00 01 00 78 14 00 00 00 00 00 00 10 00 00 00 00 00 00 00 01 00 02 00 78 18 00 00 00 00 82 00 00 00 00 00 00 00 00 00 40 00 reg 00007800 00000000 00000000 00000000 00000000 42007810 00000000 00000000 00000000 01000000 01007814 00000000 00000000 00000000 00000100 02007818 00000000 00000000 00000000 00004000 width 320 height 258 depth 20 linebytes c80 address 81000000 ok 0 > my-self . 1fc5abfc ok 0 > my-space ok 1 > . 0 ok 0 > my-address ok 2 > . 0 ok 1 > . 0 ok 0 > my-unit ok 3 > . 7800 ok 2 > . 0 ok 1 > . 0 ok 0 >
So then even computing the parameter to map-in is probably wrong in the word where it gets exception:
: _926 my-address 01000014 + my-space + _867 " map-in" _91f TO _86c 4 my-space + dup " config-b@" _91f 1 or swap " config-b!" _91f ;
I think these my-* values should have some numbers instead of 0. What's the problem here? Looks like it returns first value from reg but shouldn't it return something from assigned-addresses instead?
Regards, BALATON Zoltan