• Dave Young's avatar
    efi/x86: Move EFI BGRT init code to early init code · e45705fe
    Dave Young authored
    Before invoking the arch specific handler, efi_mem_reserve() reserves
    the given memory region through memblock.
    
    efi_bgrt_init() will call efi_mem_reserve() after mm_init(), at which
    time memblock is dead and should not be used anymore.
    
    The EFI BGRT code depends on ACPI initialization to get the BGRT ACPI
    table, so move parsing of the BGRT table to ACPI early boot code to
    ensure that efi_mem_reserve() in EFI BGRT code still use memblock safely.
    Signed-off-by: default avatarDave Young <dyoung@redhat.com>
    Cc: Matt Fleming <matt@codeblueprint.co.uk>
    Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
    Cc: Len Brown <lenb@kernel.org>
    Cc: linux-acpi@vger.kernel.org
    Tested-by: default avatarBhupesh Sharma <bhsharma@redhat.com>
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    e45705fe
main.c 25.3 KB