Index | Thread | Search

From:
Crystal Kolipe <kolipe.c@exoticsilicon.com>
Subject:
Re: un-ifdef i8259 on amd64
To:
Stefan Fritsch <sf@sfritsch.de>
Cc:
tech@openbsd.org
Date:
Thu, 15 Jan 2026 15:42:04 +0000

Download raw body.

Thread
On Thu, Jan 15, 2026 at 11:05:53AM +0100, Stefan Fritsch wrote:
> never defined:
>         ICU_SPECIAL_MASK_MODE
>         AUTO_EOI_1
>         AUTO_EOI_2
>         PIC_MASKDELAY
>         MASKDELAY

The code behind MASKDELAY which is always disabled on amd64 is hardcoded and
always present on i386:

From i386/include/i8259.h:

In #define i8259_asm_mask(num) and #define i8259_asm_unmask(num):

	pushl	%eax							;\
	inb	$0x84,%al						;\
	popl	%eax							;\

This is just a discarded read from port 0x84.

Looking at the history of the i386 version, in the original OpenBSD commit,
it's behind a similar #define that the amd64 code is today, and the original
intent seems to have been for the delay not to be compiled in by default even
on i386.

Subsequent code tidying seems to have inverted the logic for it.

Was this change in i386 intentional?