[OpenBIOS] Back at it again( PCI Passthrough )

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Tue May 22 23:13:51 CEST 2018


On 22/05/18 08:44, Thomas Huth wrote:

> On 21.05.2018 22:31, Segher Boessenkool wrote:
>> On Mon, May 21, 2018 at 09:20:12PM +0100, Mark Cave-Ayland wrote:
>>> On 20/05/18 16:36, Jd Lyons via OpenBIOS wrote:
>>>
>>>> Thanks Mark,
>>>>
>>>> I just defined the other config words as colon definitions, but I’m
>>>> pretty sure now that isn’t working correctly.
>>>>
>>>> dev /pci
>>>> : rl at -le  rl@ lbflip ;
>>>> : >config  f1000000 + ;
>>>> : config-l@  >config cr ." config-l@ " dup . rl at -le space dup . ;
>>>> : rl!-le  >r lbflip r> rl! ;
>>>> : rw!-le  >r wbflip r> rw! ;
>>>> : rw at -le  rw@ wbflip ;
>>>> : config-l!  >config rl!-le ;
>>>> : config-w!  >config cr ." config-w! " 2dup . space . rw!-le ;
>>>> : config-w@  >config cr ." config-w@ " dup . rw at -le space dup . ;
>>>>
>>>> I hate to be a bother, but when you find the time, if you could try and
>>>> implement the other config words, that would be great.
>>>
>>> Yes I will try my best, although I still have a backlog from the past
>>> few months to get on top of at the same time - any patches appreciated :)
>>>
>>> One thing I did notice on my travels though:
>>> https://git.qemu.org/?p=openbios.git;a=blob;f=forth/device/other.fs;h=b3900730113f1177258f67710c44186e2f742f52;hb=e0c272b13bb01888a5f419c82d60095aacc45d0e#l58
>>>
>>> Looks like the r* words are currently missing an implementation.
>>
>> Note that rb@ etc. are bus-specific.  h# 230 get-token  and all that.
> 
> While we're at this topic: Note that there are also some bad fcode ROMs
> around which use the non-register memory access functions for accessing
> MMIO memory. SLOF has an ugly work-around included to get these working:
> 
> https://github.com/aik/SLOF/blob/master/slof/fs/fcode/1275.fs#L371
> 
> Note sure whether this is applicable for your PCI card, though.

Meh that's a fairly horrible hack. I'm not quite sure how this will 
affect OpenBIOS yet simply because all of the current PCI drivers in 
OpenBIOS fall back to the C bindings rather than using Forth (which is 
why JD has been the first person to experience these kinds of issues).


ATB,

Mark.



More information about the OpenBIOS mailing list