Date: Tue, 10 Apr 2007 15:30:21 +1000 From: Alan Garfield <alan@fromorbit.com> To: freebsd-hackers@freebsd.org Subject: Re: Finding an IRQ mapping in APIC Message-ID: <1176183021.5525.4.camel@hiro.auspc.com.au> In-Reply-To: <1176171656.4276.8.camel@hiro.auspc.com.au> References: <1176096815.4064.6.camel@hiro.auspc.com.au> <1176171656.4276.8.camel@hiro.auspc.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2007-04-10 at 12:20 +1000, Alan Garfield wrote:
> Hello all!
>
> I'm wondering if someone can point me in the direction of a solution to
> my little problem.
>
> I've been porting a Linux driver across to FreeBSD and I've come against
> this lovely little hack in it's code.
>
> I've tried to bus_alloc_resource() the IOAPIC_DEFAULT_ADDR and
> IOAPIC_WINDOW but I never seem get allocated. Plus to my
> knowing-little-about-kernels eye this seems like a really horrid hack to
> figure out the IRQ.
>
> Any suggestions?
Further to this I've done the following :-
---------------------------
static void
jnet_identify(driver_t *driver, device_t parent)
{
uint32_t pci_intline;
device_t dev;
dev = pci_find_bsf(PCI_BUS, PCI_DEV, PCI_FUN);
if(dev == NULL) {
return;
}
device_printf(parent, "Looking for IRQ....\n");
pci_intline = pci_read_config(dev, PCIR_INTLINE, 1);
printf("%x\n", pci_intline);
return;
}
---------------------------
which just output the IRQ for the given bus,device,function. I can
locate the IRQ's for all devices I care to throw at it, but the 0:7:3
device is found, but the PCIR_INTLINE is always 0xFF.
Looking at the linux code I should get back 0x19.
Am I totally missing something?
Thanks in advance,
Alan.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1176183021.5525.4.camel>
