Re: GIISR_INFO Struct

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



Just want to clarify a bit, This particular device has 2 Interrupt
registers and 2 mask registers, and they truly are separate, kind of a
screwy way to do it because all they needed was a bit in one to know to go
look at the other, but this device does not have that so I need 2 separate
PortAddr's and 2 separate Mask's for the single device... but I get what I
have to do...


thanks,

Joe w.

"Andrew at Plextek (www.plextek.co.uk)" <ams@xxxxxxxxxxx> wrote in message
news:5e8d8874-a69d-466c-9306-c75626e5471f@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Joe,

I think perhaps you are confusing what you have to do in an ISR and an
IST. The WinCE model is that the ISR should do next to b*gger all, and
all of the interrupt servicing should be in the IST. An installable
ISR can be as little as determining that a piece of hardware has
generated in interrupt. When the ISR returns the SYSINTR this hardware
interrupt is masked, the IST is signalled and when the IST signals
interrupt done the hardware interrupt is unmasked.

Usually the ISR can determine an interrupt event with a single
register pending/enable mask pair which is what GIISR is set up for.
Basically one SYSINTR number per piece of hardware (or PCI function on
a multi-function card). The ISR shouldn't really be trying to
determine what type of interrupt (eg DMA done, TX ready, etc.) by
looking beyond the global interrupt pending register. This should be
the job of the IST that's signalled when the SYSINTR is returned by
the ISR.

Of course, this is a generalisation and you can always write
exceptions to the rule. In this case you should write your own IISR
and you can use GIISR as a base to do this.

Regards,
Andrew.


On Mar 5, 3:57 pm, "Joe Welfeld" <jwelfeldnos...@xxxxxxxxxxxxx> wrote:
Hi,

not sure I understand what to do when I want my int thread to be called
when my device has multiple isr registers. right now I have it setup
as tho it is the only isr in the chain, (always call my thread) but
ultimately that wont work unless there is some way I can guarantee that I
am the last in the chain ? I see I can either register a second
GIISR_INFO struct with different Addr and MAsk but ultimately both
registrations will call the same thread, perhaps this does not matter,
now for the third method where I can clone the GIISR routine and make my
own routine, how does this work for the "other" devices in the same
interrupt chain ? they will not call my new routine so how is this handled
?

Thanks,

Joe W.

"Andrew at Plextek (www.plextek.co.uk)" <a...@xxxxxxxxxxx> wrote in
messagenews:cd846da8-58c1-4eb2-a3ff-c46c756ccecc@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Joe,

You can see the source for GIISR in the public tree at PUBLIC\COMMON
\OAK\DRIVERS\GIISR. It should clear up a lot of your questions.

Basically, if CheckPort is FALSE then SYSINTR_XXX is always returned
when the interrupt occurs (This means you can only use this on an
unchained interrupt or one on the end of an interrupt chain.)

If CheckPort is TRUE then the ISR reads from the specified port
(usually set to the Int Pending register).

Now, if UseMaskReg is FALSE, the port value is masked with the Mask
value and SYSINTR_XXX is returned if the result is non-zero. If
UseMaskReg is TRUE then the ISR reads the register pointed to by
MaskAddr (usually the Int Enable Register) to get the mask value.
Again, if this mask value ANDed with the port value is non-zero then
SYSINTR_XXX is returned.

In all other cases SYSINTR_CHAIN is returned.

Note that if PortAddr and MaskAddr are memory mapped, then they must
be addressable from Kernel space, ie. a statically mapped virtual
address. Use one of the functions TransBusAddrToStatic(),
BusTransBusAddrToStatic() or CreateStaticMapping() to accomplish this
before calling KernelLibIoControl(IOCTL_GIISR_PORTVALUE).

Regards,
Andrew.

On Mar 4, 9:39 pm, "Joe Welfeld" <jwelfeldnos...@xxxxxxxxxxxxx> wrote:



Hi,

I need some help understanding this structure settings

here is what I think:

set Checkport true if you want isr routine to read interrupt register
from device pointed to by setting PortAddr to interrupt register.

set UseMaskReg True and set MaskAddr to point to the Interrupt register
MASK address register. then the ISR will AND PortAddr and MaskAddr
and if a bit is set it will call isr handler otherwise it will test next
registered chain...

so when/how do I use Mask field (is this in place of MaskAddr, where
if I dont set UseMaksReg it will and Mask field and PortAddr data)?

also what if my device has more then one Interrupt register how can I
check 2 registers ?

Thanks,

Joe W.- Hide quoted text -

- Show quoted text -


.



Relevant Pages

  • Re: Why ISR contains no arguments and return type is void
    ... If an interrupt can be caused by 3 causes, A, B, or C then the condition ... In addition, when you write an ISR, ... Check Ralph Brown's INT list. ... > in a register before returning from your ISR. ...
    (sci.electronics.design)
  • Re: GIISR_INFO Struct
    ... I think perhaps you are confusing what you have to do in an ISR and an ... all of the interrupt servicing should be in the IST. ... register pending/enable mask pair which is what GIISR is set up for. ... Now, if UseMaskReg is FALSE, the port value is masked with the Mask ...
    (microsoft.public.windowsce.platbuilder)
  • Re: PCI Driver ISR configuration.
    ... I am using the generic ISR and I send (with the ... KernelLibIoControl) the address of the card interrupt register and the ... > Is your network card has installable ISR? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: GIISR_INFO Struct
    ... when my device has multiple isr registers. ... (usually set to the Int Pending register). ... Now, if UseMaskReg is FALSE, the port value is masked with the Mask ... from device pointed to by setting PortAddr to interrupt register. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Interrupt storm with shared interrupt on digi(4)
    ... appears to mask the problem. ... That is because we leave interrupts masked until it gets an interrupt handler. ... Since digidoesn't register a handler, ... the only documentation is the Linux driver and it ...
    (freebsd-stable)