From: Peter Maydell <peter.maydell@linaro.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
qemu-devel@nongnu.org,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Guenter Roeck <linux@roeck-us.net>,
Arnd Bergmann <arnd.bergmann@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+
Date: Mon, 12 Aug 2013 21:49:54 +0100 [thread overview]
Message-ID: <CAFEAcA9BA7zfaO1J5zVaEcG-AgOo6dyiew08-o2eObuBe-KWig@mail.gmail.com> (raw)
In-Reply-To: <20130812200628.GG23006@n2100.arm.linux.org.uk>
On 12 August 2013 21:06, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Mon, Aug 12, 2013 at 06:33:28PM +0100, Peter Maydell wrote:
>> /* Slot to IRQ mapping for RealView EB and PB1176 backplane
>> * name slot IntA IntB IntC IntD
>> * A 31 IRQ50 IRQ51 IRQ48 IRQ49
>> * B 30 IRQ49 IRQ50 IRQ51 IRQ48
>> * C 29 IRQ48 IRQ49 IRQ50 IRQ51
>> * Slot C is for the host bridge; A and B the peripherals.
>> * Our output irqs 0..3 correspond to the baseboard's 48..51.
>> */
>>
>> ie IRQ48 == board's PCI0 == slot C connector A6 (IntA) == PCI_nINTB
>> == Slot B connector B8 (IntD) == Slot A connector A7 (IntC).
>>
>> and so on round.
>>
>> The 926's routing is one extra round of swizzling because the
>> board itself connects FPGA P_nINTA to its edge connector's
>> INTB (B7) pin rather than INTA (A6) as the EB/1176 do.
>> (This isn't even hinted at in the documentation, you need to
>> either experiment or look at the 926 board schematic.)
>
> Okay, so the above just adds to the confusion, because you appear to be
> mistaking "slot" for the AD signal which the IDSEL pin is connected to.
The board TRM:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0411d/Cacdijji.html
says that "slot position" and "AD signal connected to IDSEL"
are the same thing:
"The slot positions for PCI cards are numbered from 11 to 31.
The numbering is based on the address bit that is connected
to the IDSEL line."
> As I'm seeing a report of a card appearing in slot 0x0d at the top of
> this thread, this doesn't match your numbering above. So, is slot
> 0x0d slot A or slot B?
Slot 0xd is where the second PCI card QEMU emulates appears.
It doesn't correspond to either A or B in real hardware.
That trace output is the result of running the kernel on QEMU.
On QEMU we put the host at slot 11 (lowest possible) and
then cards at 12, 13, ... because generally people want to
be able to plug in more than two cards. It also improves our
backward-compatiliity with old kernels which assume old broken
QEMU behaviour. This is kind of like modelling a rather
extended (but admittedly fictitious) backplane.
On real hardware the physical "slot A" and "slot B" on
the backplane are 'slot' 31 and 30, and the host appears
at 29.
I don't currently have the h/w set up, but digging in my email
archives, when we were running the kernel on the real PB926
h/w and backplane it was indeed reporting the PCI core (ie
"slot C") as 29, and the other two as 30 and 31:
[ 128.920150] PCI core found (slot 29)
[ 128.920875] pci 0000:00:1f.0: reg 10: [io 0x0af0-0x0aff]
[ 128.920958] pci 0000:00:1f.0: reg 14: [io 0x0a70-0x0a7f]
[ 128.921032] pci 0000:00:1f.0: reg 18: [io 0x01f0-0x01ff]
[ 128.921103] pci 0000:00:1f.0: reg 1c: [io 0x0170-0x017f]
[ 128.921173] pci 0000:00:1f.0: reg 20: [io 0xcc00-0xcc1f]
[ 128.921244] pci 0000:00:1f.0: reg 24: [io 0x8c00-0x8cff]
[ 128.921320] pci 0000:00:1f.0: reg 30: [mem 0xffff0000-0xffffffff pref]
(that's from two years ago, a 2.6.35.6+ kernel with Arnd's
patchset applied, detecting a SATA card in slot 31).
-- PMM
next prev parent reply other threads:[~2013-08-12 20:50 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5207B3C3.9080508@roeck-us.net>
[not found] ` <20130811220450.GY23006@n2100.arm.linux.org.uk>
2013-08-12 0:40 ` [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ Guenter Roeck
2013-08-12 16:24 ` Peter Maydell
2013-08-12 16:45 ` Russell King - ARM Linux
2013-08-12 17:33 ` Peter Maydell
2013-08-12 20:06 ` Russell King - ARM Linux
2013-08-12 20:49 ` Peter Maydell [this message]
2013-08-12 21:21 ` Russell King - ARM Linux
2013-08-12 21:36 ` Peter Maydell
2013-08-12 22:12 ` Russell King - ARM Linux
2013-08-12 22:48 ` Guenter Roeck
2013-08-12 23:04 ` Guenter Roeck
2013-08-14 10:33 ` Russell King - ARM Linux
2013-08-14 12:44 ` Peter Maydell
2013-08-14 12:49 ` Russell King - ARM Linux
2013-08-14 12:56 ` Peter Maydell
2013-08-14 14:41 ` Guenter Roeck
2013-08-14 15:26 ` [Qemu-devel] memory reads and writes Herbei Dacian
2013-08-12 17:48 ` [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ Peter Maydell
2013-08-13 8:37 ` Rob Landley
2013-08-13 9:12 ` Peter Maydell
2013-08-13 11:30 ` Russell King - ARM Linux
2013-08-13 3:40 ` Guenter Roeck
2013-08-15 16:45 ` Peter Maydell
2013-08-15 17:54 ` Guenter Roeck
2013-08-15 18:05 ` Peter Maydell
2013-08-15 18:39 ` Guenter Roeck
2013-08-15 20:50 ` Guenter Roeck
2013-08-15 21:49 ` Peter Maydell
2013-08-15 22:18 ` Guenter Roeck
2013-08-15 22:23 ` Peter Maydell
2013-08-15 23:25 ` Guenter Roeck
2013-08-19 15:26 ` Guenter Roeck
2013-08-12 19:02 ` Paul Gortmaker
2013-08-12 20:58 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA9BA7zfaO1J5zVaEcG-AgOo6dyiew08-o2eObuBe-KWig@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=arnd.bergmann@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@roeck-us.net \
--cc=paul.gortmaker@windriver.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).