summaryrefslogtreecommitdiff
path: root/src/include/cpu/x86/lapic.h
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2022-01-03 14:54:27 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-02-05 07:47:55 +0000
commit0c1158b15d8874f0c24a65245aabd1c6dca9d8c2 (patch)
tree3960c2815abd7420777375e029ab2aa0c6d0d926 /src/include/cpu/x86/lapic.h
parentc8d26c01584f6a41a6a5e79924742af5d83454f7 (diff)
cpu/x86/lapic: Unify some parameter
Change-Id: I790fddea747f5db0536159e6c2ac90ea1da2830e Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60712 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/include/cpu/x86/lapic.h')
-rw-r--r--src/include/cpu/x86/lapic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h
index af0793b7b8..779799ecf4 100644
--- a/src/include/cpu/x86/lapic.h
+++ b/src/include/cpu/x86/lapic.h
@@ -18,9 +18,9 @@ static __always_inline void xapic_write(unsigned int reg, uint32_t v)
write32((volatile void *)(uintptr_t)(LAPIC_DEFAULT_BASE + reg), v);
}
-static __always_inline void xapic_send_ipi(uint32_t icrlow, uint32_t apicid)
+static __always_inline void xapic_send_ipi(uint32_t icrlow, uint32_t icrhi)
{
- xapic_write(LAPIC_ICR2, SET_LAPIC_DEST_FIELD(apicid));
+ xapic_write(LAPIC_ICR2, icrhi);
xapic_write(LAPIC_ICR, icrlow);
}
@@ -51,10 +51,10 @@ static __always_inline void x2apic_write(unsigned int reg, uint32_t v)
wrmsr(index, msr);
}
-static __always_inline void x2apic_send_ipi(uint32_t icrlow, uint32_t apicid)
+static __always_inline void x2apic_send_ipi(uint32_t icrlow, uint32_t icrhi)
{
msr_t icr;
- icr.hi = apicid;
+ icr.hi = icrhi;
icr.lo = icrlow;
wrmsr(X2APIC_MSR_ICR_ADDRESS, icr);
}
@@ -112,7 +112,7 @@ static __always_inline void lapic_send_ipi(uint32_t icrlow, uint32_t apicid)
if (is_x2apic_mode())
x2apic_send_ipi(icrlow, apicid);
else
- xapic_send_ipi(icrlow, apicid);
+ xapic_send_ipi(icrlow, SET_LAPIC_DEST_FIELD(apicid));
}
static __always_inline int lapic_busy(void)