From 3cff98a0e29cbbab6a4d1788f9695fcf8060584d Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 15 Jul 2022 14:48:45 +0200 Subject: [PATCH] drivers/elog/gsmi.c: Fix compiling for 64bit Change-Id: Ic8e04ae043145a3633c0b8379a797724f95fd7ea Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/65880 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/drivers/elog/gsmi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/drivers/elog/gsmi.c b/src/drivers/elog/gsmi.c index ebdde1953c..36940f1c76 100644 --- a/src/drivers/elog/gsmi.c +++ b/src/drivers/elog/gsmi.c @@ -2,6 +2,7 @@ #include #include +#include #define GSMI_RET_SUCCESS 0x00 #define GSMI_RET_INVALID_PARAMETER 0x82 @@ -59,7 +60,7 @@ u32 gsmi_exec(u8 command, u32 *param) case GSMI_CMD_SET_EVENT_LOG: /* Look for a type1 event */ - sel = (struct gsmi_set_eventlog_param *)(*param); + sel = (struct gsmi_set_eventlog_param *)(uintptr_t)(*param); if (!sel) break; @@ -69,7 +70,7 @@ u32 gsmi_exec(u8 command, u32 *param) break; /* Event structure within the data buffer */ - type1 = (struct gsmi_set_eventlog_type1 *)(sel->data_ptr); + type1 = (struct gsmi_set_eventlog_type1 *)(uintptr_t)(sel->data_ptr); if (!type1) break; @@ -90,7 +91,7 @@ u32 gsmi_exec(u8 command, u32 *param) case GSMI_CMD_CLEAR_EVENT_LOG: /* Get parameter buffer even though we don't use it */ - cel = (struct gsmi_clear_eventlog_param *)(*param); + cel = (struct gsmi_clear_eventlog_param *)(uintptr_t)(*param); if (!cel) break;