From 1c494278c356d6bf7743d9d032726cecf6b000d5 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 15 Sep 2025 13:46:33 -0400 Subject: kern/amd64: ioapic: Add one to nredir The redirection entry count within the IOAPICVER register is zero-based, therefore one must be added to make it absolute. Signed-off-by: Ian Moffett --- src/sys/arch/amd64/mainbus/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sys/arch/amd64/mainbus/ioapic.c b/src/sys/arch/amd64/mainbus/ioapic.c index acb7a0c..cf65484 100644 --- a/src/sys/arch/amd64/mainbus/ioapic.c +++ b/src/sys/arch/amd64/mainbus/ioapic.c @@ -208,7 +208,7 @@ ioapic_init(void) /* Read the IOAPIC version register */ ioapicver = ioapic_readl(IOAPICVER); ver = ioapicver & 0xFF; - nredir = (ioapicver >> 16) & 0xFF; + nredir = ((ioapicver >> 16) & 0xFF) + 1; printf("ioapic: ioapic @ mainbus:ver=%x,nredir=%d\n" "ioapic: masking all %d pins...\n", -- cgit v1.2.3