arch/x86: Initialize early serial a tiny bit later

In case of EFI, efi_init must be called before initializing early
serial: if that one as X86_SOC_EARLY_SERIAL_PCIDEV defined, its pcie
access will try to initialise pcie mmio access which one will try to
find an ACPI table. At this point, calling ACPI API prior to initialize
EFI will make RSDP looked up already... and since it cannot find it
without EFI being initialized first, ACPI is then broken.

Just moving early serial to initialize after multiboot/efi being setup.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2022-03-16 10:14:44 +01:00 committed by Anas Nashif
commit 1d3dbd49e1

View file

@ -36,10 +36,6 @@ FUNC_NORETURN void z_x86_prep_c(void *arg)
z_loapic_enable(0); z_loapic_enable(0);
#endif #endif
#ifdef CONFIG_X86_VERY_EARLY_CONSOLE
z_x86_early_serial_init();
#endif
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
x86_64_irq_init(); x86_64_irq_init();
#endif #endif
@ -54,6 +50,10 @@ if (IS_ENABLED(CONFIG_MULTIBOOT_INFO) &&
ARG_UNUSED(cpu_arg); ARG_UNUSED(cpu_arg);
} }
#ifdef CONFIG_X86_VERY_EARLY_CONSOLE
z_x86_early_serial_init();
#endif
#if CONFIG_X86_STACK_PROTECTION #if CONFIG_X86_STACK_PROTECTION
for (int i = 0; i < CONFIG_MP_NUM_CPUS; i++) { for (int i = 0; i < CONFIG_MP_NUM_CPUS; i++) {
z_x86_set_stack_guard(z_interrupt_stacks[i]); z_x86_set_stack_guard(z_interrupt_stacks[i]);