diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-15 13:46:33 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-15 13:46:33 -0400 |
commit | 1c494278c356d6bf7743d9d032726cecf6b000d5 (patch) | |
tree | e4afb0fd7ceca345844113f73aa28ab01a784cf8 /src/sys | |
parent | 76b4d4408ec450d8f8a3aee7223b67da1ce0e2cb (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/arch/amd64/mainbus/ioapic.c | 2 |
1 files changed, 1 insertions, 1 deletions
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", |