On Dec 18, 2017, at 5:01 AM, Segher Boessenkool segher@kernel.crashing.org wrote:
On Mon, Dec 18, 2017 at 03:22:11AM -0500, Jd Lyons wrote:
On Dec 18, 2017, at 2:44 AM, Segher Boessenkool segher@kernel.crashing.org wrote: Exactly. And I gave a (not super great) implementation above, enough to see if you get further :-)
Ok, I see, the code you gave was a command for Openbios, I kept trying to find where to add it to the source, thinking it was C code;-)
Only got one byte further:
(offset) 5
401000d : (compile) [ 0xe05 ] 401000e : (compile) b(endcase) [ 0xc5 ] 401000f : (compile) over [ 0x48 ] 4010010 : (compile) b(to) [ 0xc3 ] 4010014 : (compile) [ 0xe36 ] 4010016 : (compile) encode+ [ 0x112 ] 4010017 : (compile) 2dup [ 0x53 ] 4010018 : (compile) b(to) [ 0xc3 ] 401001b : (compile) b(to) [ 0xc3 ] 401001f : (compile) [ 0xc7b ] 4010021 : (compile) property [ 0x110 ] 4010022 : (compile) b(;) [ 0xc2 ] 4010023 : b(') [ 0x11 ] 4010026 : b(to) [ 0xc3 ] 401002a : [ 0xe34 ] 401002c : [ 0xdff ]
byte-load: exception caught! ok
dff does:
: xdff " vendor-id" get-my-property IF ABORT THEN decode-int -rot 2drop dup TO x93b 10de <> IF ABORT THEN " device-id" get-my-property IF ABORT THEN ...
so it seems the device-id or vendor-id propertie don't exist, or don't have the right value? Or you don't have a current instance, perhaps.
I don’t know, maybe because we’re only executing the FCode from 4000040, past the part in the Rom where the Device ID is in the PCI Header?
It looks like it just sets the Vendor ID to 10de, but I’m un sure what it does for the Device ID, that seem to be the point where it’s breaking.
(offset) 5 401000d : (compile) [ 0xe05 ] 401000e : (compile) b(endcase) [ 0xc5 ] 401000f : (compile) over [ 0x48 ] 4010010 : (compile) b(to) [ 0xc3 ] 4010014 : (compile) [ 0xe36 ] 4010016 : (compile) encode+ [ 0x112 ] 4010017 : (compile) 2dup [ 0x53 ] 4010018 : (compile) b(to) [ 0xc3 ] 401001b : (compile) b(to) [ 0xc3 ] 401001f : (compile) [ 0xc7b ] 4010021 : (compile) property [ 0x110 ] 4010022 : (compile) b(;) [ 0xc2 ] 4010023 : b(') [ 0x11 ] 4010026 : b(to) [ 0xc3 ] 401002a : [ 0xe34 ] 401002c : [ 0xdff ]
byte-load: exception caught! ok 1 > .properties name "pci10de,141" vendor-id 10de device-id 141 revision-id a2 class-code 30000 interrupts 1 min-grant 0 max-latency 0 devsel-speed 0 subsystem-vendor-id 10de subsystem-id 50 cache-line-size 10 assigned-addresses -- 3c : 02 00 80 10 00 00 00 00 83 00 00 00 00 00 00 00 01 00 00 00 c3 00 80 14 00 00 00 00 90 00 00 00 00 00 00 00 10 00 00 00 83 00 80 1c 00 00 00 00 a0 00 00 00 00 00 00 00 01 00 00 00 reg 00008000 00000000 00000000 00000000 00000000 02008010 00000000 00000000 00000000 01000000 c3008014 00000000 00000000 00000000 10000000 8300801c 00000000 00000000 00000000 01000000 ok 1 >
Segher
-- OpenBIOS http://openbios.org/ Mailinglist: http://lists.openbios.org/mailman/listinfo Free your System - May the Forth be with you