summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-31 18:34:59 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-27 22:42:10 +0100
commite45542580c1765720dbfbd8b4076296e442a211b (patch)
treed07d5d17d9cd265d711d5818eb1585c023099414 /src/arch/x86
parent823edda98e6512d3f455b61549efea6fa68ee2b0 (diff)
downloadcoreboot-e45542580c1765720dbfbd8b4076296e442a211b.tar.xz
CBMEM console: Fix CAR migration step
With the change it becomes irrelevant if memcpy() car.global_data or cbmemc_reinit() is done first. Change-Id: Ie479eef346c959e97dcc55861ccb0db1321fb7b2 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8032 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/include/arch/early_variables.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h
index f76c0481ab..2d5ae859ff 100644
--- a/src/arch/x86/include/arch/early_variables.h
+++ b/src/arch/x86/include/arch/early_variables.h
@@ -39,9 +39,14 @@ asm(".previous");
/* Get the correct pointer for the CAR global variable. */
void *car_get_var_ptr(void *var);
+/* Get and update a CAR_GLOBAL pointing elsewhere in car.global_data*/
+void *car_sync_var_ptr(void *var);
+
/* Get and set a primitive type global variable. */
#define car_get_var(var) \
*(typeof(var) *)car_get_var_ptr(&(var))
+#define car_sync_var(var) \
+ *(typeof (var) *)car_sync_var_ptr(&(var))
#define car_set_var(var, val) \
do { car_get_var(var) = (val); } while(0)
@@ -49,6 +54,7 @@ void *car_get_var_ptr(void *var);
#define CAR_MIGRATE(migrate_fn_)
static inline void *car_get_var_ptr(void *var) { return var; }
#define car_get_var(var) (var)
+#define car_sync_var(var) (var)
#define car_set_var(var, val) do { (var) = (val); } while (0)
#endif