All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][v3] Pass the location of the ACPI RSDP to DOM0.
@ 2014-01-21 20:55 Philip Wernersbach
  2014-01-21 23:33 ` Andrew Cooper
  2014-01-22  9:27 ` Jan Beulich
  0 siblings, 2 replies; 3+ messages in thread
From: Philip Wernersbach @ 2014-01-21 20:55 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]

xen: [v3] Pass the location of the ACPI RSDP to DOM0.

Some machines, such as recent IBM servers, only allow the OS to get the
ACPI RSDP from EFI. Since Xen nukes DOM0's ability to access EFI, DOM0
cannot get the RSDP on these machines, leading to all sorts of
functionality reductions.

Signed-off-by: Philip Wernersbach <philip.wernersbach@gmail.com>

---
Changed since v2:
    * Fix coding style
    * Get rid of extra define
    * Use correct typedef'd type for the ACPI RSDP pointer
    * Better error checking conditional
    * Simplify error message

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index b49256d..fdeb9f2 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1378,6 +1378,25 @@ void __init __start_xen(unsigned long mbi_p)
             safe_strcat(dom0_cmdline, " acpi=");
             safe_strcat(dom0_cmdline, acpi_param);
         }
+        if ( !strstr(dom0_cmdline, "acpi_rsdp=") )
+        {
+            acpi_physical_address rp = acpi_os_get_root_pointer();
+            char rp_str[sizeof(acpi_physical_address)*2 + 1];
+
+            if ( rp )
+            {
+                snprintf(rp_str, sizeof(acpi_physical_address)*2 + 1,
+                         "%08lX", rp);
+
+                safe_strcat(dom0_cmdline, " acpi_rsdp=0x");
+                safe_strcat(dom0_cmdline, rp_str);
+            }
+            else
+            {
+                printk(XENLOG_WARNING
+                       "Failed to get acpi_rsdp to pass to dom0\n");
+            }
+        }

         cmdline = dom0_cmdline;
     }

[-- Attachment #2: xen-master-pass-acpi-rsdp.patch --]
[-- Type: text/x-patch, Size: 1568 bytes --]

xen: [v3] Pass the location of the ACPI RSDP to DOM0.
 
Some machines, such as recent IBM servers, only allow the OS to get the
ACPI RSDP from EFI. Since Xen nukes DOM0's ability to access EFI, DOM0
cannot get the RSDP on these machines, leading to all sorts of
functionality reductions.
 
Signed-off-by: Philip Wernersbach <philip.wernersbach@gmail.com>

---
Changed since v2:
    * Fix coding style
    * Get rid of extra define
    * Use correct typedef'd type for the ACPI RSDP pointer
    * Better error checking conditional
    * Simplify error message

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index b49256d..fdeb9f2 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1378,6 +1378,25 @@ void __init __start_xen(unsigned long mbi_p)
             safe_strcat(dom0_cmdline, " acpi=");
             safe_strcat(dom0_cmdline, acpi_param);
         }
+        if ( !strstr(dom0_cmdline, "acpi_rsdp=") )
+        {
+            acpi_physical_address rp = acpi_os_get_root_pointer();
+            char rp_str[sizeof(acpi_physical_address)*2 + 1];
+
+            if ( rp )
+            {
+                snprintf(rp_str, sizeof(acpi_physical_address)*2 + 1,
+                         "%08lX", rp);
+
+                safe_strcat(dom0_cmdline, " acpi_rsdp=0x");
+                safe_strcat(dom0_cmdline, rp_str);
+            }
+            else
+            {
+                printk(XENLOG_WARNING 
+                       "Failed to get acpi_rsdp to pass to dom0\n");
+            }
+        }
 
         cmdline = dom0_cmdline;
     }

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-22  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 20:55 [PATCH][v3] Pass the location of the ACPI RSDP to DOM0 Philip Wernersbach
2014-01-21 23:33 ` Andrew Cooper
2014-01-22  9:27 ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.