This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: IRQs mapping in PC platform


> -----Original Message-----
> From: Nick Garnett [mailto:nickg@cygnus.co.uk]
> Subject: Re: [ECOS] IRQs mapping in PC platform
> 
> 
> "Boris V. Guzhov" <borg@int.spb.ru> writes:
> 
> > 
> > But there is one more bug:  in the  cyg_drv_interrupt_(un)mask().
> > I think that right similarly to following (it is written on 
> the "C" only
> > for a example):
> > 
> > void cyg_drv_interrupt_unmask(cyg_vector_t vector)
> > {
> >   if ( vector < 0x28 )  // for master
> >     pc_outb(0x21, pc_inb(0x21) & ~(1<<(vector-0x20)));
> >   else           // for slave
> >   {
> >     pc_outb(0x21, pc_inb(0x21) & ~(1<<2));    //  unmask master IRQ2
> >     pc_outb(0xA1, pc_inb(0xA1) & ~(1<<(vector-0x28)));
> >   }
> > }
> > 
> > For cyg_drv_interrupt_mask() is similarly.

I would like to disagree with this last remark about  the mask function. If
you meant similarly as: "mask IRQ2 when maksing irq 8 or above" that would,
I think, mean that all IRQs above 8 are masked when we mask an IRQ above 8.

More generally I think that IRQ 2 should never be masked unless
intentionnaly with the cyg_interrupt_mask. If it was the case, then mask and
unmask function should have worked correctly.
And I think too that IRQ2 should be unmasked at PIC initialisation.

Anyway it is still a good idea to unmask IRQ2 when unmasking an IRQ above 8.

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]