From a92851939cffcfa11d3abf80cc910a43bb48e6b0 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 18 May 2017 14:44:08 -0700 Subject: arch/x86: Add function to determine if we're currently running from CAR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds a simple function that can be used to check if CAR_GLOBALs are currently being read from CAR or from DRAM. Change-Id: Ib7ad0896a691ef6e89e622b985417fedc43579c1 Signed-off-by: Julius Werner Reviewed-on: https://review.coreboot.org/19787 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Philippe Mathieu-Daudé --- src/cpu/x86/car.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cpu') diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c index 606a35e2f6..1b02f8b7da 100644 --- a/src/cpu/x86/car.c +++ b/src/cpu/x86/car.c @@ -113,6 +113,11 @@ void *car_sync_var_ptr(void *var) return mig_var; } +int car_active(void) +{ + return !car_migrated; +} + static void do_car_migrate_variables(void) { void *migrated_base; -- cgit v1.2.3