]> xenbits.xensource.com Git - seabios.git/commitdiff
Replace level gpe event with edge gpe event for hot-plug handlers
authorIgor Mammedov <imammedo@redhat.com>
Tue, 3 Apr 2012 21:48:44 +0000 (23:48 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 5 Apr 2012 11:53:06 +0000 (07:53 -0400)
in current code, pci hot-plug gpe event handler is defined as
a level one "_L01"

1. hw adds device, sets GPE.1 bit and sends SCI
2. OSPM gets SCI, reads GPE00.sts and masks GPE.1 bit in GPE00.en
3. OSPM executes _L01
4. hw adds second device and sets GPE.1 bit but SCI is not asserted
    since GPE00.en masks event
5. OSPM resets GPE.1 bit in GPE00.sts and umasks it in GPE00.en

as result event for step 4 is lost because step 5 clears it and OS
will not see added second device.

ACPI 50 spec: 5.6.4 General-Purpose Event Handling
defines GPE event handling as following:

1. Disables the interrupt source (GPEx_BLK EN bit).
2. If an edge event, clears the status bit.
3. Performs one of the following:
* Dispatches to an ACPI-aware device driver.
* Queues the matching control method for execution.
* Manages a wake event using device _PRW objects.
4. If a level event, clears the status bit.
5. Enables the interrupt source.

Switching from level to edge event handler reduces chances to
hit race window.

Same applies to cpu-hotplug, so switch it to edge handler as well.

Tested with RHEL6, 3.3.+ kernel, winxp, and w2008r2, and I wasn't
able to trigger race after using edge event handler.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
src/acpi-dsdt.dsl
src/acpi-dsdt.hex

index 4e04c484d77315f0e4967a7aefdae9d32e60b8b8..4bdc26849e1e8272c55a98024b55d2e2b456efb6 100644 (file)
@@ -723,11 +723,11 @@ DefinitionBlock (
         Method(_L00) {
             Return(0x01)
         }
-        Method(_L01) {
+        Method(_E01) {
             // PCI hotplug event
             Return(\_SB.PCI0.PCNF())
         }
-        Method(_L02) {
+        Method(_E02) {
             // CPU hotplug event
             Return(\_SB.PRSC())
         }
index 6f91dabc40a361bfcdca005c2145318bc91c6575..a4af5977e267ac80bb326f0fe5ca0da92c9a41cb 100644 (file)
@@ -8,7 +8,7 @@ static unsigned char AmlCode[] = {
 0x0,
 0x0,
 0x1,
-0xda,
+0xe8,
 0x42,
 0x58,
 0x50,
@@ -4229,7 +4229,7 @@ static unsigned char AmlCode[] = {
 0x14,
 0x16,
 0x5f,
-0x4c,
+0x45,
 0x30,
 0x31,
 0x0,
@@ -4252,7 +4252,7 @@ static unsigned char AmlCode[] = {
 0x14,
 0x11,
 0x5f,
-0x4c,
+0x45,
 0x30,
 0x32,
 0x0,