aboutsummaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-18 18:30:29 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-27 22:41:23 +0100
commit823edda98e6512d3f455b61549efea6fa68ee2b0 (patch)
tree53937f057c766750afb8e3005fe756ea7fabdc89 /src/arch
parent05369de639b84981547b89c1fcfcafc79d9d921f (diff)
downloadcoreboot-823edda98e6512d3f455b61549efea6fa68ee2b0.tar.gz
coreboot-823edda98e6512d3f455b61549efea6fa68ee2b0.tar.xz
coreboot-823edda98e6512d3f455b61549efea6fa68ee2b0.zip
CBMEM: Implement cbmem_run_init_hooks() stub
Until we completely can unify early_variables, use these to handle CBMEM update hooks for both romstage and ramstage. For x86, CAR_MIGRATE serves the purpose of romstage hooks. Change-Id: I100ebc0e35e1b7091b4f287ca37f539fd7c9fa7a Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7876 Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/tables.c8
-rw-r--r--src/arch/arm64/tables.c8
-rw-r--r--src/arch/riscv/tables.c8
-rw-r--r--src/arch/x86/boot/cbmem.c18
-rw-r--r--src/arch/x86/boot/tables.c8
5 files changed, 12 insertions, 38 deletions
diff --git a/src/arch/arm/tables.c b/src/arch/arm/tables.c
index a2b7b9b17..09385b663 100644
--- a/src/arch/arm/tables.c
+++ b/src/arch/arm/tables.c
@@ -29,14 +29,6 @@
#define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
-void cbmem_arch_init(void)
-{
-}
-
-void cbmem_fail_resume(void)
-{
-}
-
void write_tables(void)
{
unsigned long table_pointer, new_table_pointer;
diff --git a/src/arch/arm64/tables.c b/src/arch/arm64/tables.c
index a2b7b9b17..09385b663 100644
--- a/src/arch/arm64/tables.c
+++ b/src/arch/arm64/tables.c
@@ -29,14 +29,6 @@
#define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
-void cbmem_arch_init(void)
-{
-}
-
-void cbmem_fail_resume(void)
-{
-}
-
void write_tables(void)
{
unsigned long table_pointer, new_table_pointer;
diff --git a/src/arch/riscv/tables.c b/src/arch/riscv/tables.c
index 6300f7b15..124a659ad 100644
--- a/src/arch/riscv/tables.c
+++ b/src/arch/riscv/tables.c
@@ -29,10 +29,6 @@
#define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
-void cbmem_arch_init(void)
-{
-}
-
// WTF. this does not agre with the prototype!
static struct lb_memory *wtf_write_tables(void)
{
@@ -70,7 +66,3 @@ void write_tables(void)
{
wtf_write_tables();
}
-
-void cbmem_fail_resume(void)
-{
-}
diff --git a/src/arch/x86/boot/cbmem.c b/src/arch/x86/boot/cbmem.c
index 8b2b6da67..bbf70a2a0 100644
--- a/src/arch/x86/boot/cbmem.c
+++ b/src/arch/x86/boot/cbmem.c
@@ -20,6 +20,9 @@
#include <cbmem.h>
#include <arch/acpi.h>
+/* FIXME: Remove after CBMEM_INIT_HOOKS. */
+#include <cpu/x86/gdt.h>
+
#if !CONFIG_DYNAMIC_CBMEM
void get_cbmem_table(uint64_t *base, uint64_t *size)
{
@@ -69,16 +72,19 @@ void *cbmem_top(void)
#endif /* DYNAMIC_CBMEM */
+void cbmem_run_init_hooks(void)
+{
#if !defined(__PRE_RAM__)
+ move_gdt();
+#endif
+}
-/* ACPI resume needs to be cleared in the fail-to-recover case, but that
- * condition is only handled during ramstage. */
+/* Something went wrong, our high memory area got wiped */
void cbmem_fail_resume(void)
{
-#if CONFIG_HAVE_ACPI_RESUME
- /* Something went wrong, our high memory area got wiped */
+#if !defined(__PRE_RAM__) && IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
+ /* ACPI resume needs to be cleared in the fail-to-recover case, but that
+ * condition is only handled during ramstage. */
acpi_fail_wakeup();
#endif
}
-
-#endif /* !__PRE_RAM__ */
diff --git a/src/arch/x86/boot/tables.c b/src/arch/x86/boot/tables.c
index 8685ed48d..c2265ea90 100644
--- a/src/arch/x86/boot/tables.c
+++ b/src/arch/x86/boot/tables.c
@@ -21,7 +21,6 @@
#include <console/console.h>
#include <cpu/cpu.h>
-#include <cpu/x86/gdt.h>
#include <boot/tables.h>
#include <boot/coreboot_tables.h>
#include <arch/pirq_routing.h>
@@ -31,13 +30,6 @@
#include <cbmem.h>
#include <smbios.h>
-
-void cbmem_arch_init(void)
-{
- /* defined in gdt.c */
- move_gdt();
-}
-
void write_tables(void)
{
unsigned long low_table_start, low_table_end;