aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-03-09 19:19:01 +0100
committerPaul Fagerburg <pfagerburg@chromium.org>2023-03-13 14:01:55 +0000
commit2f6f487c3cda8fc7d698fa1e08fd656fe1d3433b (patch)
tree4fb2be594887cbceaaf371956cd392d78c29a589 /src/soc/amd/common
parenta83a4cb90cf5201a6b9635eaa171060549b25583 (diff)
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 <felix-coreboot@felixheld.de> Change-Id: I51c84164e81477040a4b7810552d3d65c0e3656b Reviewed-on: https://review.coreboot.org/c/coreboot/+/73636 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/block/cpu/update_microcode.c3
1 files changed, 1 insertions, 2 deletions
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);