All of lore.kernel.org
 help / color / mirror / Atom feed
From: Moore, Robert <robert.moore at intel.com>
To: devel@acpica.org
Subject: Re: [Devel] Error in documentation of AcpiOsDerivePciId?
Date: Wed, 04 Aug 2010 16:33:44 -0700	[thread overview]
Message-ID: <4911F71203A09E4D9981D27F9D830858AC62BE0E@orsmsx503.amr.corp.intel.com> (raw)
In-Reply-To: 4911F71203A09E4D9981D27F9D830858AC59CE99@orsmsx503.amr.corp.intel.com

[-- Attachment #1: Type: text/plain, Size: 4934 bytes --]

Sorry, now to address your original question.

The AcpiOsDerivePciId interface was driven primarily by the needs of Linux, during the time that the Linux PCI-to-ACPI interaction was being designed and implemented.

I suspect that the ** was needed for the original implementation and then became obsolete later.

To my knowledge, we have never been asked to change the interface, so it has remained as-is.

Since AcpiOsDerivePciId is going to go away soon (we have the code running already), we will of course make the equivalent internal interface as simple as possible.

Bob


>-----Original Message-----
>From: devel-bounces(a)acpica.org [mailto:devel-bounces(a)acpica.org] On Behalf
>Of Moore, Robert
>Sent: Wednesday, August 04, 2010 2:37 PM
>To: Rudi
>Cc: devel(a)acpica.org
>Subject: Re: [Devel] Error in documentation of AcpiOsDerivePciId?
>
>Yes, there is a reason for ACPI_PCI_ID **.
>
From the ACPI Component Architecture User Guide and Programmer Reference:
>
>
>AcpiOsDerivePciId
>-----------------
>
>PciId
>
>Input: The full PCI ID (The full PCI configuration space address,
>consisting of a segment number, bus number, device number, and function
>number) as obtained from control methods within the BIOS ACPI tables.
>
>Output: Where the derived PCI ID is returned. Some or all of the PCI ID
>subfields may be updated by this function.
>
>
>
>This function derives a full PCI ID for a PCI device, consisting of a
>Segment number, a Bus number, and a Device number.
>
>The PCI hardware dynamically configures PCI bus numbers depending on the
>bus topology discovered during system initialization. The AcpiOsDerivePciId
>function is invoked by the ACPICA subsystem during configuration of a
>PCI_Config Operation Region in order to (possibly) update the Bus number in
>the PciId with the actual Bus number as determined by the hardware and
>operating system configuration.
>
>The PciId parameter is initially populated by the ACPICA subsystem during
>the Operation Region initialization. ACPICA then calls AcpiOsDerivePciId,
>which is expected to make any necessary modifications to the Segment, Bus,
>or Device number PCI ID subfields as appropriate for the current hardware
>and OS configuration.
>
>
>
>>-----Original Message-----
>>From: devel-bounces(a)acpica.org [mailto:devel-bounces(a)acpica.org] On Behalf
>>Of Rudi
>>Sent: Sunday, August 01, 2010 4:31 AM
>>Cc: devel(a)acpica.org
>>Subject: Re: [Devel] Error in documentation of AcpiOsDerivePciId?
>>
>>Hi all,
>>
>>is that still in the agenda ? Also, what is the reason why the last
>>parameter of AcpiOsDerivePciId() is "ACPI_PCI_ID **" and not just
>>"ACPI_PCI_ID *" ? Are there any situations, where AcpiOsDerivePciId
>>would want to reallocate PciId ?
>>
>>
>>
>>
>>Lin Ming wrote:
>>> 2010/4/22 Grégoire Sutre <gregoire.sutre(a)gmail.com>:
>>>> Hi Lin,
>>>>
>>>> Many thanks for your explanantion, I understand now why the second
>>>> argument passed to AcpiOsDerivePciId is a handle to the (PCI_Config)
>>>> operation region.
>>>>
>>>> But regarding the first argument of AcpiOsDerivePciId: the ACPICA
>>>> programmer reference says that: it is a handle to _the PCI device_.
>>>>
>>>> My question is: which PCI device?
>>>>
>>>> In my (possibly wrong) interpretation of the documentation, _the PCI
>>>> device_ is the device for which AcpiOsDerivePciId shall return an
>>>> updated Pci id.
>>>>
>>>> However, as far as I understand the code of AcpiEvPciConfigRegionSetup
>>>> (in file evrgnini.c), _the PCI device_ turns out to be an ancestor of
>>>> the device for which AcpiOsDerivePciId shall return an updated Pci id.
>>>> This ancestor being the upstream PCI root bridge (or the ACPI root node
>>>> if none was found).  This interpretation of _the PCI device_ is also
>>>> consistent with my understanding of the Linux implementation of
>>>> AcpiOsDerivePciId, which finds the updated PCI id by ``traversing'' the
>>>> PCI-to-PCI bridges that are on the branch from AcpiOsDerivePciId's
>first
>>>> argument to its second argument.
>>>
>>> You are right, the first argument is the PCI root node.
>>> We may need to update the doc to figure out this.
>>>
>>> Thanks,
>>> Lin Ming
>>> _______________________________________________
>>> Devel mailing list
>>> Devel(a)acpica.org
>>> http://lists.acpica.org/listinfo/devel
>>>
>>> To: gregoire.sutre(a)gmail.com
>>> Cc: devel(a)acpica.org
>>
>>--
>>
>>Ruediger "Rudi" Ihle
>>
>>"There's a fine line between wrong and visionary. Unfortunately
>> you have to be a visionary to see it." - Sheldon Cooper, Ph.D.
>>_______________________________________________
>>Devel mailing list
>>Devel(a)acpica.org
>>http://lists.acpica.org/listinfo/devel
>_______________________________________________
>Devel mailing list
>Devel(a)acpica.org
>http://lists.acpica.org/listinfo/devel

             reply	other threads:[~2010-08-04 23:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 23:33 Moore, Robert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-08-04 21:36 [Devel] Error in documentation of AcpiOsDerivePciId? Moore, Robert
2010-08-02  0:29 Lin Ming
2010-08-01 11:31 Rudi
2010-04-23 12:44 Lin Ming
2010-04-22 12:50 
2010-04-21 23:33 Lin Ming
2010-04-20 16:10 Moore, Robert
2010-04-20 16:07 
2010-04-20 14:51 Moore, Robert
2010-04-20  9:45 

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=4911F71203A09E4D9981D27F9D830858AC62BE0E@orsmsx503.amr.corp.intel.com \
    --to=devel@acpica.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.