arch/x86: fix a wrong variable in ioapic_set_max_vectors()

The commit 04a40379b has a wrongly written variable, which sets an
IOAPIC register to a wrong value and makes the Linux kernel unable to
boot.

Tested on HP EliteBook 2760p, the kernel boots after this patch.

Change-Id: Ifda7bb61a431dbf9c2df2f738aa806dd6d8097b8
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58558
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Iru Cai 2021-10-23 21:44:02 +08:00 committed by Nico Huber
parent f9146ad569
commit 308a5b9dd1
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ void ioapic_set_max_vectors(void *ioapic_base, int mre_count)
count = mre_count - 1;
reg &= ~(0xff << 16);
reg |= count << 16;
io_apic_write(ioapic_base, 0x01, count);
io_apic_write(ioapic_base, 0x01, reg);
}
void ioapic_lock_max_vectors(void *ioapic_base)