summaryrefslogtreecommitdiffstats
path: root/src/include/cpu/amd/msr.h
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-07-17 22:59:02 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-07-18 21:51:33 +0000
commitc04d3ddbaef84746e6651e7354a81b874dbd3385 (patch)
treef17936968325e6c2af6de9f9aad0cba82cbac6c4 /src/include/cpu/amd/msr.h
parent8e0bbb30b616fe65bb03186220753af76dfda7d2 (diff)
downloadcoreboot-c04d3ddbaef84746e6651e7354a81b874dbd3385.tar.gz
coreboot-c04d3ddbaef84746e6651e7354a81b874dbd3385.tar.bz2
coreboot-c04d3ddbaef84746e6651e7354a81b874dbd3385.zip
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 <felix-coreboot@felixheld.de> Change-Id: I37a89faa0f216790b3404fc03edc62408684cc24 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76546 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'src/include/cpu/amd/msr.h')
-rw-r--r--src/include/cpu/amd/msr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/cpu/amd/msr.h b/src/include/cpu/amd/msr.h
index ccc9719cb6a3..3f7febc462d7 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