arch/x86/ioapic.c: Increase the number of bits for ioapic ID

In practice hardware can use larger numbers.

Change-Id: I6e9ddd1ebd396c37e25eb3019f981d45d9c5e062
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70499
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Naresh Solanki <naresh.solanki.2011@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Arthur Heymans 2022-12-08 14:25:11 +01:00 committed by Lean Sheng Tan
parent 0e1f08d1fb
commit d1c61a8e70
1 changed files with 6 additions and 1 deletions

View File

@ -147,7 +147,12 @@ static void set_ioapic_id(void *ioapic_base, u8 ioapic_id)
u8 get_ioapic_id(void *ioapic_base)
{
return (io_apic_read(ioapic_base, 0x00) >> 24) & 0x0f;
/*
* According to 82093AA I/O ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER (IOAPIC)
* only 4 bits (24:27) are used for the ID. In practice the upper bits are either
* always 0 or used for larger IDs.
*/
return (io_apic_read(ioapic_base, 0x00) >> 24) & 0xff;
}
u8 get_ioapic_version(void *ioapic_base)