summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/include/arch/early_variables.h1
-rw-r--r--src/arch/arm64/include/arch/early_variables.h1
-rw-r--r--src/arch/riscv/include/arch/early_variables.h1
-rw-r--r--src/arch/x86/include/arch/early_variables.h6
4 files changed, 9 insertions, 0 deletions
diff --git a/src/arch/arm/include/arch/early_variables.h b/src/arch/arm/include/arch/early_variables.h
index 5b58baa271..cb0872e8f0 100644
--- a/src/arch/arm/include/arch/early_variables.h
+++ b/src/arch/arm/include/arch/early_variables.h
@@ -25,6 +25,7 @@
#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)
static inline void car_migrate_variables(void) { }
diff --git a/src/arch/arm64/include/arch/early_variables.h b/src/arch/arm64/include/arch/early_variables.h
index 5b58baa271..cb0872e8f0 100644
--- a/src/arch/arm64/include/arch/early_variables.h
+++ b/src/arch/arm64/include/arch/early_variables.h
@@ -25,6 +25,7 @@
#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)
static inline void car_migrate_variables(void) { }
diff --git a/src/arch/riscv/include/arch/early_variables.h b/src/arch/riscv/include/arch/early_variables.h
index 3a1f20d041..f9516a4c19 100644
--- a/src/arch/riscv/include/arch/early_variables.h
+++ b/src/arch/riscv/include/arch/early_variables.h
@@ -29,6 +29,7 @@
#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)
static inline void car_migrate_variables(void) { }
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