Skip to contentSkip to conversation

xen/shim: stash RSDP address for ACPI driver

PATCH In review Wei Liu 3 participants 3 messages Jan 22, 2018

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH v3 1/1 xen/shim: stash RSDP address for ACPI driver

It used to the case that we placed RSDP under 1MB and let Xen search for it. We moved the placement to under 4GB in 4a5733771, so the search wouldn't work.

Introduce rsdp_hint to ACPI code and set that variable in convert_pvh_info.

---
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Roger Pau Monné <[email protected]>

v3: Add BUG_ON. Use __initdata. Move declaration within CONFIG_ACPI.

---
 xen/arch/x86/guest/pvh-boot.c | 3 +++
 xen/drivers/acpi/osl.c        | 5 +++++
 xen/include/xen/acpi.h        | 2 ++
 3 files changed, 10 insertions(+)
xen/arch/x86/guest/pvh-boot.c +3 -0
index be3122b16c..0e9e5bfdf6 100644
@@ -69,6 +69,9 @@ static void __init convert_pvh_info(void)
         mod[i].mod_end   = entry[i].paddr + entry[i].size;
         mod[i].string    = entry[i].cmdline_paddr;
     }
+
+    BUG_ON(!pvh_info->rsdp_paddr);
+    rsdp_hint = pvh_info->rsdp_paddr;
 }
 
 static void __init get_memory_map(void)
xen/drivers/acpi/osl.c +5 -0
index 52c9b4ba9a..4c8bb7839e 100644
@@ -62,8 +62,13 @@ void __init acpi_os_vprintf(const char *fmt, va_list args)
 	printk("%s", buffer);
 }
 
+acpi_physical_address __initdata rsdp_hint;
+
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
+	if (rsdp_hint)
+		return rsdp_hint;
+
 	if (efi_enabled(EFI_BOOT)) {
 		if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
 			return efi.acpi20;
xen/include/xen/acpi.h +2 -0
index 9409350f05..fd5b5fb919 100644
@@ -51,6 +51,8 @@
 
 #ifdef CONFIG_ACPI
 
+extern acpi_physical_address rsdp_hint;
+
 enum acpi_interrupt_id {
 	ACPI_INTERRUPT_PMI	= 1,
 	ACPI_INTERRUPT_INIT,
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v3 1/1
#1 lore raw
Quoted 8 lines · Wei Liu

It used to the case that we placed RSDP under 1MB and let Xen search for it. We moved the placement to under 4GB in 4a5733771, so the search wouldn't work.

Introduce rsdp_hint to ACPI code and set that variable in convert_pvh_info.

LGTM:

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by
#2 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 22.01.18 at 17:33, <[email protected]> wrote:
Quoted 4 lines · Wei Liu

It used to the case that we placed RSDP under 1MB and let Xen search for it. We moved the placement to under 4GB in 4a5733771, so the search wouldn't work.

Quoted 8 lines
Quoted 4 lines

Introduce rsdp_hint to ACPI code and set that variable in convert_pvh_info.

LGTM:

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel