Re: How acpi_walk_resources() find specific _CRS for one device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux