[OpenBIOS] Back at it again( PCI Passthrough )
Jd Lyons
lyons_dj at yahoo.com
Fri May 11 13:46:08 CEST 2018
Thanks Mark, now I’m down to stepping through the ddf word.
Are map-in and map-out implemented in forth?
Seems the nVidia roms use them, as most option roms would.
> On May 11, 2018, at 4:11 AM, Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk> wrote:
>
> On 11/05/18 08:11, Jd Lyons via OpenBIOS wrote:
>
>> Seems I could add config-1@ as a colon definition, however I’m not sure how too deal with r1@?
>> : rl at -le rl@ lbflip ;
>> : >config f1000000 + ;
>> : config-l@ >config cr ." config-l@ " dup . rl at -le space dup . ;
>> Just can’t figure how r1@ is implemented in SLOF?
>
> That's definitely the long way around. Attached is a quick and dirty hack for PPC-only that implements config-l@ for reference:
>
> $ ./qemu-system-ppc -nographic -bios /home/build/src/openbios/openbios.git/openbios/obj-ppc/openbios-qemu.elf.nostrip
>
> >> =============================================================
> >> OpenBIOS 1.1 [May 11 2018 07:49]
> >> Configuration device id QEMU version 1 machine id 2
> >> CPUs: 1
> >> Memory: 128M
> >> UUID: 00000000-0000-0000-0000-000000000000
> >> CPU type PowerPC,750
> milliseconds isn't unique.
> Welcome to OpenBIOS v1.1 built on May 11 2018 07:49
> Trying hd:,\\:tbxi...
> Trying hd:,\ppc\bootinfo.txt...
> Trying hd:,%BOOT...
> No valid state has been set by load or init-program
>
> 0 > cd /pci/NE2000 ok
> 0 > .properties
> name "NE2000"
> vendor-id 10ec
> device-id 8029
> revision-id 0
> class-code 20000
> AAPL,interrupts 17
> min-grant 0
> max-latency 0
> devsel-speed 0
> subsystem-vendor-id 1af4
> subsystem-id 1100
> cache-line-size 0
> device_type "network"
> model "NE2000 PCI"
> assigned-addresses -- 14 : 01 00 10 10 00 00 00 00 00 00 10 00 00 00 00 00 00 00 01 00
> AAPL,address fe001000
> reg 00001000 00000000 00000000 00000000 00000000
> 01001010 00000000 00000000 00000000 00000100
> network-type "ethernet"
> removable "network"
> category "net"
> ok
> 0 > cd .. ok
> 0 > 1000 config-l@ u. 802910ec ok
> 0 >
>
> My reading of the IEEE-1275 PCI bindings is that you take the first 32-bit word of "reg" for the PCI configuration space address, so as you can see we return the device-id/vendor-id for the NE2000 NIC as above.
>
>
> ATB,
>
> Mark.
> <openbios-config-l-hack.patch>
More information about the OpenBIOS
mailing list