From: Om <om.turyx@gmail.com>
Cc: kernelnewbies@nl.linux.org, linux-newbie@vger.kernel.org
Subject: Re: PCI interrupt queries
Date: Thu, 21 Aug 2008 10:14:41 -0700 [thread overview]
Message-ID: <48ADA281.2020804@gmail.com> (raw)
In-Reply-To: <1CADFA951940554D86FBD8B24BBFF3A001E7390E@LONMLVEM08.e2k.ad.ge.com>
Welch, Martyn (GE EntSol, Intelligent Platforms) wrote:
> Rajat Jain wrote:
>> Hello Rene,
>>
>> Thanks for the reply.
>>
>>> On 19-08-08 07:11, Rajat Jain wrote:
>>>
>>>> 1) My first question is WHO writes that IRQ value in the device
>>>> configuration space? Is it hardwired on the card? Is it written by
>>>> the PCI controller driver or some other kernel component? Or some
>>>> other piece of software takes care of it?
>>> The thing hardwired on the card is the interrupt PIN(s) it
>>> uses; A, B, C and/or D (one pin per device and thus per
>>> config space). The thing that writes the LINE value into the
>>> register is generally the BIOS; being motherboard specific it
>>> knows which IRQ line it is that pin X (A, B, C or D) from
>>> slot N is routed to and it writes those values back into the device.
>>>
>> OK. But who does it in an embedded environment (PPC for eg) where
>> there
>> is no POST software. The first piece of code that gets executed is
>> U-boot and then the kernel. So who writes the LINE value into the
>> config
>> space?
>>
>
> U-boot does. There is a fairly standardised way to connect PCI interrupt
> lines, especially for PCI slots where various cards can be plugged in:
>
> A rotation on 1 is applied to the wiring of the interrupt lines between
> each device/slot, order is dependant on the wiring of the device select
> lines, I think chapter 6 of TLK[1] has some of the basics. These
> rotations also need to be carried across PCI-to-PCI bridges. Hence the
> third device on bus 0 should have: A->INT3; B->INT4; C->INT1; d->INT2.
> INT[1-4] then map into a set of interrupt numbers, which are also highly
> dependant on the hardware.
I think this rotation is required by PCI bridge spec, and it was
included primarily to reduce loading of any one line alone.
Thanks,
Om.
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2008-08-21 17:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 5:11 PCI interrupt queries Rajat Jain
2008-08-19 20:34 ` Rene Herman
2008-08-20 4:50 ` Rajat Jain
2008-08-20 18:04 ` Rene Herman
2008-08-21 9:31 ` Welch, Martyn (GE EntSol, Intelligent Platforms)
2008-08-21 11:10 ` Rene Herman
2008-08-21 11:12 ` Welch, Martyn (GE EntSol, Intelligent Platforms)
2008-08-21 17:14 ` Om [this message]
2008-08-21 5:42 ` Greg KH
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=48ADA281.2020804@gmail.com \
--to=om.turyx@gmail.com \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-newbie@vger.kernel.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