diff options
-rw-r--r-- | arch/x86/include/asm/bootparam.h | 1 | ||||
-rw-r--r-- | arch/x86/lib/acpi_table.c | 5 | ||||
-rw-r--r-- | arch/x86/lib/acpi_table.h | 10 | ||||
-rw-r--r-- | arch/x86/lib/zimage.c | 6 |
4 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index 48b138c6b0..90768a99ce 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h @@ -66,6 +66,7 @@ struct setup_header { __u64 pref_address; __u32 init_size; __u32 handover_offset; + __u64 acpi_rsdp_addr; } __attribute__((packed)); struct sys_desc_table { diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 7b33cd371e..d3e5d2e104 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -20,6 +20,7 @@ #include <asm/mpspec.h> #include <asm/tables.h> #include <asm/arch/global_nvs.h> +#include "acpi_table.h" /* * IASL compiles the dsdt entries and writes the hex values @@ -27,6 +28,9 @@ */ extern const unsigned char AmlCode[]; +/* ACPI RSDP address to be used in boot parameters */ +unsigned long acpi_rsdp_addr; + static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt, struct acpi_xsdt *xsdt) { @@ -460,6 +464,7 @@ ulong write_acpi_tables(ulong start) debug("current = %x\n", current); + acpi_rsdp_addr = (unsigned long)rsdp; debug("ACPI: done\n"); /* Don't touch ACPI hardware on HW reduced platforms */ diff --git a/arch/x86/lib/acpi_table.h b/arch/x86/lib/acpi_table.h new file mode 100644 index 0000000000..cece5d1420 --- /dev/null +++ b/arch/x86/lib/acpi_table.h @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: GPL-2.0 + */ + +#ifndef _X86_LIB_ACPI_TABLES_H +#define _X86_LIB_ACPI_TABLES_H + +extern unsigned long acpi_rsdp_addr; + +#endif diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index d224db4e07..eae26635b1 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -24,6 +24,7 @@ #include <asm/arch/timestamp.h> #endif #include <linux/compiler.h> +#include "acpi_table.h" DECLARE_GLOBAL_DATA_PTR; @@ -255,6 +256,11 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, hdr->hardware_subarch = X86_SUBARCH_INTEL_MID; #endif +#ifdef CONFIG_GENERATE_ACPI_TABLE + if (bootproto >= 0x020e) + hdr->acpi_rsdp_addr = acpi_rsdp_addr; +#endif + setup_video(&setup_base->screen_info); return 0; |