[OpenBIOS] sun4u interrupt-map

Artyom Tarasenko atar4qemu at gmail.com
Mon Apr 9 18:08:40 CEST 2012


On Thu, Apr 5, 2012 at 11:54 PM, Tarl Neustaedter <tarl-b2 at tarl.net> wrote:
> On 2012-Apr-5 17:37 , Artyom Tarasenko wrote:
>>
>> I gave the following shot:
>>
>> 0>  show-devs
>> ffe1a2b0 /
>> ( ... )
>> ffe29140 /pci at 1fe,0 (pci)
>> ffe299a8 /pci at 1fe,0/pci at 1 (pci)
>> ffe2a060 /pci at 1fe,0/pci at 1,1 (pci)
>> ffe2aeb8 /pci at 1fe,0/ebus at 3
>> ffe2bb00 /pci at 1fe,0/ebus at 3/su at 0,1 (serial)
>> ( ... )
>>
>> ok
>> cd /pci at 1fe,0/ebus
>> 000001fe encode-int 020003f8 encode-int encode+ 1 encode-int encode+
>> ffe29140 encode-int encode+ 2b encode-int encode+ " interrupt-map"
>> property
>>
>> 0000001f encode-int 00ffffff encode-int encode+ 00000003 encode-int
>> encode+
>> " interrupt-map-mask" property
>>
>> cd /pci at 1fe,0/ebus at 3/su
>> 1 encode-int " interrupts" property
>> device-end
>>
>> And Linux's of_device_64 interprets it the following way:
>>
>> /pci at 1f,0: direct translate 7f0 -->  1
>> /pci at 1f,0: direct translate 7ee -->  1
>> /pci at 1f,0: direct translate 7ef -->  1
>> /pci at 1f,0: direct translate 7e5 -->  1
>>
>> ^^^^^ This is strange but is the same regardless my interrupt-map try
>> above.
>>
>> /pci at 1f,0/ebus at 3/su at 1fe,20003f8: Apply [/pci at 1f,0/ebus at 3:1] imap -->
>>  [NULL:1]
>>
>> ^^^^^ Have I done something wrong, or more interrupt mappings  is needed?
>
>
> Well, it looks like Linux is correctly identifying that you want to
> translate interrupt 1 from ebus to something else. That something else is
> where it's getting hung up - what are your #address-cells and
> #interrupt-cells?

0 >  cd /  ok
0 > .properties
name                      "OpenBiosTeam,OpenBIOS"
#address-cells            2
#size-cells               2
( no #interrupt-cells property here)

0 > cd /pci at 1fe,0  ok
0 > .properties
( ... )
name                      "pci"
reg                       000001fe 00000000   00000000 02000000
#address-cells            3
#size-cells               2
#interrupt-cells          1

0 > cd /pci at 1fe,0/ebus  ok
0 > .properties
( ... )
#address-cells            2
#size-cells               1
#interrupt-cells          1

> Although I don't think you're using the right numbers.... It looks like you
> set up a property containing:
>
> 1fe, 200.03f8, 1, ffe2.9140, 2b

Yes, that's what I intended.

> The two cells at the front look wrong. I think you want the contents of the
> reg property of the su node, and I'm pretty sure that doesn't have "1fe".

Well, that's the  physical address of the "su" serial in qemu, and

0 > cd /pci at 1fe,0/ebus at 3/su  ok
0 > .properties
name                      "su"
device_type               "serial"
reg                       000001fe 020003f8   00000008
 ok
0 >

Could it be that the "reg" property is currently defined wrong and it
must be defined relatively to ebus start?

You are right that Ultra-5 has pci/ebus elsewhere, though. But it
shouldn't matter, should it?

>I recall ebus only has a one-cell address property, in which case that
> should be:
>
> 20003f8, 1, ffe2.9140, 2b
>
> The interrupt mask property should probably be 00ff.ffff, ff .

Should it matter, if the used one matches the target "reg"?


-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/search/label/qemu



More information about the OpenBIOS mailing list