From 65c4b8652de6d621dbc466b706d61c856db348d9 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 9 Mar 2023 19:29:16 +0100 Subject: [PATCH] soc/amd/common/block/psp/psp_smm: use raw MSR data Since mst_t is a union of the struct containing the lower and higher 32 bits and the raw 64 bit value, there's no need to convert the lower and higher 32 bits into a 64 bit value and we can just use the 64 bit raw value. Signed-off-by: Felix Held Change-Id: I5923df84f0eb3a28ba6eda4a06c7421f4459e560 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73638 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Fred Reitberger Reviewed-by: Eric Lai Reviewed-by: Arthur Heymans --- src/soc/amd/common/block/psp/psp_smm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/amd/common/block/psp/psp_smm.c b/src/soc/amd/common/block/psp/psp_smm.c index 95c3e4ef1b..49e48e3d48 100644 --- a/src/soc/amd/common/block/psp/psp_smm.c +++ b/src/soc/amd/common/block/psp/psp_smm.c @@ -51,10 +51,10 @@ int psp_notify_smm(void) }; msr = rdmsr(SMM_ADDR_MSR); - buffer.req.smm_base = ((uint64_t)msr.hi << 32) | msr.lo; + buffer.req.smm_base = msr.raw; msr = rdmsr(SMM_MASK_MSR); msr.lo &= 0xffff0000; /* mask SMM_TSEG_VALID and reserved bits */ - buffer.req.smm_mask = ((uint64_t)msr.hi << 32) | msr.lo; + buffer.req.smm_mask = msr.raw; soc_fill_smm_trig_info(&buffer.req.smm_trig_info); #if (CONFIG(SOC_AMD_COMMON_BLOCK_PSP_GEN2))