[OpenBIOS] Back at it again( PCI Passthrough )

Jd Lyons lyons_dj at yahoo.com
Fri May 11 08:38:50 CEST 2018


Hmmm…. I think you are on to something there, as I did note that they are words for the device in SLOF, before I execute the FCode.

Seems I need to figure out how to add the config* words to Openbios as that must be what 0xa08 is tripping over.

0 > dev /pci/@1   ok
0 > .properties  
assigned-addresses               82000830  00000000  83000000  00000000
                                 00010000  82000810  00000000  81000000
                                 00000000  01000000  c3000814  00002100
                                 00000000  00000000  10000000  8200081c
                                 00000000  82000000  00000000  01000000
                                 
name                             vga
                                 76676100  
ibm,req#msi                      00000001  
vendor-id                        000010de  
device-id                        00000141  
revision-id                      000000a2  
class-code                       00030000  
interrupts                       00000001  
min-grant                        00000000  
max-latency                      00000000  
subsystem-id                     00000050  
subsystem-vendor-id              000010de  
cache-line-size                  00000000  
devsel-speed                     00000000  
ibm,loc-code                     vfio_vfio-pci:0000:00:01.0
                                 7666696f  5f766669  6f2d7063  693a3030
                                 30303a30  303a3031  2e3000
ibm,my-drc-index                 40000008  
#address-cells                   00000003  
#size-cells                      00000002  
reg                              00000800  00000000  00000000  00000000
                                 00000000  02000810  00000000  00000000
                                 00000000  01000000  03000814  00000000
                                 00000000  00000000  10000000  0300081c
                                 00000000  00000000  00000000  01000000
                                 02000830  00000000  00000000  00000000
                                 00010000  
ibm,pci-config-space-type        00000001   ok
0 > words  setup classfile devicefile dma-map-out dma-map-in dma-free dma-alloc close open config-dump config-l! config-w! config-b! config-l@ config-w@ config-b@ my-puid my-phandle encode-unit decode-unit  ok
0 > 


> On May 10, 2018, at 3:13 PM, Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk> wrote:
> 
> On 10/05/18 11:33, Jd Lyons via OpenBIOS wrote:
> 
>>> On 5/9/18, 11:45 AM, "OpenBIOS on behalf of Mark Cave-Ayland" <openbios-bounces at openbios.org on behalf of mark.cave-ayland at ilande.co.uk> wrote:
>>> 
>>>    I suspect that it's something within that branch failing which is only
>>>    visible at the final b(>resolve) once the condition is evaluated, so
>>>    with indentation:
>>> 
>>>    ...
>>> 
>>>    Most of that looks fairly normal, so I'd start by looking at the 0x9bd
>>>    and 0xa08 FCodes which will have been generated further up in your
>>>    output file.
>>> 
>> new-token 0xa08
>> b(:)
>>     b(") ( len=9 )
>>     " config-l@"
>>     $call-parent
>> b(;)
>> -------------------------
>> new-token 0x9bd
>> b(constant)
>> b(lit) 0x42000014
>> --------------------------
> 
> Okay so there's your first issue in 0xa08 - the PCI config words config-*@ and config-*! aren't (yet) implemented in Forth in OpenBIOS so you'll need to wrap the existing pci_config_read/pci_config_write() functions using something similar to the approach here:
> 
> https://github.com/openbios/openbios/commit/74ee111f1ff64415835c4c43b66b1528a85fac9c
> 
> Here you can see that the C function bind_func() to used to call a C function from Forth by binding it to the named Forth word in the dictionary.
> 
> 
> ATB,
> 
> Mark.
> 
> -- 
> OpenBIOS                 http://openbios.org/
> Mailinglist:  http://lists.openbios.org/mailman/listinfo
> Free your System - May the Forth be with you




More information about the OpenBIOS mailing list