ACPIFindPCIDevice: Difference between revisions
Appearance
	
	
|  Created page with "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 *Comp..." | No edit summary | ||
| Line 35: | Line 35: | ||
|        } |        } | ||
| </PRE> | </PRE> | ||
| ==Links== | |||
| * [http://www2.ecomstation.ru/doku.php/en:acpi ACPI Toolkit Web Site] | |||
| [[Category:ACPI]] | [[Category:ACPI]] | ||
Revision as of 02:25, 9 April 2019
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));
      }