From 2f6f487c3cda8fc7d698fa1e08fd656fe1d3433b Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 9 Mar 2023 19:19:01 +0100 Subject: soc/amd/common/block/cpu/update_microcode: 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, the address of the microcode update can be directly written to the raw value instead of needing to split it into the lower and higher 32 bits and assigning those separately. Signed-off-by: Felix Held Change-Id: I51c84164e81477040a4b7810552d3d65c0e3656b Reviewed-on: https://review.coreboot.org/c/coreboot/+/73636 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/common/block/cpu/update_microcode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/common/block/cpu/update_microcode.c b/src/soc/amd/common/block/cpu/update_microcode.c index cfffbc0326..0edb9d29a9 100644 --- a/src/soc/amd/common/block/cpu/update_microcode.c +++ b/src/soc/amd/common/block/cpu/update_microcode.c @@ -37,8 +37,7 @@ static void apply_microcode_patch(const struct microcode *m) uint32_t new_patch_id; msr_t msr; - msr.hi = (uint64_t)(uintptr_t)m >> 32; - msr.lo = (uintptr_t)m & 0xffffffff; + msr.raw = (uintptr_t)m; wrmsr(MSR_PATCH_LOADER, msr); -- cgit v1.2.3