summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-04-06 20:40:35 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-04-25 16:34:44 +0000
commitf4543e7426213651f61dc7e31b989bc3ddb67ed3 (patch)
tree8e6e82c78f8c955ad99403485b11a2ebf62528d2 /src/arch
parent993b43f2be5c46a9148599e749be345efa337d27 (diff)
arch/x86/acpi_bert_storage.c: Use BOOT_STATE over CBMEM hooks
With the purpose of linking ramstage inside the bootblock we likely want to skip some ramstage CBMEM hooks and keep those only for recovering data from earlier stages. Change-Id: I317173d468073906d76228d1c8cc7bc28aae9e75 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63415 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/acpi_bert_storage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/x86/acpi_bert_storage.c b/src/arch/x86/acpi_bert_storage.c
index 8559c06dfb..7b6b63bcca 100644
--- a/src/arch/x86/acpi_bert_storage.c
+++ b/src/arch/x86/acpi_bert_storage.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <bootstate.h>
#include <cbmem.h>
#include <console/console.h>
#include <cpu/x86/name.h>
@@ -577,7 +578,7 @@ __weak void bert_reserved_region(void **start, size_t *size)
*size = 0;
}
-static void bert_storage_setup(int unused)
+static void bert_storage_setup(void *unused)
{
/* Always start with a blank bert region. Make sure nothing is
* maintained across reboots or resumes.
@@ -596,4 +597,4 @@ static void bert_storage_setup(int unused)
memset(bert_region_base, 0, bert_region_size);
}
-RAMSTAGE_CBMEM_INIT_HOOK(bert_storage_setup)
+BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_EXIT, bert_storage_setup, NULL);