diff mbox series

[U-Boot,v1] x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

Message ID 20190913154200.61117-1-andriy.shevchenko@linux.intel.com
State Accepted
Commit d905aa8a4277e200e11fdf6d73a7c76d0e6f34a4
Delegated to: Bin Meng
Headers show
Series [U-Boot,v1] x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters | expand

Commit Message

Andy Shevchenko Sept. 13, 2019, 3:42 p.m. UTC
This is reincarnation of the U-Boot

commit 3469bf4274540d1491d58e878a9edc0bdcba17ac
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Wed Jan 10 19:40:15 2018 +0200

    x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

after upstream got eventually the Linux kernel

commit e6e094e053af75cbc164e950814d3d084fb1e698
Author: Juergen Gross <jgross@suse.com>
Date:   Tue Nov 20 08:25:29 2018 +0100

    x86/acpi, x86/boot: Take RSDP address from boot params if available

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/include/asm/bootparam.h | 3 ++-
 arch/x86/lib/zimage.c            | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Bin Meng Oct. 1, 2019, 10:18 a.m. UTC | #1
On Fri, Sep 13, 2019 at 11:42 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> This is reincarnation of the U-Boot
>
> commit 3469bf4274540d1491d58e878a9edc0bdcba17ac
> Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Date:   Wed Jan 10 19:40:15 2018 +0200
>
>     x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters
>
> after upstream got eventually the Linux kernel
>
> commit e6e094e053af75cbc164e950814d3d084fb1e698
> Author: Juergen Gross <jgross@suse.com>
> Date:   Tue Nov 20 08:25:29 2018 +0100
>
>     x86/acpi, x86/boot: Take RSDP address from boot params if available
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  arch/x86/include/asm/bootparam.h | 3 ++-
>  arch/x86/lib/zimage.c            | 4 ++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng Oct. 1, 2019, 10:21 a.m. UTC | #2
On Tue, Oct 1, 2019 at 6:18 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Fri, Sep 13, 2019 at 11:42 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > This is reincarnation of the U-Boot
> >
> > commit 3469bf4274540d1491d58e878a9edc0bdcba17ac
> > Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Date:   Wed Jan 10 19:40:15 2018 +0200
> >
> >     x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters
> >
> > after upstream got eventually the Linux kernel
> >
> > commit e6e094e053af75cbc164e950814d3d084fb1e698
> > Author: Juergen Gross <jgross@suse.com>
> > Date:   Tue Nov 20 08:25:29 2018 +0100
> >
> >     x86/acpi, x86/boot: Take RSDP address from boot params if available
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  arch/x86/include/asm/bootparam.h | 3 ++-
> >  arch/x86/lib/zimage.c            | 4 ++++
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h
index dfbd4b4bba..d961dddc9e 100644
--- a/arch/x86/include/asm/bootparam.h
+++ b/arch/x86/include/asm/bootparam.h
@@ -94,7 +94,8 @@  struct boot_params {
 	__u8  _pad2[4];					/* 0x054 */
 	__u64  tboot_addr;				/* 0x058 */
 	struct ist_info ist_info;			/* 0x060 */
-	__u8  _pad3[16];				/* 0x070 */
+	__u64 acpi_rsdp_addr;				/* 0x070 */
+	__u8  _pad3[8];					/* 0x078 */
 	__u8  hd0_info[16];	/* obsolete! */		/* 0x080 */
 	__u8  hd1_info[16];	/* obsolete! */		/* 0x090 */
 	struct sys_desc_table sys_desc_table;		/* 0x0a0 */
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 6a6258a505..d07041fd4c 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -288,6 +288,10 @@  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
+	setup_base->acpi_rsdp_addr = acpi_get_rsdp_addr();
+#endif
+
 	setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0));
 	setup_video(&setup_base->screen_info);