diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2019-11-20 20:01:11 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-29 09:31:16 +0000 |
commit | 7c2994bb73641826ab04ad622a0904c1c6096cc0 (patch) | |
tree | 4aa5ec8941c6444de0f8622705d16b3fafaa98ee | |
parent | ff168e9e63256888cc3cf39148c2a5c5712654f8 (diff) | |
download | coreboot-7c2994bb73641826ab04ad622a0904c1c6096cc0.tar.xz |
lib/*_stage_cache.c: drop CAR_GLOBAL_MIGRATION support
Change-Id: I23d5367150649a64ec6d95601f38940dbb5972f8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37034
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/lib/cbmem_stage_cache.c | 1 | ||||
-rw-r--r-- | src/lib/ext_stage_cache.c | 20 |
2 files changed, 7 insertions, 14 deletions
diff --git a/src/lib/cbmem_stage_cache.c b/src/lib/cbmem_stage_cache.c index 299cb00dcf..dd56f62392 100644 --- a/src/lib/cbmem_stage_cache.c +++ b/src/lib/cbmem_stage_cache.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */ -#include <arch/early_variables.h> #include <cbmem.h> #include <stage_cache.h> #include <string.h> diff --git a/src/lib/ext_stage_cache.c b/src/lib/ext_stage_cache.c index 354342d41b..466a65f53a 100644 --- a/src/lib/ext_stage_cache.c +++ b/src/lib/ext_stage_cache.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */ -#include <arch/early_variables.h> #include <bootstate.h> #include <cbmem.h> #include <console/console.h> @@ -21,12 +20,7 @@ #include <stage_cache.h> #include <string.h> -static struct imd imd_stage_cache CAR_GLOBAL = { }; - -static inline struct imd *imd_get(void) -{ - return car_get_var_ptr(&imd_stage_cache); -} +static struct imd imd_stage_cache; static void stage_cache_create_empty(void) { @@ -34,7 +28,7 @@ static void stage_cache_create_empty(void) void *base; size_t size; - imd = imd_get(); + imd = &imd_stage_cache; stage_cache_external_region(&base, &size); imd_handle_init(imd, (void *)(size + (uintptr_t)base)); @@ -50,7 +44,7 @@ static void stage_cache_recover(void) void *base; size_t size; - imd = imd_get(); + imd = &imd_stage_cache; stage_cache_external_region(&base, &size); imd_handle_init(imd, (void *)(size + (uintptr_t)base)); if (imd_recover(imd)) @@ -64,7 +58,7 @@ void stage_cache_add(int stage_id, const struct prog *stage) struct stage_cache *meta; void *c; - imd = imd_get(); + imd = &imd_stage_cache; e = imd_entry_add(imd, CBMEM_ID_STAGEx_META + stage_id, sizeof(*meta)); if (e == NULL) { @@ -99,7 +93,7 @@ void stage_cache_add_raw(int stage_id, const void *base, const size_t size) const struct imd_entry *e; void *c; - imd = imd_get(); + imd = &imd_stage_cache; e = imd_entry_add(imd, CBMEM_ID_STAGEx_RAW + stage_id, size); if (e == NULL) { printk(BIOS_DEBUG, "Error: Can't add %x raw data to imd\n", @@ -122,7 +116,7 @@ void stage_cache_get_raw(int stage_id, void **base, size_t *size) struct imd *imd; const struct imd_entry *e; - imd = imd_get(); + imd = &imd_stage_cache; e = imd_entry_find(imd, CBMEM_ID_STAGEx_RAW + stage_id); if (e == NULL) { printk(BIOS_DEBUG, "Error: Can't find %x raw data to imd\n", @@ -142,7 +136,7 @@ void stage_cache_load_stage(int stage_id, struct prog *stage) void *c; size_t size; - imd = imd_get(); + imd = &imd_stage_cache; e = imd_entry_find(imd, CBMEM_ID_STAGEx_META + stage_id); if (e == NULL) { printk(BIOS_DEBUG, "Error: Can't find %x metadata in imd\n", |