[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: gnumach - simplify interrupt handling
From: |
Samuel Thibault |
Subject: |
Re: [PATCH]: gnumach - simplify interrupt handling |
Date: |
Sun, 10 Nov 2019 16:08:26 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Damien Zammit, le sam. 09 nov. 2019 15:46:33 +1100, a ecrit:
> diff --git a/i386/i386/pic.h b/i386/i386/pic.h
> index 80bf65d..abf0993 100644
> --- a/i386/i386/pic.h
> +++ b/i386/i386/pic.h
> @@ -176,11 +176,18 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> #define READ_IR_ONRD 0x00
> #define READ_IS_ONRD 0x01
>
> +/*
> + * The mask registers will be set only once at boot:
> + * PICMASK contains the final mask to be split among the two PICs
> + */
> +#if defined(AT386)
> +#define PICMASK (0x0000 ^ SLAVE_ON_IR2)
I don't think you want to mask SLAVE_ON_IR2, since AIUI that'd disable
slave IRQs. With that fixed, I can boot without this change:
> diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S
> index cdb385c..8a4cd73 100644
> --- a/i386/i386at/interrupt.S
> +++ b/i386/i386at/interrupt.S
> @@ -42,11 +42,18 @@ ENTRY(interrupt)
> cli /* XXX no more nested interrupts */
> popl %eax /* restore irq number */
> movl %eax,%ecx /* copy irq number */
> + movb $0xff,%al /* mask for all interrupts */
> + outb %al,$(PIC_MASTER_OCW) /* mask master out */
> + outb %al,$(PIC_SLAVE_OCW) /* mask slave out */
> + movl %ecx,%eax /* restore eax */
> movb $(NON_SPEC_EOI),%al /* non-specific EOI */
> outb %al,$(PIC_MASTER_ICW) /* ack interrupt to master */
> cmpl $8,%ecx /* do we need to ack slave? */
> jl 1f /* no, skip it */
> outb %al,$(PIC_SLAVE_ICW)
> 1:
> + movb $0,%al /* empty mask */
> + outb %al,$(PIC_MASTER_OCW) /* unmask master */
> + outb %al,$(PIC_SLAVE_OCW) /* unmask slave */
> ret /* return */
> END(interrupt)
Which was by luck clearing the slave bit on the master.
Samuel
- [PATCH]: gnumach - simplify interrupt handling, Damien Zammit, 2019/11/08
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/10
- Re: [PATCH]: gnumach - simplify interrupt handling,
Samuel Thibault <=
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/10
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/10
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/10
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/10
- Re: [PATCH]: gnumach - simplify interrupt handling, Damien Zammit, 2019/11/11
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/11
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/11
- Re: [PATCH]: gnumach - simplify interrupt handling, Justus Winter, 2019/11/11
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/11
- Re: [PATCH]: gnumach - simplify interrupt handling, Samuel Thibault, 2019/11/11