From: Mike Smith <msmith@freebsd.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] translating ACPI _HID & _UID to PCI bus number
Date: Wed, 02 May 2001 23:43:10 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005520@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005516@msgid-missing>
It's not actually clear from the conversation so far what exactly Matt is
after. I get the impression, however, that what he wants to do is
synthesise an _HID/_UID pair, which is not quite what's being discussed
here.
If that's the case, typically _HID is the 32-bit vendor/device ID of the
controller, and _UID is the instance count for the given _HID, eg. the
first controller has a _UID of 0, the second has a _UID of 1, etc.
> In general a PCI device does not need to have _HID or _UID, because _ADR is
> used for that purpose. If a PCI device happens to be on a root PCI bus, it
> has _HID and _UID as well. So the bus number is avaialble from _BBN on the
> bus, assuming that the OS does not change the PCI bus number.
This isn't entirely correct either.
> -----Original Message-----
> From: Lee, Jung-Ik
> Sent: Wednesday, May 02, 2001 2:02 PM
> To: Nakajima, Jun; 'Matt_Domsch@Dell.com';
> acpi@phobos.fachschaften.tu-muenchen.de
> Cc: linux-ia64@linuxia64.org
> Subject: RE: [Linux-ia64] translating ACPI _HID & _UID to PCI bus number
>
>
> Even with ACPI namespace, {_HID, _UID} pair does not tell the path of a
> device in a given topology, and can not produce a PCI bus number(vice
> versa).
> _ADR of PCI device does not provide bus number either. It's just dev +func.
>
> So to get PCI bus number of a given PCI bus:
> 1. you can use _BBN of the device, but this works only on root pci bridges.
> I personally want to see all PCI bridges have _BBN method for OSPM's
> convenience, but ACPI spec does not require it for non-roots.
This is because ACPI assumes that you have a functional bus architecture.
The created bus instance should know its bus number, either from _BBN or
from querying the bridge's secondary bus number register, so as a device
you just query your parent for its bus number.
Because Matt's tool is running in userspace, however, this may not be so
easy to achieve.
> Thus, there seems to be no perfect solutions here... to get pci bus number
> from acpi name space alone.
That's basically correct; you can't do this.
--
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also. But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view. [Dr. Fritz Todt]
V I C T O R Y N O T V E N G E A N C E
next prev parent reply other threads:[~2001-05-02 23:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-02 19:33 [Linux-ia64] translating ACPI _HID & _UID to PCI bus number Matt_Domsch
2001-05-02 20:26 ` Nakajima, Jun
2001-05-02 21:02 ` Lee, Jung-Ik
2001-05-02 23:23 ` Nakajima, Jun
2001-05-02 23:43 ` Mike Smith [this message]
2001-05-03 3:50 ` Matt_Domsch
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=marc-linux-ia64-105590693005520@msgid-missing \
--to=msmith@freebsd.org \
--cc=linux-ia64@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