RE: PCI interrupts issues on x86 - code snippets included

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You have to install your own ISR: when an IRQ 11 is triggered, the
x86 'common' ISR ( look at
$(_WINCEROOT)\PLATFORM\COMMON\SRC\X86\COMMON\INTR\fwpc.c ) will call
NKCallIntChain to see if any installed ISR
handles the interrupt; if no ISR claims the interrupt the the function will
return
the SysIntr value returned by OALIntrTranslateIrq (IRQ11);
this value is the one which is statically mapped at startup in
$(_WINCEROOT)\PLATFORM\COMMON\SRC\X86\COMMON\INTR\init.c:
OALIntrStaticTranslate(SYSINTR_FIRMWARE + 11, 11);


"M Len" wrote:

> Thanks in advance for any help with this issue! I'm going nuts.
>
> Target platform - x86, ETX formfactor
> Using WinCE 5.0, Platform Builder for WinCE 5.0
> BSP supplied from target manufacturer
>
> I have debugged enough to know that the hardware is triggering the hardware
> interrupt. The hardware interrupt is INTA on the PCI bus. I also know that
> what I've done so far seems to be working (I have manually triggered the
> event I have associated with the system interrupt and my IST operates as
> expected). I have looked at the registry and the instance key reports that
> my driver is using system interrupt 32(0x20). I also print out the system
> interrupt when I grab it from DDKReg_GetIsrInfo and verified it matches.
> The physical interrupt reported when I looked at the registry is IRQ 11.
>
> I'm assuming the BSP/OAL layers will properly trigger my IST event when the
> hardware interrupt is triggered. From what I've read in the Microsoft Help
> Pages, a properly designed OAL is responsible for setting up the ISRs that
> will tie the hardware interrupts (IRQs) to logical system interrupts. In my
> mind, the mapping in my case, should be:
> INTA-->IRQ11-->system interrupt 32
> This is what does not seem to be working. I'm also not getting very much
> help from the manufacturer. However, I want to make certain that I'm doing
> stuff correctly on the driver side.
>
> I've taken out all debug messages, error handling and in the case of the
> interrupt thread, I've boiled it down to what I consider useful for
> investigation.
> ******************************Snippets**********************************
>
> Save the interrupt information gotten with DDKReg_GetIsrInfo:
> pDrvInfo->sysInterrupt = intInformation.dwSysintr;
>
>
> Tie the system interrupt to my thread:
> pDrvInfo->hIstEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
> boolStatus = InterruptInitialize(pDrvInfo->sysInterrupt,
> pDrvInfo->hIstEvent, NULL, 0);
> pDrvInfo->hIst = CreateThread(NULL, 0,
> (LPTHREAD_START_ROUTINE)DCB_Interrupt_Thread, (LPVOID)pDrvInfo, 0,
> &threadID);
>
>
> Turn on the PCI interrupts:
> WRITE_REGISTER_ULONG(((PULONG)(pDrvInfo->memCnfgMappedBase.pVirtualAddress +
> INTERRUPT_CONTROL_STATUS_REGISTER)),
> (ULONG)(PCI_INTERRUPT_ENABLE |
> PCI_DOORBELL_INTERRUPT_ENABLE));
>
>
> Writing the cmd generates the interrupt.
> WRITE_PORT_USHORT((PUSHORT)(pDrvInfo->ioMappedBase.pVirtualAddress +
> COMMAND_REGISTER_OFFSET), cmd);
> waitForSingleObjectStatus = WaitForSingleObject(pDrvInfo->hDoorbellEvent,
> WAIT_10_MSEC);
>
>
> DWORD DCB_Interrupt_Thread(LPVOID pDeviceContext)
> {
> InterruptDone(pDrvInfo->sysInterrupt);
> for(;;)
> {
> WaitForSingleObject(pDrvInfo->hIstEvent, INFINITE);
>
> DEBUGMSG(1, (TEXT("DCB_Interrupt_Thread: Interrupt occured.\n\r")));
>
> /* Indicate to OS that we are done. */
> InterruptDone(pDrvInfo->sysInterrupt);
> }
>
> return(0);
> }
>
>
>
>
.



Relevant Pages

  • Re: Installable ISR priority
    ... The priority that an ISR is serviced in will depend on the ... am currently working on has 5 levels of interrupt priority, ... code processes the various pending hardware interrupt inputs in the ... Remember that your ISR should return SYSINTR_CHAIN if it does not ...
    (microsoft.public.windowsce.platbuilder)
  • PCI interrupts issues on x86 - code snippets included
    ... I have debugged enough to know that the hardware is triggering the hardware ... The hardware interrupt is INTA on the PCI bus. ... event I have associated with the system interrupt and my IST operates as ...
    (microsoft.public.windowsce.platbuilder)
  • [HPADM] RE: Performance SIG Events at HP World events 2003 <announcement>
    ... Here are the notes that Alex took during the Performance Panel. ... What is the preferred method for buffer cache, ... Software.hp.com contains tools for interrupt migration. ... Measuring resource usage of hardware interrupt handling. ...
    (HP-UX-Admin)
  • Re: Interrupts are not coming sometime in NIC miniport
    ... An ISR should do only what is absolutely necessary, ... This is usually done by reading some interrupt register on the ... The DPC then does all the real work. ... Fill up blob with data from the NICs data buffers. ...
    (microsoft.public.development.device.drivers)
  • Re: bad vme interrupt 0 or uninitialized vme interrupt
    ... My ISR worked very fast but I had interrupt problems (explained in last ... right solution or because these macro calls include a delay big enough ... I have several VME encoder cards that are latched at ...
    (comp.os.vxworks)