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