summaryrefslogtreecommitdiff
path: root/src/lib/reg_script.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-06-08 06:05:03 +0300
committerAngel Pons <th3fanbus@gmail.com>2020-06-17 21:13:09 +0000
commit7336f97debc883d293e4d5f942c556d1f8931842 (patch)
treeccce5515be8a082f964a5c309d89468776a1bc96 /src/lib/reg_script.c
parent5edbb1c5d917ae27aa8c869a92f3f8750dea9845 (diff)
downloadcoreboot-7336f97debc883d293e4d5f942c556d1f8931842.tar.xz
treewide: Replace CONFIG(ARCH_xx) tests
Once we support building stages for different architectures, such CONFIG(ARCH_xx) tests do not evaluate correctly anymore. Change-Id: I599995b3ed5c4dfd578c87067fe8bfc8c75b9d43 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42183 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/reg_script.c')
-rw-r--r--src/lib/reg_script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/reg_script.c b/src/lib/reg_script.c
index 73b781a43b..51ef689ac9 100644
--- a/src/lib/reg_script.c
+++ b/src/lib/reg_script.c
@@ -11,7 +11,7 @@
#include <stdint.h>
#include <reg_script.h>
-#if CONFIG(ARCH_X86)
+#if ENV_X86
#include <cpu/x86/msr.h>
#endif
@@ -363,7 +363,7 @@ static void reg_script_write_iosf(struct reg_script_context *ctx)
static uint64_t reg_script_read_msr(struct reg_script_context *ctx)
{
-#if CONFIG(ARCH_X86)
+#if ENV_X86
const struct reg_script *step = reg_script_get_step(ctx);
msr_t msr = rdmsr(step->reg);
uint64_t value = msr.hi;
@@ -375,7 +375,7 @@ static uint64_t reg_script_read_msr(struct reg_script_context *ctx)
static void reg_script_write_msr(struct reg_script_context *ctx)
{
-#if CONFIG(ARCH_X86)
+#if ENV_X86
const struct reg_script *step = reg_script_get_step(ctx);
msr_t msr;
msr.hi = step->value >> 32;