ach/x86/postcar.c: Avoid double CBMEM initialization

On FSP1.1 platform cbmem_initiailze() is called in
chipset_teardown_car_main(). This causes double
call op cbmem_initialize().

Add call to cbmem_online() to avoid double CBMEM init.

BUG  = N/A
TEST = Build and boot on Facebook FBG1701

Change-Id: I449ddfc94f1099d7c0e9005e6a5cf509e1433bb1
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49646
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
This commit is contained in:
Frans Hendriks 2021-01-18 14:42:00 +01:00 committed by Patrick Georgi
parent 162d704b57
commit 6f468a58c1
1 changed files with 5 additions and 1 deletions

View File

@ -23,8 +23,12 @@ void main(void)
/*
* CBMEM needs to be recovered because timestamps rely on
* the cbmem infrastructure being around. Explicitly recover it.
*
* On some platforms CBMEM needs to be initialized earlier.
* Use cbmem_online() to avoid init CBMEM twice.
*/
cbmem_initialize();
if (!cbmem_online())
cbmem_initialize();
timestamp_add_now(TS_START_POSTCAR);