xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Vcpu hotplug: Move ACPI processor from \_PR to \_SB
@ 2010-02-11 17:38 Liu, Jinsong
  2010-02-11 18:36 ` Keir Fraser
  0 siblings, 1 reply; 13+ messages in thread
From: Liu, Jinsong @ 2010-02-11 17:38 UTC (permalink / raw)
  To: xen-devel; +Cc: Jiang, Yunhong, Keir Fraser

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

Vcpu hotplug: Move ACPI processor from \_PR to \_SB

Move processor from \_PR to \_SB. ACPI processor can be defined under 
\_PR or \_SB. However, recently os like linux 2.6.30/32 support cpu hotplug 
better for \_SB processor object.

Signed-off-by: Jiang, Yunhong   <yunhong.jiang@intel.com>
                     Liu, Jinsong     <jinsong.liu@intel.com>

[-- Attachment #2: ras_vcpuhotplug_1.patch --]
[-- Type: application/octet-stream, Size: 4166 bytes --]

Vcpu hotplug: Move ACPI	processor from \_PR to \_SB

Move processor from \_PR to \_SB. ACPI processor can be defined under 
\_PR or \_SB. However, recently os like linux 2.6.30/32 support cpu hotplug 
better for \_SB processor object.

Signed-off-by: Jiang, Yunhong   <yunhong.jiang@intel.com>
               Liu, Jinsong     <jinsong.liu@intel.com>

diff -r 5b895c3f4386 tools/firmware/hvmloader/acpi/Makefile
--- a/tools/firmware/hvmloader/acpi/Makefile	Mon Feb 08 10:18:51 2010 +0000
+++ b/tools/firmware/hvmloader/acpi/Makefile	Thu Feb 11 14:38:39 2010 +0800
@@ -35,7 +35,7 @@ dsdt.c: dsdt.asl mk_dsdt.c
 dsdt.c: dsdt.asl mk_dsdt.c
 	$(MAKE) iasl
 	$(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_include) -o mk_dsdt mk_dsdt.c
-	head -n -1 $< >_dsdt.asl
+	head -n -2 $< >_dsdt.asl
 	./mk_dsdt >>_dsdt.asl
 	iasl -tc _dsdt.asl
 	mv _dsdt.hex dsdt.c
diff -r 5b895c3f4386 tools/firmware/hvmloader/acpi/mk_dsdt.c
--- a/tools/firmware/hvmloader/acpi/mk_dsdt.c	Mon Feb 08 10:18:51 2010 +0000
+++ b/tools/firmware/hvmloader/acpi/mk_dsdt.c	Thu Feb 11 14:38:39 2010 +0800
@@ -77,11 +77,9 @@ int main(void)
 
     /**** DSDT DefinitionBlock start ****/
     /* (we append to existing DSDT definition block) */
-    indent_level++;
+    indent_level+=2;
 
     /**** Processor start ****/
-    push_block("Scope", "\\_PR");
-
     /* MADT checksum */
     stmt("OperationRegion", "MSUM, SystemMemory, \\_SB.MSUA, 1");
     push_block("Field", "MSUM, ByteAcc, NoLock, Preserve");
@@ -91,7 +89,7 @@ int main(void)
     /* Define processor objects and control methods. */
     for ( cpu = 0; cpu < HVM_MAX_VCPUS; cpu++)
     {
-        push_block("Processor", "PR%02X, %d, 0x0000b010, 0x06", cpu, cpu);
+        push_block("Processor", "\\_SB.PR%02X, %d, 0x0000b010, 0x06", cpu, cpu);
 
         stmt("Name", "_HID, \"ACPI0007\"");
 
@@ -117,7 +115,7 @@ int main(void)
         stmt("Return", "0xF");
         pop_block();
         push_block("Else", NULL);
-        stmt("Return", "0x9");
+        stmt("Return", "0x0");
         pop_block();
         pop_block();
 
@@ -136,7 +134,7 @@ int main(void)
 
     /* Control method 'PRSC': CPU hotplug GPE handler. */
     push_block("Method", "PRSC, 0");
-    stmt("Store", "PRS, Local0");
+    stmt("Store", "ToBuffer(PRS), Local0");
     for ( cpu = 0; cpu < HVM_MAX_VCPUS; cpu++ )
     {
         /* Read a byte at a time from the PRST online-CPU bitmask. */
@@ -147,16 +145,16 @@ int main(void)
         /* Extract current CPU's status: 0=offline; 1=online. */
         stmt("And", "Local1, 1, Local2");
         /* Check if status is up-to-date in the relevant MADT LAPIC entry... */
-        push_block("If", "LNotEqual(Local2, \\_PR.PR%02X.FLG)", cpu);
+        push_block("If", "LNotEqual(Local2, \\_SB.PR%02X.FLG)", cpu);
         /* ...If not, update it and the MADT checksum, and notify OSPM. */
-        stmt("Store", "Local2, \\_PR.PR%02X.FLG", cpu);
+        stmt("Store", "Local2, \\_SB.PR%02X.FLG", cpu);
         push_block("If", "LEqual(Local2, 1)");
-        stmt("Notify", "PR%02X, 1", cpu); /* Notify: Device Check */
-        stmt("Subtract", "\\_PR.MSU, 1, \\_PR.MSU"); /* Adjust MADT csum */
+        stmt("Notify", "\\_SB.PR%02X, 1", cpu); /* Notify: Device Check */
+        stmt("Subtract", "\\_SB.MSU, 1, \\_SB.MSU"); /* Adjust MADT csum */
         pop_block();
         push_block("Else", NULL);
-        stmt("Notify", "PR%02X, 3", cpu); /* Notify: Eject Request */
-        stmt("Add", "\\_PR.MSU, 1, \\_PR.MSU"); /* Adjust MADT csum */
+        stmt("Notify", "\\_SB.PR%02X, 3", cpu); /* Notify: Eject Request */
+        stmt("Add", "\\_SB.MSU, 1, \\_SB.MSU"); /* Adjust MADT csum */
         pop_block();
         pop_block();
     }
@@ -168,10 +166,11 @@ int main(void)
     /* Define GPE control method '_L02'. */
     push_block("Scope", "\\_GPE");
     push_block("Method", "_L02");
-    stmt("Return", "\\_PR.PRSC()");
-    pop_block();
+    stmt("Return", "\\_SB.PRSC()");
     pop_block();
     /**** Processor end ****/
+    /**** Scope end *******/
+    pop_block();
 
 
     /**** PCI0 start ****/

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

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

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

end of thread, other threads:[~2010-02-12 21:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 17:38 [PATCH 1/2] Vcpu hotplug: Move ACPI processor from \_PR to \_SB Liu, Jinsong
2010-02-11 18:36 ` Keir Fraser
2010-02-12  2:57   ` Jiang, Yunhong
2010-02-12  8:30     ` Keir Fraser
2010-02-12  9:25       ` Jiang, Yunhong
2010-02-12  9:30         ` Keir Fraser
2010-02-12  9:38           ` Jiang, Yunhong
2010-02-12  9:50           ` Liu, Jinsong
2010-02-12 10:03             ` Keir Fraser
2010-02-12 10:07               ` Liu, Jinsong
2010-02-12 10:29                 ` Keir Fraser
2010-02-12 20:46                   ` Liu, Jinsong
2010-02-12 21:57                     ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).