FreeBSD/sys/i386/pci/pci_pir.c
/*
 * Use the PCI BIOS to route an interrupt for a given device.
 *
 * Input:
 * AX = PCIBIOS_ROUTE_INTERRUPT
 * BH = bus
 * BL = device [7:3] / function [2:0]
 * CH = IRQ
 * CL = Interrupt Pin (0x0A = A, ... 0x0D = D)
 */
Use the PCI BIOS to route an interrupt for a given device.
Use the PCI BIOS to route an interrupt for a given device .
static int
pci_pir_biosroute(int bus, int device, int func, int pin, int irq)
{
	struct bios_regs args;
	args.eax = PCIBIOS_ROUTE_INTERRUPT;
	args.ebx = (bus << 8) | (device << 3) | func;
	args.ecx = (irq << 8) | (0xa + pin);
	return (bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL)));
}
static int pci_pir_biosroute ( int bus , int device , int func , int pin , int irq ) { struct bios_regs args ; args . eax = PCIBIOS_ROUTE_INTERRUPT ; args . ebx = ( bus << 8 ) | ( device << 3 ) | func ; args . ecx = ( irq << 8 ) | ( 0xa + pin ) ; return ( bios32 ( & args , PCIbios . ventry , GSEL ( GCODE_SEL , SEL_KPL ) ) ) ; }
Use the PCI BIOS to route an interrupt for a given device.
Use the PCI BIOS to route an interrupt for a given device .