efi: move various init before call to main().

* With the previous commit, we can now move functions that require
  calling mmu_map_physical_memory to where they should have been
  originally. This also allows the SMP safe mode menu entries to
  be properly generated, now that smp_init is called prior to
  main().

Change-Id: I05ddca5273b11cb4846021664c1ea2cf8ba723b7
This commit is contained in:
Jessica Hamilton 2018-06-11 15:12:52 +12:00
parent b2d0b3699e
commit 86b12d85c7

9
src/system/boot/platform/efi/start.cpp Normal file → Executable file
View File

@ -147,10 +147,6 @@ platform_start_kernel(void)
if (gKernelArgs.kernel_image->elf_class != ELFCLASS64)
panic("32-bit kernels not supported with EFI");
cpu_init();
acpi_init();
hpet_init();
smp_init();
smp_init_other_cpus();
preloaded_elf64_image *image = static_cast<preloaded_elf64_image *>(
@ -292,6 +288,11 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systemTable)
gKernelArgs.arch_args.hpet_phys = 0;
gKernelArgs.arch_args.hpet = NULL;
cpu_init();
acpi_init();
hpet_init();
smp_init();
main(&args);
return EFI_SUCCESS;