From: Richard Yang <weiyang@linux.vnet.ibm.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: Richard Yang <weiyang@linux.vnet.ibm.com>, linux-pci@vger.kernel.org
Subject: Re: How acpi_walk_resources() find specific _CRS for one device
Date: Thu, 29 Mar 2012 14:12:20 +0800 [thread overview]
Message-ID: <20120329061219.GB9782@richard> (raw)
In-Reply-To: <4F731005.6000506@gmail.com>
On Wed, Mar 28, 2012 at 09:20:05PM +0800, Jiang Liu wrote:
>On 03/28/2012 05:30 PM, Richard Yang wrote:
>> Experts
>>
>> I am reading the PCI enumeration code on x86. One thing on ACPI
>> namespace puzzles me.
>>
>> In the initialize process, the call flow is like this
>> acpi_pci_root_add()
>> try_get_root_bridge_busnr()
>> acpi_walk_resources(handle, METHOD_NAME__CRS,
>> get_root_bridge_busnr_callback, res)
>This piece of code is to invoke ACPI method "_CRS" for "handle", and call
>get_root_bridge_busnr_callback for each resource descriptor returned by
>this method.
>Here "handle" is the object for the pci root bus or PCI host bridge.
>"_CRS" is the name of ACPI method, which exists under "handle".
>
>>
Thanks for your clarification.
I read the acpi code again. And found the namespace tree is created in
acpi_scan_init()
{
...
result = acpi_bus_scan(ACPI_ROOT_OBJECT, &ops, &acpi_root);
...
}
And then call the acpi_walk_namespace() to go through the whole
namespace. Am I right? And form those handles
I look at the SPEC and code again and find the namespace is loaded
by acpi_ns_load_namespace() right?
It will read DSDT/SSDT/PSDT by calling acpi_ns_load_table_by_type.
While I grep the whole source code, but not find the definition of this
function.
--
Richard Yang
Help you, Help me
prev parent reply other threads:[~2012-03-29 6:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 9:30 How acpi_walk_resources() find specific _CRS for one device Richard Yang
2012-03-28 13:20 ` Jiang Liu
2012-03-29 6:12 ` Richard Yang [this message]
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=20120329061219.GB9782@richard \
--to=weiyang@linux.vnet.ibm.com \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
/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.