Re: DPC/ISR synchronization (windows ce) by Arkady
Arkady
Fri Jul 01 09:51:50 CDT 2005
Pavel !
Just a little addition : that's try that CE model is similar to vxWorks
InterruptHandler ( ISR ) just set event for usermode servicethread
( IST ) thus excluding DCP at all , but for NDIS in CE that still emulate(d)
the same DPC behavious as in big windows , so maybe
some general concept changed in the last CE , because OP pointed that they
run on the same thread which wasn't possible in previous versions of little
window for any driver especially for network ( NDIS ).
Arkady
"Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
news:273A0DF7-E7A3-49CD-B791-957F4E87882B@microsoft.com...
> "Gary G. Little" wrote:
>> Not necessarily. I have dealt with drivers that could not diasble
>> interrupts
>> and then let the DPC re-enable them. Done properly, there is no reason
>> why
>> the device's interrupt should be disabled in the ISR and enabled in the
>> DPC.
>> You do have to sync access to resources that are shared between the two.
>
> You're correct, but as you see, this design is not quite portable to
> WinCE.
> How exactly hardware interrupts behave on CE depends on the
> manufacturer of the CE device.
> I'm not sure about CE 5, but in previous CE versions
> installable drivers could not receive hardware interrupts at all, and thus
> did not have real ISRs. What they get is callbacks in context of a high
> priority user mode threads. DPCs are emulated with usermode
> threads with lesser priority.
> So the different behavior in CE5 could be caused by mistake of
> somebody who configured it for the specific platform
> (assigned wrong priorities to interrupt and DPC threads, etc).
>
> Regards,
> --PA
>
>
>> The personal opinion of
>> Gary G. Little
>>
>> "Pavel A." wrote:
>>
>> > "anonymous" wrote:
>> > > I haven't had a lot of response in the platform builder newsgroups,
>> > > so I'll
>> > > try here.
>> > >
>> > > In Windows CE 4.1, I had no problem with a NDIS ISR (miniportISR)
>> > > interrupting the DPC(MiniportHandleInterrupt). In upgrading to
>> > > Windows CE
>> > > 5.0, I'm seeing that the ISR is getting held off by the DPC.
>> >
>> > Hi,
>> > First of all, could you please explain why your ISR occurs while the
>> > DPC
>> > is scheduled?
>> > When interrupt occurs and the ISR queues a DPC, it should normally
>> > prevent
>> > the device from generating more interrupts.
>> > Then the DPC runs and re-enables the interrupts just before returning.
>> > Why this design isn't good for you?
>> >
>> > Regards,
>> > --PA
>> >
>> > >I've tried
>> > > serialized/deserialized. I've verified that the interrupt is not
>> > > disabled in
>> > > the kernel and can see with independent means that kernel is seeing
>> > > the
>> > > interrupt and setting the interrupt event in time with the hardware,
>> > > but the
>> > > ISR waits until the DPC finishes until it is run.
>> > >
>> > > Does anyone have visibility into what has changed between the CE 4.x
>> > > and 5.x
>> > > NDIS implementation ? The driver registers as an NDIS 5.0 miniport.