On Tue, 23 Jul 2019, Mark Cave-Ayland wrote:
On 23/07/2019 20:13, BALATON Zoltan wrote:
I hoped to be able to get some texual name or path that I can make sens than only hex numbers to identify where these point to.
If you do show-devs before running your other commands then the values listed there are the phandles. Otherwise you can convert the phandle to a string with the Forth word get-package-path in OpenBIOS so:
feval("active-package get-package-path type cr");
and:
feval("my-self ihandle>phandle get-package-path type cr");
OK, adding back the list to cc because I dropped it accidentally in one of the replies but maybe someone else might also be interested or be able to add something. So now I've added more debug:
static void ob_pci_bus_map_in(int *idx) { PCI_DPRINTF("ob_pci_bar_map_in idx=%p\n", idx); PCI_DPRINTF("active-package: "); feval("active-package get-package-path type"); PCI_DPRINTF(" my-self: "); feval("my-self u. my-self ihandle>phandle get-package-path type cd"); fword(".s"); fword("pci-map-in"); fword(".s"); }
and removed 0-ing my-self from pci-map-in for testing. I get:
0 > " /pci/ATY" open-dev >> ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <7> 1 -a1554 1fc5aba4 -7e000000 0 2007818 4000 <0> ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <3> 0 42007810 1000000 <-3> -c38c0
I think this breaks because my-self pointing to /pci breaks my-#acells used by decode-phys while map-in is called during open-dev. If I disable the open word in /pci/ATY before calling open-dev to avoid this problem to be able to try the FCode ROM I get:
0 > dev /pci/ATY ok 0 > : open -1 ; open isn't unique. ok 0 > load hd:\ati.rom
ob_pci_decode_unit idx=1fc5ac54 ob_pci_decode_unit idx=1fc5ac54 addr=00000000 00000000 00006000 ob_pci_encode_unit space=0 dev=12 fn=0 buf=c
ok 0 > " /pci/ATY" open-dev ok 1 > .s <1> 1fc5ae2c ok 1 > to my-self ok 0 > load-base 40 + 1 byte-load dimensions isn't unique. color! isn't unique. set-colors isn't unique. fill-rectangle isn't unique.
ob_pci_bar_map_in idx=1fc5ae20 active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5adf4 /pci@f2000000 <12> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 0 0 1007814 100 <b> -1 1 0 -1 0 0 -1 -bf5b8 0 0 -1
byte-load: exception caught! ok 0 >
So this still breaks because my-self is /pci here.
Adding back the 0-ing hack to pci-map-in which avoided the first problem with open-dev but still broke with FCode ROM:
0 > " /pci/ATY" open-dev >> ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <7> 1 -a1514 1fc5aba4 -7e000000 0 2007818 4000 <4> 1 -a1514 1fc5aba4 -7e000000 ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <7> 1 -a1514 1fc5aba4 -7f000000 0 42007810 1000000 <4> 1 -a1514 1fc5aba4 -7f000000 ok
my-self and active package is the same yet it works now? I don't understand that.
1 > .s <1> 1fc5ac30 ok 1 > to my-self ok 0 > load hd:\ati.rom ob_pci_decode_unit idx=1fc5acf4
ob_pci_decode_unit idx=1fc5acf4 addr=00000000 00000000 00006000 ob_pci_encode_unit space=0 dev=12 fn=0 buf=c
ok 0 > debug pci-map-in Stepper keys: <space>/<enter> Up Down Trace Rstack Forth ok 0 > dev /pci/ATY ok 0 > load-base 40 + 1 byte-load dimensions isn't unique. color! isn't unique. set-colors isn't unique. fill-rectangle isn't unique.
ob_pci_bar_map_in idx=1fc5ac24 active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <12> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 0 0 1007814 100 ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 0 0 1007814 100 ) fff56d38: drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 0 0 1007814 ) fff56d3c: nip ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 0 1007814 ) fff56d40: nip ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1007814 ) fff56d44: my-self ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1007814 1fc5abf8 ) fff56d48: swap ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 ) fff56d4c: 0 ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 0 ) fff56d50: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 0 fff3c73c ) fff56d58: (to) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 ) fff56d5c: (") ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff56d64 12 ) fff56d78: active-package ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff56d64 12 fff5eaec ) fff56d7c: get-package-property ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed1c 3c 0 ) fff56d80: 0= ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed1c 3c ffffffff ) fff56d84: do?branch ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed1c 3c ) fff56d8c: (begin) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed1c 3c ) fff56d90: decode-phys ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed28 30 81000000 0 42007810 )
but it does not work here, decode-phys only returns addr.hi because my-#acells returns 1 here instead of 3 for some reason but maybe not because of my-self as that seems to be the same.
OK, maybe I should set my-self to the same as active-package instead of 0-ing in pci-map-in? This actually seems to work better (although I don't like this but not having any better idea I have to go with this now):
0 > " /pci/ATY" open-dev >> ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <7> 1 -a1510 1fc5aba4 -7e000000 0 2007818 4000 <4> 1 -a1510 1fc5aba4 -7e000000 ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <7> 1 -a1510 1fc5aba4 -7f000000 0 42007810 1000000 <4> 1 -a1510 1fc5aba4 -7f000000 ok 1 > .s <1> 1fc5ac30 ok 1 > to my-self ok 0 > dev /pci/ATY ok 0 > load hd:\ati.rom ob_pci_decode_unit idx=1fc5acf4
ob_pci_decode_unit idx=1fc5acf4 addr=00000000 00000000 00006000 ob_pci_encode_unit space=0 dev=12 fn=0 buf=c
ok 0 > debug pci-map-in Stepper keys: <space>/<enter> Up Down Trace Rstack Forth ok 0 > load-base 40 + 1 byte-load dimensions isn't unique. color! isn't unique. set-colors isn't unique. fill-rectangle isn't unique.
ob_pci_bar_map_in idx=1fc5ac24 active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <12> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 0 0 1007814 100 ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 0 0 1007814 100 ) fff56d38: drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 0 0 1007814 ) fff56d3c: nip ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 0 1007814 ) fff56d40: nip ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1007814 ) fff56d44: my-self ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1007814 1fc5abf8 ) fff56d48: swap ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 ) fff56d4c: active-package ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5eaf0 ) fff56d50: ihandle>phandle ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 0 ) fff56d54: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 0 fff3c73c ) fff56d5c: (to) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 ) fff56d60: (") ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff56d68 12 ) fff56d7c: active-package ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff56d68 12 fff5eaf0 ) fff56d80: get-package-property ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed20 3c 0 ) fff56d84: 0= ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed20 3c ffffffff ) fff56d88: do?branch ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed20 3c ) fff56d90: (begin) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed20 3c ) fff56d94: decode-phys ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 )
Now we have the correct amount of addresses here
fff56d98: dup ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 42007810 ) fff56d9c: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 42007810 fffffff ) fff56da4: and ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 2007810 ) fff56da8: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 2007810 6 ) fff56db0: pick ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 2007810 1007814 ) fff56db4: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 2007810 1007814 fffffff ) fff56dbc: and ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 2007810 1007814 ) fff56dc0: = ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 0 ) fff56dc4: do?branch ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 81000000 0 42007810 ) fff56e68: 3drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed2c 30 ) fff56e6c: decode-int ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed30 2c 0 ) fff56e70: drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed30 2c ) fff56e74: decode-int ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed34 28 1000000 ) fff56e78: drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed34 28 ) fff56e7c: dup ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed34 28 28 ) fff56e80: 0= ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed34 28 0 ) fff56e84: (until) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed34 28 0 ) fff56e88: do?branch ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed34 28 ) fff56d94: decode-phys ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 ) fff56d98: dup ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 1007814 ) fff56d9c: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 1007814 fffffff ) fff56da4: and ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 1007814 ) fff56da8: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 1007814 6 ) fff56db0: pick ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 1007814 1007814 ) fff56db4: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 1007814 1007814 fffffff ) fff56dbc: and ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 1007814 1007814 ) fff56dc0: = ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 ffffffff ) fff56dc4: do?branch ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 0 1007814 ) fff56dcc: 2drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 fff5ed40 1c 1000 ) fff56dd0: -rot ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5ed40 1c ) fff56dd4: decode-int ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5ed44 18 0 ) fff56dd8: drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5ed44 18 ) fff56ddc: decode-int ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5ed48 14 100 ) fff56de0: drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5ed48 14 ) fff56de4: 2drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 ) fff56de8: over ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 1007814 ) fff56dec: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 1007814 18 ) fff56df4: rshift ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 1 ) fff56df8: 3 ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 1 3 ) fff56dfc: and ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 1 ) fff56e00: 1 ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 1 1 ) fff56e04: = ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 ffffffff ) fff56e08: do?branch ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 ) fff56e10: (") ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff56e18 3 ) fff56e1c: active-package ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff56e18 3 fff5eaf0 ) fff56e20: parent ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff56e18 3 fff5b11c ) fff56e24: get-package-property ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5b5bc 8 0 ) fff56e28: 0= ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5b5bc 8 ffffffff ) fff56e2c: do?branch ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5b5bc 8 ) fff56e34: decode-int ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 fff5b5c0 4 f2000000 ) fff56e38: -rot ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 f2000000 fff5b5c0 4 ) fff56e3c: decode-int ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 f2000000 fff5b5c4 0 2000000 ) fff56e40: 3drop ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 1000 f2000000 ) fff56e44: + ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 1007814 f2001000 ) fff56e48: nip ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 1fc5abf8 f2001000 ) fff56e4c: swap ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 f2001000 1fc5abf8 ) fff56e50: (lit) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 f2001000 1fc5abf8 fff3c73c ) fff56e58: (to) ( ffffffff 1 0 ffffffff 0 0 ffffffff fff40a48 0 0 0 0 0 0 f2001000 ) fff56e5c: exit <f> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 -dfff000
and getting the correct mapped bar address here
byte-load: exception caught! ok 0 >
but it still breaks short after, probably in config-@. How to trace FCode execution? I only know about ?fcode-verbose so try that:
400514a : [ 0x8bc ] 400514c : [ 0x926 ]
ob_pci_bar_map_in idx=1fc5ac24 active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000<12> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 0 0 1007814 100 <f> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 -dfff000
byte-load: exception caught! ok
still in the same word so likely it's config-b@ is wrong. Is it called at all?
0 > " /pci/ATY" open-dev to my-self >> ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <7> 1 -a1510 1fc5aba4 -7e000000 0 2007818 4000 <4> 1 -a1510 1fc5aba4 -7e000000 ob_pci_bar_map_in idx=1fc5ac24
active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <7> 1 -a1510 1fc5aba4 -7f000000 0 42007810 1000000 <4> 1 -a1510 1fc5aba4 -7f000000 ok 0 > dev /pci/ATY ok 0 > debug config-b! Stepper keys: <space>/<enter> Up Down Trace Rstack Forth ok 0 > debug config-b@ Stepper keys: <space>/<enter> Up Down Trace Rstack Forth ok 0 > load hd:\ati.rom ob_pci_decode_unit idx=1fc5acf4
ob_pci_decode_unit idx=1fc5acf4 addr=00000000 00000000 00006000 ob_pci_encode_unit space=0 dev=12 fn=0 buf=c
ok 0 > load-base 40 + 1 byte-load dimensions isn't unique. color! isn't unique. set-colors isn't unique. fill-rectangle isn't unique.
ob_pci_bar_map_in idx=1fc5ac24 active-package: ob_pci_encode_unit space=0 dev=15 fn=0 buf=f
/pci@f2000000/ATY@f>> my-self: 1fc5abf8 /pci@f2000000 <12> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 0 0 1007814 100 <f> -1 1 0 -1 0 0 -1 -bf5b8 0 0 0 0 0 0 -dfff000
byte-load: exception caught! ok 0 >
Apparently not, so it probably has to be added as a method of the pci node so it can $call-parent it and implemented in C instead of the forth hack I've tried to add. (SLOF also seems to call back to rtas for this.) So I'll try that and see what happens.