From 6fdb223859959c5fe9392c0e5a34d6090cdeebeb Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Tue, 5 Mar 2019 16:48:25 +0200 Subject: arch/x86: Refactor CAR_GLOBAL quirk for FSP1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These platforms return to romstage from FSP only after already having torn CAR down. A copy of the entire CAR region is available and discoverable via HOB. Previously, CBMEM console detected on-the-fly that CAR migration had happened and relocated cbmem_console_p accoringlin with car_sync_var(). However, if the CAR_GLOBAL pointing to another object inside CAR is a relative offset instead, we have a more generic solution that can be used with timestamps code as well. Change-Id: Ica877b47e68d56189e9d998b5630019d4328a419 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/35140 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/lib/cbmem_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c index df2d1ffa96..18c3b71b4f 100644 --- a/src/lib/cbmem_console.c +++ b/src/lib/cbmem_console.c @@ -73,12 +73,12 @@ static u8 static_console[STATIC_CONSOLE_SIZE]; static struct cbmem_console *current_console(void) { - return car_sync_var(cbmem_console_p); + return car_get_ptr(cbmem_console_p); } static void current_console_set(struct cbmem_console *new_console_p) { - car_set_var(cbmem_console_p, new_console_p); + car_set_ptr(cbmem_console_p, new_console_p); } static int buffer_valid(struct cbmem_console *cbm_cons_p, u32 total_space) -- cgit v1.2.3