From c04d3ddbaef84746e6651e7354a81b874dbd3385 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 17 Jul 2023 22:59:02 +0200 Subject: include/cpu/amd/msr: introduce and use PSTATE_MSR_COUNT Add and use a define for the total number of P-state MSRs to avoid magic constants in the code. Signed-off-by: Felix Held Change-Id: I37a89faa0f216790b3404fc03edc62408684cc24 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76546 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas --- src/include/cpu/amd/msr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/cpu') diff --git a/src/include/cpu/amd/msr.h b/src/include/cpu/amd/msr.h index ccc9719cb6..3f7febc462 100644 --- a/src/include/cpu/amd/msr.h +++ b/src/include/cpu/amd/msr.h @@ -41,6 +41,7 @@ #define PS_STS_REG 0xC0010063 #define PSTATE_0_MSR 0xC0010064 #define PSTATE_MSR(pstate) (PSTATE_0_MSR + (pstate)) +#define PSTATE_MSR_COUNT 8 #define MSR_PATCH_LOADER 0xC0010020 -- cgit v1.2.3