arch/x86: Add function to determine if we're currently running from CAR

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 <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/19787
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
This commit is contained in:
Julius Werner
2017-05-18 14:44:08 -07:00
parent c25b2a18fa
commit a92851939c
2 changed files with 14 additions and 0 deletions

View File

@@ -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;