From 34a5a9b3e623337754787dea9e7677b05109cb93 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 1 Jul 2020 20:11:20 +0200 Subject: include/cpu/x86/lapic: Add support for x86_64 Fix integer with different size to pointer conversion. Change-Id: I9c13892b2d79be12cc6bf7bc0a5e3a39b64032a1 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/42984 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/include/cpu/x86/lapic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h index 28978f2793..5ab57554f2 100644 --- a/src/include/cpu/x86/lapic.h +++ b/src/include/cpu/x86/lapic.h @@ -9,12 +9,12 @@ static __always_inline uint32_t lapic_read(unsigned int reg) { - return read32((volatile void *)(LAPIC_DEFAULT_BASE + reg)); + return read32((volatile void *)(uintptr_t)(LAPIC_DEFAULT_BASE + reg)); } static __always_inline void lapic_write(unsigned int reg, uint32_t v) { - write32((volatile void *)(LAPIC_DEFAULT_BASE + reg), v); + write32((volatile void *)(uintptr_t)(LAPIC_DEFAULT_BASE + reg), v); } static __always_inline void lapic_wait_icr_idle(void) -- cgit v1.2.3