[OpenBIOS] Loading a PCI Option rom.

Jd Lyons lyons_dj at yahoo.com
Sun Dec 17 17:29:29 CET 2017


 
0 > 4010026 400 dump 
4010026  c3 09 a9 0e 34 0d ff 09  3d 10 00 00 00 0f 3d 14    �.�.4.�.=.....=.
4010036  00 26 09 bd 10 00 00 00  ff 23 01 03 1e 0a 08 10    .&.�....�#......
4010046  00 00 00 06 23 10 00 00  00 04 3c 14 00 09 11 09    ....#.....<.....
4010056  c1 c3 09 c0 b2 b2 0d df  0e 04 0e 38 0e 06 0c e5    ��.���.�...8...�
4010066  0d b0 0e 07 0e 1a 0c 5b  0e 28 0e 20 0d fa 0e 37    .�.....[.(. .�.7
4010076  0e 2c 0e 2d 12 0b 4e 56  44 41 2c 50 61 72 65 6e    .,.-..NVDA,Paren
4010086  74 02 01 a6 01 11 12 0e  23 61 64 64 72 65 73 73    t..�....#address
4010096  2d 63 65 6c 6c 73 01 10  a5 01 11 12 0b 23 73 69    -cells..�....#si
40100a6  7a 65 2d 63 65 6c 6c 73  01 10 09 c7 09 3d 10 00    ze-cells...�.=..
40100b6  00 00 35 42 14 00 0d a6  09 33 27 09 35 24 c3 09    ..5B...�.3'.5$�.
40100c6  35 b2 09 41 10 00 00 00  10 27 09 35 24 01 11 12    5�.A.....'.5$...
40100d6  0d 4e 56 44 41 2c 46 65  61 74 75 72 65 73 01 10    .NVDA,Features..
40100e6  a6 01 11 12 0a 4e 56 44  41 2c 4c 65 76 65 6c 01    �....NVDA,Level.
40100f6  10 a5 a5 0e 2e 09 bc 09  c3 0e 2e 01 12 09 c0 09    .��...�.�.....�.
4010106  c6 0e 2e 01 12 09 be 09  c4 0e 2e 01 12 09 bf 09    �.....�.�.....�.
4010116  c5 0e 2e 01 12 12 03 72  65 67 01 10 a6 01 11 12    �......reg..�...
4010126  0e 23 61 64 64 72 65 73  73 2d 63 65 6c 6c 73 01    .#address-cells.
4010136  10 a5 01 11 12 0b 23 73  69 7a 65 2d 63 65 6c 6c    .�....#size-cell
4010146  73 01 10 12 1a 3a 20 64  65 63 6f 64 65 2d 75 6e    s....: decode-un
4010156  69 74 20 70 61 72 73 65  2d 31 68 65 78 20 3b cd    it parse-1hex ;�
4010166  0c 7c 47 01 11 4a 01 11  01 12 12 0c 56 52 41 4d    .|G..J......VRAM
4010176  2c 6d 65 6d 73 69 7a 65  01 10 a5 c3 09 52 09 51    ,memsize..��.R.Q
4010186  a5 18 00 16 19 0a 41 0a  4a 08 ea 3d 14 00 08 19    �.....A.J.�=....
4010196  c3 09 52 1b b2 15 ff ee  09 46 38 14 01 b0 09 52    �.R.�.��.F8..�.R
40101a6  0a 41 01 1f 0e 32 b5 0e  39 b7 09 52 0a 41 0d f1    .A...2�.9�.R.A.�
40101b6  c3 01 62 c2 b5 0e 3a b7  09 52 0a 41 0d f2 c2 b6    �.bµ.:�.R.A.�¶
40101c6  08 67 65 74 2d 6d 6f 64  65 0e 3b b7 0d cb c2 b6    .get-mode.;�.�¶
40101d6  0a 73 68 6f 77 2d 6d 6f  64 65 73 0e 3c b7 0d cc    .show-modes.<�.�
40101e6  c2 ca 08 73 65 74 2d 6d  6f 64 65 0e 3d b7 09 52    ��.set-mode.=�.R
40101f6  0a 41 0d ca c2 ca 0e 64  72 61 77 2d 72 65 63 74    .A.���.draw-rect
4010206  61 6e 67 6c 65 0e 3e b7  09 52 0a 41 0d d5 c2 ca    angle.>�.R.A.���
4010216  0e 66 69 6c 6c 2d 72 65  63 74 61 6e 67 6c 65 0e    .fill-rectangle.
4010226  3f b7 09 52 0a 41 0d d7  c2 ca 0e 72 65 61 64 2d    ?�.R.A.���.read-
4010236  72 65 63 74 61 6e 67 6c  65 0e 40 b7 09 52 0a 41    rectangle.@�.R.A
4010246  0d d6 c2 ca 06 63 6f 6c  6f 72 21 0e 41 b7 09 52    .���.color!.A�.R
4010256  0a 41 0c f7 c2 ca 06 63  6f 6c 6f 72 40 0e 42 b7    .A.���.color at .B�
4010266  09 52 0a 41 0c f9 c2 ca  0a 73 65 74 2d 63 6f 6c    .R.A.���.set-col
4010276  6f 72 73 0e 43 b7 09 52  0a 41 0c f3 c2 ca 0a 67    ors.C�.R.A.���.g
4010286  65 74 2d 63 6f 6c 6f 72  73 0e 44 b7 09 52 0a 41    et-colors.D�.R.A
4010296  0c f5 c2 ca 0a 64 69 6d  65 6e 73 69 6f 6e 73 0e    .���.dimensions.
40102a6  45 b7 0b 70 0b 71 c2 ca  0e 64 64 63 32 2d 73 65    E�.p.q��.ddc2-se
40102b6  74 2d 73 74 61 72 74 0e  46 b7 09 52 0a 41 0d f3    t-start.F�.R.A.�
40102c6  c2 ca 0d 64 64 63 32 2d  73 65 74 2d 73 74 6f 70    ��.ddc2-set-stop
40102d6  0e 47 b7 09 52 0a 41 0d  f4 c2 ca 0e 64 64 63 32    .G�.R.A.���.ddc2
40102e6  2d 73 65 6e 64 2d 62 79  74 65 0e 48 b7 09 52 0a    -send-byte.H�.R.
40102f6  41 0d f5 c2 09 5f a6 09  52 27 23 35 14 00 42 ca    A.��._�.R'#5..B�
4010306  13 70 6f 77 65 72 2d 73  77 69 74 63 68 2d 65 6e    .power-switch-en
4010316  61 62 6c 65 0e 49 b7 09  52 0d d8 c2 ca 14 70 6f    able.I�.R.���.po
4010326  77 65 72 2d 73 77 69 74  63 68 2d 64 69 73 61 62    wer-switch-disab
4010336  6c 65 0e 4a b7 09 52 0d  d9 c2 09 52 0d d9 b2 11    le.J�.R.��.R.ٲ.
4010346  0e 39 01 1c 11 0e 3a 01  1d 01 27 b2 09 46 a6 3b    .9....:...'�.F�;
4010356  14 01 dc a4 09 51 a5 18  00 25 19 09 52 3d 14 00    ..ܤ.Q�..%..R=..
4010366  1b 47 a4 3c 14 00 05 46  19 b2 19 0a 41 0a 4a 08    .G�<...F.�..A.J.
4010376  ea 3d 14 00 06 46 19 1b  b2 b2 15 ff df 47 c3 09    �=...F..��.��G�.
4010386  53 0a 41 01 1f 0e 32 b5  0e 4b b7 09 53 0a 41 0d    S.A...2�.K�.S.A.
4010396  f1 c3 01 62 c2 b5 0e 4c  b7 09 53 0a 41 0d f2 c2    ��.bµ.L�.S.A.��
40103a6  b6 08 67 65 74 2d 6d 6f  64 65 0e 4d b7 0d cb c2    �.get-mode.M�.��
40103b6  b6 0a 73 68 6f 77 2d 6d  6f 64 65 73 0e 4e b7 0d    �.show-modes.N�.
40103c6  cc c2 ca 08 73 65 74 2d  6d 6f 64 65 0e 4f b7 09    ���.set-mode.O�.
40103d6  53 0a 41 0d ca c2 ca 0e  64 72 61 77 2d 72 65 63    S.A.���.draw-rec
40103e6  74 61 6e 67 6c 65 0e 50  b7 09 53 0a 41 0d d5 c2    tangle.P�.S.A.��
40103f6  ca 0e 66 69 6c 6c 2d 72  65 63 74 61 6e 67 6c 65    �.fill-rectangle
4010406  0e 51 b7 09 53 0a 41 0d  d7 c2 ca 0e 72 65 61 64    .Q�.S.A.���.read
4010416  2d 72 65 63 74 61 6e 67  6c 65 0e 52 b7 09 53 0a    -rectangle.R�.S.
 ok

Looks like trouble when Openbios tries to build the device up in Name Space?
    On Sunday, December 17, 2017, 11:25:08 AM EST, Jd Lyons <lyons_dj at yahoo.com> wrote:  
 
 
 
Ok, now I think we're getting somewhere:

4010006 : (compile) encode-bytes [ 0x115 ]4010008 : (compile) encode+ [ 0x112 ]
4010009 : (compile) b(endof) [ 0xc6 ]
       (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 ]

byte-load: exception caught!
 ok



    On Sunday, December 17, 2017, 11:21:11 AM EST, Tarl Neustaedter <tarl-b2 at tarl.net> wrote:  
 
 On 2017-Dec-17 11:00 , Jd Lyons wrote:
[...]
> 0 > load hd:,\ppc\6600.fcode  ok
> 0 > 4000000 400 dump
> 4000000  55 aa 40 00 00 00 00 00  00 00 00 00 00 00 00 00   
> U�@.............
> 4000010  00 00 00 00 00 00 00 00  20 00 00 00 00 00 00 00    ........
> .......
> 4000020  50 43 49 52 de 10 41 01  00 00 20 00 00 00 00 03   
> PCIR�.A... .....
> 4000030  84 00 00 00 01 80 00 00  00 00 00 00 00 00 00 00   
> �....�..........

That looks like stuff from a PCI option ROM. But you can't start at
4000020, that's still in the PCI header overhead.

See

https://code.coreboot.org/p/openboot/source/tree/1/obp/dev/pci/fcode-rom.fth

Follow the code in locate-fcode and fcode-image? to find where the code
starts. From my recollection, this looks like the FCode is for a card
with vendor ID 10de and device ID 0141. It looks like the FCode should
start at 4000040, so that's the address you should feel into byte-load.

> 0 > 0 0 " 4,0" " /pci at 80000000" begin-package  ok
> 0 > dev /pci ls

That "dev" is harmful, it's taking you out of the PCI node, you need to
stay inside unnamed node. Don't do that.

> 0 > setenv focde-debug? true  ok
> 0 > 4000020 1 byte-load  ok

If this had worked with fcode-debug? set to true, I think you would
normally have gotten the name of the device printed out.

> 0 > dev /pci ls
This is again taking you out of wherever you had run the FCode.
> 0 > setenv fcode-debug? true  ok
> 0 > 4000020 1 byte-load
> byte-load: warning stack overflow, diff -3
>  ok
> 0 >
>

At this point, you're doing a second execution of the PCI header, and I
have no idea what "PCIR" does as FCodes. It undoubtedly got confused and
did something dumb.




-- 
OpenBIOS                http://openbios.org/
Mailinglist:  http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/openbios/attachments/20171217/3bfc3670/attachment-0001.html>


More information about the OpenBIOS mailing list