x86: make rsdp address accessible via boot params
Subsystems (4)
Juergen Gross
maintainercover 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 (3):
x86/boot: add acpi rsdp address to setup_header x86/acpi: take rsdp address for boot params if available 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/xen/enlighten_pvh.c | 2 ++ drivers/acpi/osl.c | 8 ++++++++ 5 files changed, 35 insertions(+), 1 deletion(-)
Signature · 1 line
2.12.3
Juergen Gross
maintainerPATCH 1/3 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 fro 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).
--- 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 (search in EBDA/low memory). + **** 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 + # 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 · 1 line
2.12.3
Re: [Xen-devel] [PATCH 1/3] x86/boot: add acpi rsdp address to setup_header
Quoted 11 lines · Juergen Gross
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 fro grub2 to pass the RSDP address to the kernel.
For this purpose expand the struct
setup_headerto 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).Signed-off-by Juergen Gross <[email protected]>
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 1/3 x86/boot: add acpi rsdp address to setup_header
In reply to Juergen GrossXen 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 fro 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).
--- 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 (search in EBDA/low memory). + **** 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 + # 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
Juergen Gross
maintainerPATCH 2/3 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.
--- drivers/acpi/osl.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/osl.c +8 -0
@@ -45,6 +45,10 @@#include <linux/uaccess.h> #include <linux/io-64-nonatomic-lo-hi.h> +#ifdef CONFIG_X86 +#include <asm/setup.h> +#endif +#include "internal.h" #define _COMPONENT ACPI_OS_SERVICES
@@ -195,6 +199,10 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)if (acpi_rsdp)return acpi_rsdp;#endif +#ifdef CONFIG_X86 +if (boot_params.hdr.acpi_rsdp_addr) +return boot_params.hdr.acpi_rsdp_addr; +#endif if (efi_enabled (EFI_CONFIG_TABLES )) {if (efi.acpi20 !=EFI_INVALID_TABLE_ADDR )
Signature · 1 line
2.12.3
Re: [Xen-devel] [PATCH 2/3] x86/acpi: take rsdp address for boot params if available
Quoted 25 lines · Juergen Gross
In case the rsdp address in struct
boot_paramsis specified don't try to find the table by searching, but take the address directly as set by the boot loader.Signed-off-by Juergen Gross <[email protected]>--- drivers/acpi/osl.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/acpi/osl.c +4
-0@@ -45,6 +45,10 @@#include <linux/uaccess.h> #include <linux/io-64-nonatomic-lo-hi.h> +#ifdef CONFIG_X86 +#include <asm/setup.h> +#endif +#include "internal.h" #define _COMPONENT ACPI_OS_SERVICES
drivers/acpi/osl.c acpi_physical_address __init acpi_os_get_root_pointer(void) · line 205
Quoted 7 lines
drivers/acpi/osl.c +4
-0@@ -195,6 +199,10 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)if (acpi_rsdp)return acpi_rsdp;#endif +#ifdef CONFIG_X86 +if (boot_params.hdr.acpi_rsdp_addr) +return boot_params.hdr.acpi_rsdp_addr; +#endif
I'm struggling to figure out how was PVH getting the RSDP previously, because that should be removed now that it's in the zero-page.
Roger.
Juergen Gross
maintainerRe: [Xen-devel] [PATCH 2/3] x86/acpi: take rsdp address for boot params if available
Quoted 24 lines · Roger Pau Monné
Quoted 23 lines · Juergen Gross
In case the rsdp address in struct
boot_paramsis specified don't try to find the table by searching, but take the address directly as set by the boot loader.Signed-off-by Juergen Gross <[email protected]>--- drivers/acpi/osl.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/acpi/osl.c +4
-0@@ -45,6 +45,10 @@#include <linux/uaccess.h> #include <linux/io-64-nonatomic-lo-hi.h> +#ifdef CONFIG_X86 +#include <asm/setup.h> +#endif +#include "internal.h"
Quoted 12 lines
drivers/acpi/osl.c acpi_physical_address __init acpi_os_get_root_pointer(void) · line 205
Quoted 9 lines
drivers/acpi/osl.c +4
-0#define _COMPONENT ACPI_OS_SERVICES@@ -195,6 +199,10 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)if (acpi_rsdp)return acpi_rsdp;#endif +#ifdef CONFIG_X86 +if (boot_params.hdr.acpi_rsdp_addr) +return boot_params.hdr.acpi_rsdp_addr; +#endif I'm struggling to figure out how was PVH getting the RSDP previously, because that should be removed now that it's in the zero-page.
I don't think it should be removed, because this was the legacy case (searching through memory). It was pure luck that Xen put it at the right location.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 2/3] x86/acpi: take rsdp address for boot params if available
Quoted 38 lines · Juergen Gross
Quoted 24 lines · Roger Pau Monné
Quoted 23 lines · Juergen Gross
In case the rsdp address in struct
boot_paramsis specified don't try to find the table by searching, but take the address directly as set by the boot loader.Signed-off-by Juergen Gross <[email protected]>--- drivers/acpi/osl.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/acpi/osl.c +4
-0@@ -45,6 +45,10 @@#include <linux/uaccess.h> #include <linux/io-64-nonatomic-lo-hi.h> +#ifdef CONFIG_X86 +#include <asm/setup.h> +#endif +#include "internal.h" Quoted 12 lines
drivers/acpi/osl.c acpi_physical_address __init acpi_os_get_root_pointer(void) · line 205
Quoted 9 lines
drivers/acpi/osl.c +4
-0#define _COMPONENT ACPI_OS_SERVICES@@ -195,6 +199,10 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)if (acpi_rsdp)return acpi_rsdp;#endif +#ifdef CONFIG_X86 +if (boot_params.hdr.acpi_rsdp_addr) +return boot_params.hdr.acpi_rsdp_addr; +#endif I'm struggling to figure out how was PVH getting the RSDP previously, because that should be removed now that it's in the zero-page.
Quoted 3 lines
I don't think it should be removed, because this was the legacy case (searching through memory). It was pure luck that Xen put it at the right location.
Oh, right. This is working out of pure luck then.
Thanks, Roger.
Re: [PATCH 2/3] x86/acpi: take rsdp address for boot params if available
In reply to Juergen GrossQuoted 38 lines · Juergen Gross
Quoted 24 lines · Roger Pau Monné
Quoted 23 lines · Juergen Gross
In case the rsdp address in struct
boot_paramsis specified don't try to find the table by searching, but take the address directly as set by the boot loader.Signed-off-by Juergen Gross <[email protected]>--- drivers/acpi/osl.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/acpi/osl.c +4
-0@@ -45,6 +45,10 @@#include <linux/uaccess.h> #include <linux/io-64-nonatomic-lo-hi.h> +#ifdef CONFIG_X86 +#include <asm/setup.h> +#endif +#include "internal.h" Quoted 12 lines
drivers/acpi/osl.c acpi_physical_address __init acpi_os_get_root_pointer(void) · line 205
Quoted 9 lines
drivers/acpi/osl.c +4
-0#define _COMPONENT ACPI_OS_SERVICES@@ -195,6 +199,10 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)if (acpi_rsdp)return acpi_rsdp;#endif +#ifdef CONFIG_X86 +if (boot_params.hdr.acpi_rsdp_addr) +return boot_params.hdr.acpi_rsdp_addr; +#endif I'm struggling to figure out how was PVH getting the RSDP previously, because that should be removed now that it's in the zero-page.
Quoted 3 lines
I don't think it should be removed, because this was the legacy case (searching through memory). It was pure luck that Xen put it at the right location.
Oh, right. This is working out of pure luck then.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 2/3] x86/acpi: take rsdp address for boot params if available
In reply to Juergen GrossQuoted 25 lines · Juergen Gross
In case the rsdp address in struct
boot_paramsis specified don't try to find the table by searching, but take the address directly as set by the boot loader.Signed-off-by Juergen Gross <[email protected]>--- drivers/acpi/osl.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/acpi/osl.c +4
-0@@ -45,6 +45,10 @@#include <linux/uaccess.h> #include <linux/io-64-nonatomic-lo-hi.h> +#ifdef CONFIG_X86 +#include <asm/setup.h> +#endif +#include "internal.h" #define _COMPONENT ACPI_OS_SERVICES
drivers/acpi/osl.c acpi_physical_address __init acpi_os_get_root_pointer(void) · line 205
Quoted 7 lines
drivers/acpi/osl.c +4
-0@@ -195,6 +199,10 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)if (acpi_rsdp)return acpi_rsdp;#endif +#ifdef CONFIG_X86 +if (boot_params.hdr.acpi_rsdp_addr) +return boot_params.hdr.acpi_rsdp_addr; +#endif
I'm struggling to figure out how was PVH getting the RSDP previously, because that should be removed now that it's in the zero-page.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 2/3 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.
--- drivers/acpi/osl.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/osl.c +8 -0
@@ -45,6 +45,10 @@#include <linux/uaccess.h> #include <linux/io-64-nonatomic-lo-hi.h> +#ifdef CONFIG_X86 +#include <asm/setup.h> +#endif +#include "internal.h" #define _COMPONENT ACPI_OS_SERVICES
@@ -195,6 +199,10 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)if (acpi_rsdp)return acpi_rsdp;#endif +#ifdef CONFIG_X86 +if (boot_params.hdr.acpi_rsdp_addr) +return boot_params.hdr.acpi_rsdp_addr; +#endif if (efi_enabled (EFI_CONFIG_TABLES )) {if (efi.acpi20 !=EFI_INVALID_TABLE_ADDR )
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 3/3 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.
--- arch/x86/xen/enlighten_pvh.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/xen/enlighten_pvh.c +2 -0
@@ -71,6 +71,8 @@ static void __init init_pvh_bootparams(void)*/ pvh_bootparams.hdr.version =0x212 ; 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 3/3] x86/xen: supply rsdp address in boot params for pvh guests
Quoted 14 lines · Juergen Gross
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.Signed-off-by Juergen Gross <[email protected]>--- arch/x86/xen/enlighten_pvh.c | 2 ++ 1 file changed, 2 insertions(+)arch/x86/xen/enlighten_pvh.c +0
-0
arch/x86/xen/enlighten_pvh.c static void __init init_pvh_bootparams(void) · line 72
Quoted 2 lines
arch/x86/xen/enlighten_pvh.c +0
-0@@ -71,6 +71,8 @@ static void __init init_pvh_bootparams(void)*/ pvh_bootparams.hdr.version =0x212 ;
Shouldn't this be 0x20e, like it's set in patch 1?
Roger.
Juergen Gross
maintainerRe: [Xen-devel] [PATCH 3/3] x86/xen: supply rsdp address in boot params for pvh guests
Quoted 10 lines · Roger Pau Monné
Quoted 9 lines · Juergen Gross
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.Signed-off-by Juergen Gross <[email protected]>--- arch/x86/xen/enlighten_pvh.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 9 lines
arch/x86/xen/enlighten_pvh.c static void __init init_pvh_bootparams(void) · line 72
Quoted 7 lines
arch/x86/xen/enlighten_pvh.c +0
-0@@ -71,6 +71,8 @@ static void __init init_pvh_bootparams(void)*/ pvh_bootparams.hdr.version =0x212 ;Shouldn't this be
0x20e, like it's set in patch 1?
I think it was meant to be 0x20c. But setting it to 0x20e in this patch seems to be a good idea.
In the end it doesn't really matter, as hdr.version is meant to be read by the boot loader which is already history when this code is being executed.
Juergen
Juergen Gross
maintainerRe: [PATCH 3/3] x86/xen: supply rsdp address in boot params for pvh guests
In reply to Roger Pau MonnéQuoted 10 lines · Roger Pau Monné
Quoted 9 lines · Juergen Gross
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.Signed-off-by Juergen Gross <[email protected]>--- arch/x86/xen/enlighten_pvh.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 9 lines
arch/x86/xen/enlighten_pvh.c static void __init init_pvh_bootparams(void) · line 72
Quoted 7 lines
arch/x86/xen/enlighten_pvh.c +0
-0@@ -71,6 +71,8 @@ static void __init init_pvh_bootparams(void)*/ pvh_bootparams.hdr.version =0x212 ;Shouldn't this be
0x20e, like it's set in patch 1?
I think it was meant to be 0x20c. But setting it to 0x20e in this patch seems to be a good idea.
In the end it doesn't really matter, as hdr.version is meant to be read by the boot loader which is already history when this code is being executed.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH 3/3] x86/xen: supply rsdp address in boot params for pvh guests
In reply to Juergen GrossQuoted 14 lines · Juergen Gross
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.Signed-off-by Juergen Gross <[email protected]>--- arch/x86/xen/enlighten_pvh.c | 2 ++ 1 file changed, 2 insertions(+)arch/x86/xen/enlighten_pvh.c +0
-0
arch/x86/xen/enlighten_pvh.c static void __init init_pvh_bootparams(void) · line 72
Quoted 2 lines
arch/x86/xen/enlighten_pvh.c +0
-0@@ -71,6 +71,8 @@ static void __init init_pvh_bootparams(void)*/ pvh_bootparams.hdr.version =0x212 ;
Shouldn't this be 0x20e, like it's set in patch 1?
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Juergen Gross
maintainerPATCH 3/3 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.
--- arch/x86/xen/enlighten_pvh.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/xen/enlighten_pvh.c +2 -0
@@ -71,6 +71,8 @@ static void __init init_pvh_bootparams(void)*/ pvh_bootparams.hdr.version =0x212 ; 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
Rafael J. Wysocki
maintainerQuoted 18 lines · Juergen Gross
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 (3):
x86/boot: add acpi rsdp address tosetup_headerx86/acpi: take rsdp address for boot params if available x86/xen: supply rsdp address in boot params for pvh guests
Quoted 8 lines
Documentation/x86/boot.txt | 19 +++++++++++++++++++ arch/x86/boot/header.S | 6 +++++- arch/x86/include/uapi/asm/bootparam.h | 1 + arch/x86/xen/enlighten_pvh.c | 2 ++ drivers/acpi/osl.c | 8 ++++++++ 5 files changed, 35 insertions(+), 1 deletion(-)--
Is this going to work with all existing setups?
Thanks,
Rafael
Juergen Gross
maintainerQuoted 26 lines · Rafael J. Wysocki
Quoted 25 lines · Juergen Gross
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 (3):
x86/boot: add acpi rsdp address tosetup_headerx86/acpi: take rsdp address for boot params if available x86/xen: supply rsdp address in boot params for pvh guestsDocumentation/x86/boot.txt | 19 +++++++++++++++++++ arch/x86/boot/header.S | 6 +++++- arch/x86/include/uapi/asm/bootparam.h | 1 + arch/x86/xen/enlighten_pvh.c | 2 ++ drivers/acpi/osl.c | 8 ++++++++ 5 files changed, 35 insertions(+), 1 deletion(-)
Quoted 3 lines
Quoted 1 line
--
Is this going to work with all existing setups?
I think so, yes.
In EFI environment this doesn't matter, direct PVH boot is working, grub2 support is optional (without grub2 support things are working as today).
I'm already writing grub2 patches to support booting in PVH environment. Those were the reason I need this patch set, as otherwise Xen would have to put the RSDP into low memory which is limiting the guest's ability to use large page mappings for all its memory.
Additionally something like this is needed for PVH dom0 support anyway.
Juergen
Juergen Gross
maintainerQuoted 26 lines · Rafael J. Wysocki
Quoted 25 lines · Juergen Gross
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 (3):
x86/boot: add acpi rsdp address tosetup_headerx86/acpi: take rsdp address for boot params if available x86/xen: supply rsdp address in boot params for pvh guestsDocumentation/x86/boot.txt | 19 +++++++++++++++++++ arch/x86/boot/header.S | 6 +++++- arch/x86/include/uapi/asm/bootparam.h | 1 + arch/x86/xen/enlighten_pvh.c | 2 ++ drivers/acpi/osl.c | 8 ++++++++ 5 files changed, 35 insertions(+), 1 deletion(-)
Quoted 3 lines
Quoted 1 line
--
Is this going to work with all existing setups?
I think so, yes.
In EFI environment this doesn't matter, direct PVH boot is working, grub2 support is optional (without grub2 support things are working as today).
I'm already writing grub2 patches to support booting in PVH environment. Those were the reason I need this patch set, as otherwise Xen would have to put the RSDP into low memory which is limiting the guest's ability to use large page mappings for all its memory.
Additionally something like this is needed for PVH dom0 support anyway.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Rafael J. Wysocki
maintainerQuoted 18 lines · Juergen Gross
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 (3):
x86/boot: add acpi rsdp address tosetup_headerx86/acpi: take rsdp address for boot params if available x86/xen: supply rsdp address in boot params for pvh guests
Quoted 8 lines
Documentation/x86/boot.txt | 19 +++++++++++++++++++ arch/x86/boot/header.S | 6 +++++- arch/x86/include/uapi/asm/bootparam.h | 1 + arch/x86/xen/enlighten_pvh.c | 2 ++ drivers/acpi/osl.c | 8 ++++++++ 5 files changed, 35 insertions(+), 1 deletion(-)--
Is this going to work with all existing setups?
Thanks,
Rafael
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel