This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: IRQs mapping in PC platform
- To: 'Nick Garnett' <nickg at cygnus dot co dot uk>, "Boris V. Guzhov" <borg at int dot spb dot ru>
- Subject: RE: [ECOS] IRQs mapping in PC platform
- From: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Date: Thu, 24 Aug 2000 11:42:27 -0700
- Cc: ecos-discuss at sourceware dot cygnus dot com
> -----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