summaryrefslogtreecommitdiff
path: root/src/security
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/security
parent5edbb1c5d917ae27aa8c869a92f3f8750dea9845 (diff)
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/security')
-rw-r--r--src/security/memory/memory_clear.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/security/memory/memory_clear.c b/src/security/memory/memory_clear.c
index a550eebf4a..031ca84abe 100644
--- a/src/security/memory/memory_clear.c
+++ b/src/security/memory/memory_clear.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#if CONFIG(ARCH_X86)
+#if ENV_X86
#include <cpu/x86/pae.h>
#else
#define memset_pae(a, b, c, d, e) 0
@@ -83,7 +83,7 @@ static void clear_memory(void *unused)
cbmem_get_region(&baseptr, &size);
memranges_insert(&mem, (uintptr_t)baseptr, size, BM_MEM_TABLE);
- if (CONFIG(ARCH_X86)) {
+ if (ENV_X86) {
/* Find space for PAE enabled memset */
pgtbl = get_free_memory_range(&mem, MEMSET_PAE_PGTL_ALIGN,
MEMSET_PAE_PGTL_SIZE);
@@ -114,7 +114,7 @@ static void clear_memory(void *unused)
range_entry_size(r));
}
/* Use PAE if available */
- else if (CONFIG(ARCH_X86)) {
+ else if (ENV_X86) {
if (memset_pae(range_entry_base(r), 0,
range_entry_size(r), (void *)pgtbl,
(void *)vmem_addr))
@@ -126,7 +126,7 @@ static void clear_memory(void *unused)
}
}
- if (CONFIG(ARCH_X86)) {
+ if (ENV_X86) {
/* Clear previously skipped memory reserved for pagetables */
printk(BIOS_DEBUG, "%s: Clearing DRAM %016lx-%016lx\n",
__func__, pgtbl, pgtbl + MEMSET_PAE_PGTL_SIZE);