lib: hardwaremain: Call exception_init() as soon as possible

Call exception_init() before calling cbmem_initialize() because
ARMv8 on QEMU uses an exception handler to detect a ram size.

Signed-off-by: Asami Doi <d0iasm.pub@gmail.com>
Change-Id: If010234a6576414e7e174c075b599a4aa4c19eab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35022
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Asami Doi 2019-08-22 11:15:12 +09:00 committed by Patrick Georgi
parent eeb8e74944
commit 38a1286111
1 changed files with 2 additions and 3 deletions

View File

@ -451,9 +451,10 @@ void main(void)
/* console_init() MUST PRECEDE ALL printk()! Additionally, ensure
* it is the very first thing done in ramstage.*/
console_init();
post_code(POST_CONSOLE_READY);
exception_init();
/*
* CBMEM needs to be recovered because timestamps, ACPI, etc rely on
* the cbmem infrastructure being around. Explicitly recover it.
@ -470,8 +471,6 @@ void main(void)
#if CONFIG(HAVE_ACPI_RESUME)
acpi_is_wakeup();
#endif
exception_init();
threads_initialize();
/* Schedule the static boot state entries. */