[OpenBIOS] Back at it again( PCI Passthrough )

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu May 10 21:13:30 CEST 2018


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.



More information about the OpenBIOS mailing list