diff options
author | Julius Werner <jwerner@chromium.org> | 2017-05-18 14:44:08 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2017-05-30 22:19:25 +0200 |
commit | a92851939cffcfa11d3abf80cc910a43bb48e6b0 (patch) | |
tree | 3ede1be9698278b11cc8472bf6797f1abdbed989 /src/cpu/x86 | |
parent | c25b2a18fa42f26a799c55c5e463ecb5f4e4c89e (diff) | |
download | coreboot-a92851939cffcfa11d3abf80cc910a43bb48e6b0.tar.xz |
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>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/car.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |