From 308a5b9dd1a46299d87dc7215512c459d48d69b8 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Sat, 23 Oct 2021 21:44:02 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58558 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Patrick Georgi Reviewed-by: Felix Held --- src/arch/x86/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/ioapic.c b/src/arch/x86/ioapic.c index d299e6070d..d65637c662 100644 --- a/src/arch/x86/ioapic.c +++ b/src/arch/x86/ioapic.c @@ -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) -- cgit v1.2.3