From 1e9a91420733bb4ec15170c7eb0e88e2f566c41b Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 16 Sep 2016 16:23:21 -0500 Subject: arch/x86,lib: make cbmem console work in postcar stage Implement postcar stage cbmem console support. The postcar stage is more like ramstage in that RAM is already up. Therefore, in order to make the cbmem console reinit flow work one needs the cbmem init hook infrastructure in place and the cbmem recovery called. This call is added to x86/postcar.c to achieve that. Additionally, one needs to provide postcar stage cbmem init hook callbacks for the cbmem console library to use. A few other places need to become postcar stage aware so that the code paths are taken. Lastly, since postcar is backed by ram indicate that to the cbmem backing store. BUG=chrome-os-partner:57513 Change-Id: I51db65d8502c456b08f291fd1b59f6ea72059dfd Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/16619 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Paul Menzel --- src/arch/x86/postcar.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/arch/x86') diff --git a/src/arch/x86/postcar.c b/src/arch/x86/postcar.c index 8c3ea43f46..b6ae09a668 100644 --- a/src/arch/x86/postcar.c +++ b/src/arch/x86/postcar.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -22,6 +23,9 @@ void main(void) { console_init(); + /* Recover cbmem so infrastruture using it is functional. */ + cbmem_initialize(); + /* Display the MTRRs */ if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) soc_display_mtrrs(); -- cgit v1.2.3