diff options
author | Andrey Petrov <andrey.petrov@intel.com> | 2016-02-25 17:22:17 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-03-05 16:00:42 +0100 |
commit | dd56de974ddc7d0d8d782b50d9260b0596f59a1a (patch) | |
tree | 3ecc573eb8dad7cf0034f8508c60175c50048674 /src/cpu/x86 | |
parent | b1bca88a049bab525828c549bd7097cca7b5f80f (diff) | |
download | coreboot-dd56de974ddc7d0d8d782b50d9260b0596f59a1a.tar.xz |
arch/x86: document CAR symbols and expose them in symbols.h
Attempt to better document the symbol usage in car.ld for
cache-as-ram usage. Additionally, add _car_region_[start|end]
that completely covers the entire cache-as-ram region. The
_car_data_[start|end] symbols were renamed to
_car_relocatable_data_[start|end] in the hopes of making it
clearer that objects within there move. Lastly, all these
symbols were added to arch/symbols.h.
Change-Id: I1f1af4983804dc8521d0427f43381bde6d23a060
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/13804
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/car.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c index fda3f7d4f4..f9b427a4b0 100644 --- a/src/cpu/x86/car.c +++ b/src/cpu/x86/car.c @@ -46,8 +46,8 @@ void *car_get_var_ptr(void *var) { char *migrated_base = NULL; int offset; - void * _car_start = &_car_data_start; - void * _car_end = &_car_data_end; + void * _car_start = _car_relocatable_data_start; + void * _car_end = _car_relocatable_data_end; /* If the cache-as-ram has not been migrated return the pointer * passed in. */ @@ -84,8 +84,8 @@ void *car_get_var_ptr(void *var) void *car_sync_var_ptr(void *var) { void ** mig_var = car_get_var_ptr(var); - void * _car_start = &_car_data_start; - void * _car_end = &_car_data_end; + void * _car_start = _car_relocatable_data_start; + void * _car_end = _car_relocatable_data_end; /* Not moved or migrated yet. */ if (mig_var == var) @@ -129,7 +129,7 @@ static void do_car_migrate_variables(void) return; } - memcpy(migrated_base, &_car_data_start[0], car_size); + memcpy(migrated_base, _car_relocatable_data_start, car_size); /* Mark that the data has been moved. */ car_migrated = ~0; |