ACPIFindPCIDevice: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Legacy | |||
|RepFunc=[[ACPI32]] | |||
|Remarks=This function was used on a older release of the ACPI Toolkit, it is recommended to use an alternative. This function is here only for documentation. | |||
}} | |||
Find PCI device by Bus:Dev:Fun | Find PCI device by Bus:Dev:Fun | ||
Revision as of 14:04, 9 April 2019
![]() | |
---|---|
It is recommended to use a newer replacement for this function. | |
Replacement: | ACPI32 |
Remarks: | This function was used on a older release of the ACPI Toolkit, it is recommended to use an alternative. This function is here only for documentation. |
Find PCI device by Bus:Dev:Fun
Syntax
APIRET APIENTRY ACPIFindPCIDevice(UINT32 Bus, UINT32 Dev, UINT32 Fun, UINT32 *PicIRQ, UINT32 *ApicIRQ, ACPI_HANDLE *Hdl, char *Component)
Parameters
- Bus
- PCI Bus
- Dev
- PCI Device
- Fun
- PCI Finction
- Component
- Name of caller for acpica$ log
- Hdl
- Finding handle for device
- PicIRQ
- IRQ in PIC mode or boot stage
- ApicIRQ
- IRQ in APIC mode or zero if problem or PIC mode
Example
temp2 = temp3 = 0; rc = ACPIFindPCIDevice( (ULONG)busNr, // Bus (ULONG)devNr, // Dev (ULONG)(pcidev->devfn >> 8) & 7, // Function &temp1, // PIC IRQ &temp3, // APIC IRQ NULL, // ACPI handle to finding device "Uniaud32"); // Name for acpi log if (!rc) { // Check APIC IRQ, if we have /SMP /APIC, must be set if (temp3) temp = (temp & (~0xff)) | (temp3 & 0xff); // Check PIC IRQ else if (temp1) temp = (temp & (~0xff)) | (temp1 & 0xff); dprintf(("pci_query_device: IRQs ACPI PIC%d APIC%d set:0x%x", temp1, temp3,temp)); }