[OpenBIOS] [PATCH] pci: fix BAR setup

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon May 14 15:07:35 CEST 2012


On 12/05/12 10:11, Blue Swirl wrote:

>> Agreed. On current SPARC, the only non-zero Range on PCI is for 64-bit
>> memory. For the memory ranges we see:
>>
>> 0200.0000 0000.0000 0000.0000 8000.8090 0000.0000 0000.0007 0000.0000
>> 0300.0000 0000.0001 0000.0000 8000.8091 0000.0000 0000.0007 0000.0000
>>
>> My recollection is that memory space PCI RA (real address rather than
>> physical address, because now we're behind a hypervisor) ranges from
>> 8000.8090.0000.0000 through 8000.8097.FFFF.FFFF - which would match your
>> guess that the parent_base needs to be hacked if 0800.0000 is going to be
>> the BAR and is going to represent 1ff.0800.0000.
>>
>> So, why does OpenBios have 0100.0000 as a child base in the first place?
>
> It's to avoid VGA legacy mapping at 0xa0000. If I change
> hwdefs.pci.pci_mem_base in arch/sparc64/openbios.c to 0, OpenBIOS will
> crash during VGA init. Previously this worked because the PCI devices
> were mapped somewhat randomly and by chance, VGA legacy low mem area
> was avoided.
>
> I think the correct fix is to make QEMU VGA device disable the legacy
> mapping unless explicitly enabled. Alternatively the child base
> arithmetic could be fixed in OpenBIOS like proposed by Jakub.

Did a patch ever come out of this discussion in the end?


ATB,

Mark.



More information about the OpenBIOS mailing list