[OpenBIOS] Faulty Qemu SPARC64 IDE emulation?

Tarl Neustaedter Tarl.Neustaedter at Sun.COM
Tue Dec 22 20:20:59 CET 2009


Tarl Neustaedter wrote:
> [...]
>>
>> Right, I think I understand now. So the obvious question to ask now 
>> is how is PCI configuration space mapped on Sparc64? I can see that 
>> on x86 it's mapped to an I/O port at 0xCF8 but I can't seem to find 
>> how this is implemented on Sparc64. Anyone have any idea?
>
> PCI spaces are each mapped in separately in physical spaces on SPARC. 
> [...]
On a sun4u system (Tazmo, SUNW,Ultra-4), the first PCI root complex is a 
Psycho (Sun's first PCI bus chip) and has spaces at:

Config: 000001fe.01000000, length 00800000.
IO: 000001fe.02010000 length 00010000.
mem32: 000001ff.80000000 length 80000000.
mem64: 000001ff.80000000 length 80000000

This can be derived from the "Ranges" property in the PCI node, attached 
below. Note that Psycho did not implement mem64 separately, so the mem64 
space simply points to mem32 space. And it only has 31 bits of 
addressability - I recall the other half of the mem32 space is used for 
DMA, so thus not mappable as registers.

The config space is addressed precisely as defined by the PCI bindings 
"phys.hi" definition. That means it's composed of:

phys.hi: xxxxxxxx bbbbbbbb dddddfff rrrrrrrr

Where xxxx is not part of the addressing in above address space, 
bbbbbbbb is eight bits of bus number, ddddd is five bits of device 
number, fff is three bits of function number and rrrrrrrr is eight bits 
of register offset addressing (sorry I got it wrong on an earlier email, 
I was thinking of some pci-e stuff).


- - - - -
PCI node as shown by Solaris "prtconf -pv":

    Node 0xf006ebb8
        slot-names:  
0000001e.4d6f7468.6572626f.61726400.4d6f7468.6572626f.61726
400.4d6f7468.6572626f.61726400.50434920.736c6f74.20313000
        available:  
82000000.00000000.00017000.00000000.7ffe9000.81000000.000000
00.00000900.00000000.0000f700
        bus-range:  00000000.00000000
        version#:  00000004
        implementation#:  00000000
        address:  fffb4000.fffb2000.fffa4000
        #upa-interrupt-proxies:  00000002
        clock-frequency:  01f78a40
        upa-portid:  0000001f
        interrupts:  000007f1.000007ee.000007ef.000007e5.000007e8.000007f2
        ranges:  
00000000.00000000.00000000.000001fe.01000000.00000000.00800000.
01000000.00000000.00000000.000001fe.02010000.00000000.00010000.02000000.00000000
.00000000.000001ff.80000000.00000000.80000000.03000000.00000000.00000000.000001f
f.80000000.00000000.80000000
        reg:  
000001fe.00004000.00000000.00002000.000001fe.01000000.00000000.000
00100.000001fe.00000000.00000000.0000d000
        no-probe-list:  '0'
        latency-timer:  00000040
        model:  'SUNW,psycho'
        compatible: 'pci108e,8000' + 'pciclass,060000'
        thermal-interrupt: 
        bus-parity-generated: 
        #size-cells:  00000002
        #address-cells:  00000003
        device_type:  'pci'
        name:  'pci'





More information about the OpenBIOS mailing list