mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 03:29:47 +07:00
7b0a911478
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. Tested-by: Bhupesh Sharma <bhsharma@redhat.com> Signed-off-by: Dave Young <dyoung@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Len Brown <lenb@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-acpi@vger.kernel.org Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-9-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
21 lines
455 B
C
21 lines
455 B
C
#ifndef _LINUX_EFI_BGRT_H
|
|
#define _LINUX_EFI_BGRT_H
|
|
|
|
#include <linux/acpi.h>
|
|
|
|
#ifdef CONFIG_ACPI_BGRT
|
|
|
|
void efi_bgrt_init(struct acpi_table_header *table);
|
|
|
|
/* The BGRT data itself; only valid if bgrt_image != NULL. */
|
|
extern size_t bgrt_image_size;
|
|
extern struct acpi_table_bgrt bgrt_tab;
|
|
|
|
#else /* !CONFIG_ACPI_BGRT */
|
|
|
|
static inline void efi_bgrt_init(struct acpi_table_header *table) {}
|
|
|
|
#endif /* !CONFIG_ACPI_BGRT */
|
|
|
|
#endif /* _LINUX_EFI_BGRT_H */
|