x86: make rsdp address accessible via boot params
Subsystems (5)
Juergen Gross
maintainerv3 cover x86: make rsdp address accessible via boot params
In the non-EFI boot path the ACPI RSDP table is currently found via either EBDA or by searching through low memory for the RSDP magic. This requires the RSDP to be located in the first 1MB of physical memory. Xen PVH guests, however, get the RSDP address via the start of day information block.
In order to support an arbitrary RSDP address this patch series adds the physical address of the RSDP to the boot params structure filled by the boot loader. A kernel booted directly in PVH mode can save the RSDP address in the boot params, while a kernel booted in PVH mode via grub can rely on the RSDP address being specified by grub2 (which in turn got the address via the start of day information block from Xen).
Juergen Gross (4):
x86/boot: add acpi rsdp address to setup_header x86/acpi: take rsdp address for boot params if available x86/xen: fix boot loader version reported for pvh guests x86/xen: supply rsdp address in boot params for pvh guests
Documentation/x86/boot.txt | 19 +++++++++++++++++++ arch/x86/boot/header.S | 6 +++++- arch/x86/include/uapi/asm/bootparam.h | 1 + arch/x86/kernel/acpi/boot.c | 7 +++++++ arch/x86/xen/enlighten_pvh.c | 5 ++++- drivers/acpi/osl.c | 10 +++++++++- include/linux/acpi.h | 2 ++ 7 files changed, 47 insertions(+), 3 deletions(-)
Signature · 1 line
2.12.3
Juergen Gross
maintainerPATCH v3 1/4 x86/boot: add acpi rsdp address to setup_header
Xen PVH guests receive the address of the RSDP table from Xen. In order to support booting a Xen PVH guest via Grub2 using the standard x86 boot entry we need a way for Grub2 to pass the RSDP address to the kernel.
For this purpose expand the struct setup_header to hold the physical address of the RSDP address. Being zero means it isn't specified and has to be located the legacy way (searching through low memory or EBDA).
While documenting the new setup_header layout and protocol version 2.14 add the missing documentation of protocol version 2.13.
---
V3: fix commit message and some documentation bits (Ingo Molnar)
--- Documentation/x86/boot.txt | 19 +++++++++++++++++++ arch/x86/boot/header.S | 6 +++++- arch/x86/include/uapi/asm/bootparam.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-)
Documentation/x86/boot.txt +19 -0
@@ -61,6 +61,13 @@ Protocol 2.12: (Kernel 3.8) Added the xloadflags field and extension fields to struct boot_params for loading bzImage and ramdisk above 4G in 64bit. +Protocol 2.13: (Kernel 3.14) Support 32- and 64-bit flags being set in + xloadflags to support booting a 64-bit kernel from 32-bit + EFI + +Protocol 2.14 (Kernel 4.16) Added acpi_rsdp_addr holding the physical + address of the ACPI RSDP table. + **** MEMORY LAYOUT The traditional memory map for the kernel loader, used for Image or
@@ -197,6 +204,7 @@ Offset Proto Name Meaning 0258/8 2.10+ pref_address Preferred loading address 0260/4 2.10+ init_size Linear memory required during initialization 0264/4 2.11+ handover_offset Offset of handover entry point +0268/8 2.14+ acpi_rsdp_addr Physical address of RSDP table (1) For backwards compatibility, if the setup_sects field contains 0, the real value is 4.
@@ -744,6 +752,17 @@ Offset/size: 0x264/4 See EFI HANDOVER PROTOCOL below for more details. +Field name: acpi_rsdp_addr +Type: write +Offset/size: 0x268/8 +Protocol: 2.14+ + + This field can be set by the boot loader to tell the kernel the + physical address of the ACPI RSDP table. + + A value of 0 indicates the kernel should fall back to the standard + methods to locate the RSDP. + **** THE IMAGE CHECKSUM
arch/x86/boot/header.S +5 -1
@@ -300,7 +300,7 @@ _start: # Part 2 of the header, from the old setup.S .ascii "HdrS" # header signature - .word 0x020d # header version number (>= 0x0105) + .word 0x020e # header version number (>= 0x0105) # or else old loadlin-1.5 will fail) .globl realmode_swtch realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
@@ -558,6 +558,10 @@ pref_address: .quad LOAD_PHYSICAL_ADDR # preferred load addr init_size: .long INIT_SIZE # kernel initialization size handover_offset: .long 0 # Filled in by build.c +acpi_rsdp_addr: .quad 0 # 64-bit physical pointer to the + # ACPI RSDP table, added with + # version 2.14 + # End of setup header ##################################################### .section ".entrytext", "ax"
arch/x86/include/uapi/asm/bootparam.h +1 -0
@@ -85,6 +85,7 @@ struct setup_header {__u64 pref_address;__u32 init_size;__u32 handover_offset; +__u64 acpi_rsdp_addr; } __attribute__((packed));struct sys_desc_table {
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
tip-bot for Juergen Gross
merge bot[tip:x86/boot] x86/boot: Add the ACPI RSDP address to struct setup_header::acpi_rdsp_addr
x86/boot: Add the ACPI RSDP address to struct setup_header::acpi_rdsp_addr
Commit-ID: 2f74cbf947f45fa082dda8eac1a1f1299a372f49 Gitweb: https://git.kernel.org/tip/2f74cbf947f45fa082dda8eac1a1f1299a372f49 Author: Juergen Gross <[email protected]> AuthorDate: Fri, 8 Dec 2017 16:11:36 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 11 Dec 2017 15:14:20 +0100
x86/boot: Add the ACPI RSDP address to struct setup_header::acpi_rdsp_addr
Xen PVH guests receive the address of the RSDP table from Xen. In order to support booting a Xen PVH guest via Grub2 using the standard x86 boot entry we need a way for Grub2 to pass the RSDP address to the kernel.
For this purpose expand the struct setup_header to hold the physical address of the RSDP address. Being zero means it isn't specified and has to be located the legacy way (searching through low memory or EBDA).
While documenting the new setup_header layout and protocol version 2.14 add the missing documentation of protocol version 2.13.
--- Documentation/x86/boot.txt | 19 +++++++++++++++++++ arch/x86/boot/header.S | 6 +++++- arch/x86/include/uapi/asm/bootparam.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-)
Documentation/x86/boot.txt +19 -0
@@ -61,6 +61,13 @@ Protocol 2.12: (Kernel 3.8) Added the xloadflags field and extension fields to struct boot_params for loading bzImage and ramdisk above 4G in 64bit. +Protocol 2.13: (Kernel 3.14) Support 32- and 64-bit flags being set in + xloadflags to support booting a 64-bit kernel from 32-bit + EFI + +Protocol 2.14 (Kernel 4.16) Added acpi_rsdp_addr holding the physical + address of the ACPI RSDP table. + **** MEMORY LAYOUT The traditional memory map for the kernel loader, used for Image or
@@ -197,6 +204,7 @@ Offset Proto Name Meaning 0258/8 2.10+ pref_address Preferred loading address 0260/4 2.10+ init_size Linear memory required during initialization 0264/4 2.11+ handover_offset Offset of handover entry point +0268/8 2.14+ acpi_rsdp_addr Physical address of RSDP table (1) For backwards compatibility, if the setup_sects field contains 0, the real value is 4.
@@ -744,6 +752,17 @@ Offset/size: 0x264/4 See EFI HANDOVER PROTOCOL below for more details. +Field name: acpi_rsdp_addr +Type: write +Offset/size: 0x268/8 +Protocol: 2.14+ + + This field can be set by the boot loader to tell the kernel the + physical address of the ACPI RSDP table. + + A value of 0 indicates the kernel should fall back to the standard + methods to locate the RSDP. + **** THE IMAGE CHECKSUM
arch/x86/boot/header.S +5 -1
@@ -300,7 +300,7 @@ _start: # Part 2 of the header, from the old setup.S .ascii "HdrS" # header signature - .word 0x020d # header version number (>= 0x0105) + .word 0x020e # header version number (>= 0x0105) # or else old loadlin-1.5 will fail) .globl realmode_swtch realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
@@ -558,6 +558,10 @@ pref_address: .quad LOAD_PHYSICAL_ADDR # preferred load addr init_size: .long INIT_SIZE # kernel initialization size handover_offset: .long 0 # Filled in by build.c +acpi_rsdp_addr: .quad 0 # 64-bit physical pointer to the + # ACPI RSDP table, added with + # version 2.14 + # End of setup header ##################################################### .section ".entrytext", "ax"
arch/x86/include/uapi/asm/bootparam.h +1 -0
@@ -85,6 +85,7 @@ struct setup_header {__u64 pref_address;__u32 init_size;__u32 handover_offset; +__u64 acpi_rsdp_addr; } __attribute__((packed));struct sys_desc_table {
Juergen Gross
maintainerPATCH v3 2/4 x86/acpi: take rsdp address for boot params if available
In reply to Juergen GrossIn case the rsdp address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader.
---
V3: use a generic retrieval function with a __weak annotated default
function (Ingo Molnar)
--- arch/x86/kernel/acpi/boot.c | 7 +++++++ drivers/acpi/osl.c | 10 +++++++++- include/linux/acpi.h | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-)
arch/x86/kernel/acpi/boot.c +7 -0
@@ -47,6 +47,7 @@#include <asm/mpspec.h> #include <asm/smp.h> #include <asm/i8259.h> +#include <asm/setup.h> #include "sleep.h" /* To include x86_acpi_suspend_lowlevel */ static int __initdata acpi_force =0 ;
@@ -1758,3 +1759,9 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)e820__range_add (addr, size,E820_TYPE_ACPI );e820__update_table_print (); } + +acpi_physical_address acpi_arch_get_root_pointer (void ) +{ +return boot_params.hdr.acpi_rsdp_addr; +} +EXPORT_SYMBOL_GPL (acpi_arch_get_root_pointer);
drivers/acpi/osl.c +9 -1
@@ -178,6 +178,11 @@ void acpi_os_vprintf(const char *fmt, va_list args)#endif } +__weak acpi_physical_address acpi_arch_get_root_pointer (void ) +{ +return 0 ; +} +#ifdef CONFIG_KEXEC static unsigned long acpi_rsdp;static int __init setup_acpi_rsdp (char *arg)
@@ -189,12 +194,15 @@ early_param("acpi_rsdp", setup_acpi_rsdp);acpi_physical_address __init acpi_os_get_root_pointer (void ) { -acpi_physical_address pa =0 ; +acpi_physical_address pa;#ifdef CONFIG_KEXEC if (acpi_rsdp)return acpi_rsdp;#endif + pa =acpi_arch_get_root_pointer (); +if (pa) +return pa;if (efi_enabled (EFI_CONFIG_TABLES )) {if (efi.acpi20 !=EFI_INVALID_TABLE_ADDR )
include/linux/acpi.h +2 -0
@@ -1266,4 +1266,6 @@ static inline int lpit_read_residency_count_address(u64 *address) }#endif +acpi_physical_address acpi_arch_get_root_pointer (void ); +#endif /*_LINUX_ACPI_H*/
Signature · 1 line
2.12.3
tip-bot for Juergen Gross
merge bot[tip:x86/boot] x86/acpi: Take the RSDP address for boot parameters if available
x86/acpi: Take the RSDP address for boot parameters if available
Commit-ID: 0c89cf36424f7c1177de8a5712514d7cc2eb369f Gitweb: https://git.kernel.org/tip/0c89cf36424f7c1177de8a5712514d7cc2eb369f Author: Juergen Gross <[email protected]> AuthorDate: Fri, 8 Dec 2017 16:11:37 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 11 Dec 2017 15:14:20 +0100
x86/acpi: Take the RSDP address for boot parameters if available
In case the rsdp address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader.
--- arch/x86/kernel/acpi/boot.c | 7 +++++++ drivers/acpi/osl.c | 10 +++++++++- include/linux/acpi.h | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-)
arch/x86/kernel/acpi/boot.c +7 -0
@@ -47,6 +47,7 @@#include <asm/mpspec.h> #include <asm/smp.h> #include <asm/i8259.h> +#include <asm/setup.h> #include "sleep.h" /* To include x86_acpi_suspend_lowlevel */ static int __initdata acpi_force =0 ;
@@ -1758,3 +1759,9 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)e820__range_add (addr, size,E820_TYPE_ACPI );e820__update_table_print (); } + +acpi_physical_address acpi_arch_get_root_pointer (void ) +{ +return boot_params.hdr.acpi_rsdp_addr; +} +EXPORT_SYMBOL_GPL (acpi_arch_get_root_pointer);
drivers/acpi/osl.c +9 -1
@@ -178,6 +178,11 @@ void acpi_os_vprintf(const char *fmt, va_list args)#endif } +__weak acpi_physical_address acpi_arch_get_root_pointer (void ) +{ +return 0 ; +} +#ifdef CONFIG_KEXEC static unsigned long acpi_rsdp;static int __init setup_acpi_rsdp (char *arg)
@@ -189,12 +194,15 @@ early_param("acpi_rsdp", setup_acpi_rsdp);acpi_physical_address __init acpi_os_get_root_pointer (void ) { -acpi_physical_address pa =0 ; +acpi_physical_address pa;#ifdef CONFIG_KEXEC if (acpi_rsdp)return acpi_rsdp;#endif + pa =acpi_arch_get_root_pointer (); +if (pa) +return pa;if (efi_enabled (EFI_CONFIG_TABLES )) {if (efi.acpi20 !=EFI_INVALID_TABLE_ADDR )
include/linux/acpi.h +2 -0
@@ -1266,4 +1266,6 @@ static inline int lpit_read_residency_count_address(u64 *address) }#endif +acpi_physical_address acpi_arch_get_root_pointer (void ); +#endif /*_LINUX_ACPI_H*/
Juergen Gross
maintainerPATCH v3 2/4 x86/acpi: take rsdp address for boot params if available
In reply to Juergen GrossIn case the rsdp address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader.
---
V3: use a generic retrieval function with a __weak annotated default
function (Ingo Molnar)
--- arch/x86/kernel/acpi/boot.c | 7 +++++++ drivers/acpi/osl.c | 10 +++++++++- include/linux/acpi.h | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-)
arch/x86/kernel/acpi/boot.c +7 -0
@@ -47,6 +47,7 @@#include <asm/mpspec.h> #include <asm/smp.h> #include <asm/i8259.h> +#include <asm/setup.h> #include "sleep.h" /* To include x86_acpi_suspend_lowlevel */ static int __initdata acpi_force =0 ;
@@ -1758,3 +1759,9 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)e820__range_add (addr, size,E820_TYPE_ACPI );e820__update_table_print (); } + +acpi_physical_address acpi_arch_get_root_pointer (void ) +{ +return boot_params.hdr.acpi_rsdp_addr; +} +EXPORT_SYMBOL_GPL (acpi_arch_get_root_pointer);
drivers/acpi/osl.c +9 -1
@@ -178,6 +178,11 @@ void acpi_os_vprintf(const char *fmt, va_list args)#endif } +__weak acpi_physical_address acpi_arch_get_root_pointer (void ) +{ +return 0 ; +} +#ifdef CONFIG_KEXEC static unsigned long acpi_rsdp;static int __init setup_acpi_rsdp (char *arg)
@@ -189,12 +194,15 @@ early_param("acpi_rsdp", setup_acpi_rsdp);acpi_physical_address __init acpi_os_get_root_pointer (void ) { -acpi_physical_address pa =0 ; +acpi_physical_address pa;#ifdef CONFIG_KEXEC if (acpi_rsdp)return acpi_rsdp;#endif + pa =acpi_arch_get_root_pointer (); +if (pa) +return pa;if (efi_enabled (EFI_CONFIG_TABLES )) {if (efi.acpi20 !=EFI_INVALID_TABLE_ADDR )
include/linux/acpi.h +2 -0
@@ -1266,4 +1266,6 @@ static inline int lpit_read_residency_count_address(u64 *address) }#endif +acpi_physical_address acpi_arch_get_root_pointer (void ); +#endif /*_LINUX_ACPI_H*/
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH v3 3/4 x86/xen: fix boot loader version reported for pvh guests
In reply to Juergen GrossThe boot loader version reported via sysfs is wrong in case of the kernel being booted via the Xen PVH boot entry. it should be 2.12 (0x020c), but it is reported to be 2.18 (0x0212).
As the current way to set the version is error prone use the more readable variant (2 << 8) | 12.
--- arch/x86/xen/enlighten_pvh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/enlighten_pvh.c +1 -1
@@ -69,7 +69,7 @@ static void __init init_pvh_bootparams(void)* Version 2.12 supports Xen entry point but we will use default x86/PC * environment (i.e. hardware_subarch 0). */ - pvh_bootparams.hdr.version =0x212 ; + pvh_bootparams.hdr.version = (2 <<8 ) |12 ; pvh_bootparams.hdr.type_of_loader = (9 <<4 ) |0 ;/* Xen loader */ }
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
tip-bot for Juergen Gross
merge bot[tip:x86/boot] x86/xen: Fix the boot loader version reported for PVH guests
x86/xen: Fix the boot loader version reported for PVH guests
Commit-ID: 88750a6c33f813b815516990f01fb5ee488c477e Gitweb: https://git.kernel.org/tip/88750a6c33f813b815516990f01fb5ee488c477e Author: Juergen Gross <[email protected]> AuthorDate: Fri, 8 Dec 2017 16:11:38 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 11 Dec 2017 15:14:20 +0100
x86/xen: Fix the boot loader version reported for PVH guests
The boot loader version reported via sysfs is wrong in case of the kernel being booted via the Xen PVH boot entry. it should be 2.12 (0x020c), but it is reported to be 2.18 (0x0212).
As the current way to set the version is error prone use the more readable variant (2 << 8) | 12.
--- arch/x86/xen/enlighten_pvh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/enlighten_pvh.c +1 -1
@@ -69,7 +69,7 @@ static void __init init_pvh_bootparams(void)* Version 2.12 supports Xen entry point but we will use default x86/PC * environment (i.e. hardware_subarch 0). */ - pvh_bootparams.hdr.version =0x212 ; + pvh_bootparams.hdr.version = (2 <<8 ) |12 ; pvh_bootparams.hdr.type_of_loader = (9 <<4 ) |0 ;/* Xen loader */ }
Juergen Gross
maintainerPATCH v3 4/4 x86/xen: supply rsdp address in boot params for pvh guests
In reply to Juergen GrossWhen booted via the special PVH entry save the RSDP address set in the boot information block in struct boot_params. This will enable Xen to locate the RSDP at an arbitrary address.
Set the boot loader version to 2.14 (0x020e) replacing the wrong 0x0212 which should have been 0x020c.
---
V2: set bootloader version to 2.14 (Roger Pau Monné)
--- arch/x86/xen/enlighten_pvh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pvh.c +4 -1
@@ -68,9 +68,12 @@ static void __init init_pvh_bootparams(void)* * Version 2.12 supports Xen entry point but we will use default x86/PC * environment (i.e. hardware_subarch 0). +* The RSDP address is available from version 2.14 on. */ - pvh_bootparams.hdr.version = (2 <<8 ) |12 ; + pvh_bootparams.hdr.version = (2 <<8 ) |14 ; pvh_bootparams.hdr.type_of_loader = (9 <<4 ) |0 ;/* Xen loader */ + + pvh_bootparams.hdr.acpi_rsdp_addr = pvh_start_info.rsdp_paddr; }/*
Signature · 1 line
2.12.3
Re: [Xen-devel] [PATCH v3 4/4] x86/xen: supply rsdp address in boot params for pvh guests
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 08.12.17 at 16:11, <[email protected]> wrote:
Set the boot loader version to 2.14 (
0x020e) replacing the wrong0x0212which should have been0x020c.
This part of the description has become partly stale now with the new patch 3.
Jan
Re: [PATCH v3 4/4] x86/xen: supply rsdp address in boot params for pvh guests
In reply to Juergen GrossQuoted 3 lines
Quoted 1 line
Quoted 1 line · On 08.12.17 at 16:11, <[email protected]> wrote:
Set the boot loader version to 2.14 (
0x020e) replacing the wrong0x0212which should have been0x020c.
This part of the description has become partly stale now with the new patch 3.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Juergen Gross
maintainerRe: [Xen-devel] [PATCH v3 4/4] x86/xen: supply rsdp address in boot params for pvh guests
Quoted 6 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 08.12.17 at 16:11, <[email protected]> wrote:
Set the boot loader version to 2.14 (
0x020e) replacing the wrong0x0212which should have been0x020c.This part of the description has become partly stale now with the new patch 3.
Indeed. I'll wait for other comments before sending out a new version.
Thanks,
Juergen
Re: [Xen-devel] [PATCH v3 4/4] x86/xen: supply rsdp address in boot params for pvh guests
Quoted 9 lines · Juergen Gross
Quoted 6 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 08.12.17 at 16:11, <[email protected]> wrote:
Set the boot loader version to 2.14 (
0x020e) replacing the wrong0x0212which should have been0x020c.This part of the description has become partly stale now with the new patch 3.
Indeed. I'll wait for other comments before sending out a new version.
Looks good to me now, and I've applied the series to tip:x86/boot. I have removed this stale sentence from patch #4.
Thanks,
Ingo
Re: [PATCH v3 4/4] x86/xen: supply rsdp address in boot params for pvh guests
In reply to Juergen GrossQuoted 9 lines · Juergen Gross
Quoted 6 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 08.12.17 at 16:11, <[email protected]> wrote:
Set the boot loader version to 2.14 (
0x020e) replacing the wrong0x0212which should have been0x020c.This part of the description has become partly stale now with the new patch 3.
Indeed. I'll wait for other comments before sending out a new version.
Looks good to me now, and I've applied the series to tip:x86/boot. I have removed this stale sentence from patch #4.
Thanks,
Ingo
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerRe: [PATCH v3 4/4] x86/xen: supply rsdp address in boot params for pvh guests
In reply to a message not in the archiveQuoted 6 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 08.12.17 at 16:11, <[email protected]> wrote:
Set the boot loader version to 2.14 (
0x020e) replacing the wrong0x0212which should have been0x020c.This part of the description has become partly stale now with the new patch 3.
Indeed. I'll wait for other comments before sending out a new version.
Thanks,
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
tip-bot for Juergen Gross
merge bot[tip:x86/boot] x86/xen: Supply RSDP address in boot params for PVH guests
In reply to Juergen Grossx86/xen: Supply RSDP address in boot params for PVH guests
Commit-ID: 930ba49b2ce7b09a5eddc21385fd944ba6b4e829 Gitweb: https://git.kernel.org/tip/930ba49b2ce7b09a5eddc21385fd944ba6b4e829 Author: Juergen Gross <[email protected]> AuthorDate: Fri, 8 Dec 2017 16:11:39 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 11 Dec 2017 15:14:21 +0100
x86/xen: Supply RSDP address in boot params for PVH guests
When booted via the special PVH entry save the RSDP address set in the boot information block in struct boot_params. This will enable Xen to locate the RSDP at an arbitrary address.
--- arch/x86/xen/enlighten_pvh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pvh.c +4 -1
@@ -68,9 +68,12 @@ static void __init init_pvh_bootparams(void)* * Version 2.12 supports Xen entry point but we will use default x86/PC * environment (i.e. hardware_subarch 0). +* The RSDP address is available from version 2.14 on. */ - pvh_bootparams.hdr.version = (2 <<8 ) |12 ; + pvh_bootparams.hdr.version = (2 <<8 ) |14 ; pvh_bootparams.hdr.type_of_loader = (9 <<4 ) |0 ;/* Xen loader */ + + pvh_bootparams.hdr.acpi_rsdp_addr = pvh_start_info.rsdp_paddr; }/*
Juergen Gross
maintainerPATCH v3 4/4 x86/xen: supply rsdp address in boot params for pvh guests
In reply to Juergen GrossWhen booted via the special PVH entry save the RSDP address set in the boot information block in struct boot_params. This will enable Xen to locate the RSDP at an arbitrary address.
Set the boot loader version to 2.14 (0x020e) replacing the wrong 0x0212 which should have been 0x020c.
---
V2: set bootloader version to 2.14 (Roger Pau Monné)
--- arch/x86/xen/enlighten_pvh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pvh.c +4 -1
@@ -68,9 +68,12 @@ static void __init init_pvh_bootparams(void)* * Version 2.12 supports Xen entry point but we will use default x86/PC * environment (i.e. hardware_subarch 0). +* The RSDP address is available from version 2.14 on. */ - pvh_bootparams.hdr.version = (2 <<8 ) |12 ; + pvh_bootparams.hdr.version = (2 <<8 ) |14 ; pvh_bootparams.hdr.type_of_loader = (9 <<4 ) |0 ;/* Xen loader */ + + pvh_bootparams.hdr.acpi_rsdp_addr = pvh_start_info.rsdp_paddr; }/*
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel