From 17e68572caeea458f7635a3cac6be3b1f2484ab8 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sat, 12 Nov 2022 18:06:15 +0100 Subject: soc/amd/psp_smm_gen2.c: Fix 64bit mode integer conversion Explicitly cast integers to fix building for long mode. Change-Id: I9f56e183563c943d1c2bd0478c41a80512b47c5e Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/69507 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/soc/amd/common/block/psp/psp_smm_gen2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/soc/amd/common/block/psp/psp_smm_gen2.c b/src/soc/amd/common/block/psp/psp_smm_gen2.c index f02723ad1f..6bf079d5c7 100644 --- a/src/soc/amd/common/block/psp/psp_smm_gen2.c +++ b/src/soc/amd/common/block/psp/psp_smm_gen2.c @@ -4,6 +4,7 @@ #include #include #include +#include void soc_fill_smm_trig_info(struct smm_trigger_info *trig) { @@ -13,8 +14,8 @@ void soc_fill_smm_trig_info(struct smm_trigger_info *trig) trig->address = (uintptr_t)acpimmio_smi + SMI_REG_SMITRIG0; trig->address_type = SMM_TRIGGER_MEM; trig->value_width = SMM_TRIGGER_DWORD; - trig->value_and_mask = ~SMITRIG0_PSP; - trig->value_or_mask = SMITRIG0_PSP; + trig->value_and_mask = (uint32_t)~SMITRIG0_PSP; + trig->value_or_mask = (uint32_t)SMITRIG0_PSP; } void soc_fill_smm_reg_info(struct smm_register_info *reg) -- cgit v1.2.3