From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasilis Liaskovitis Subject: [RFC PATCH v2 14/21][SeaBIOS] acpi_dsdt: Support _OST dimm method Date: Wed, 11 Jul 2012 12:31:59 +0200 Message-ID: <1342002726-18258-15-git-send-email-vasilis.liaskovitis@profitbricks.com> References: <1342002726-18258-1-git-send-email-vasilis.liaskovitis@profitbricks.com> Cc: avi@redhat.com, anthony@codemonkey.ws, gleb@redhat.com, imammedo@redhat.com, kevin@koconnor.net, wency@cn.fujitsu.com, Vasilis Liaskovitis To: qemu-devel@nongnu.org, kvm@vger.kernel.org, seabios@seabios.org Return-path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:36054 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757167Ab2GKKcV (ORCPT ); Wed, 11 Jul 2012 06:32:21 -0400 Received: by mail-bk0-f46.google.com with SMTP id j10so891605bkw.19 for ; Wed, 11 Jul 2012 03:32:21 -0700 (PDT) In-Reply-To: <1342002726-18258-1-git-send-email-vasilis.liaskovitis@profitbricks.com> Sender: kvm-owner@vger.kernel.org List-ID: Add support for _OST method. _OST method will write into the correct I/O byte to signal success / failure of hot-add or hot-remove to qemu. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/ssdt-mem.dsl | 4 ++++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 5d3e92b..1c253ca 100644 --- a/src/acpi-dsdt.dsl +++ b/src/acpi-dsdt.dsl @@ -762,6 +762,28 @@ DefinitionBlock ( MPE, 8 } + + /* Memory hot-remove notify failure byte */ + OperationRegion(MEEF, SystemIO, 0xafa1, 1) + Field (MEEF, ByteAcc, NoLock, Preserve) + { + MEF, 8 + } + + /* Memory hot-add notify success byte */ + OperationRegion(MPIS, SystemIO, 0xafa2, 1) + Field (MPIS, ByteAcc, NoLock, Preserve) + { + MIS, 8 + } + + /* Memory hot-add notify failure byte */ + OperationRegion(MPIF, SystemIO, 0xafa3, 1) + Field (MPIF, ByteAcc, NoLock, Preserve) + { + MIF, 8 + } + Method(MESC, 0) { // Local5 = active memdevice bitmap Store (MES, Local5) @@ -802,6 +824,30 @@ DefinitionBlock ( Store(Arg0, MPE) Sleep(200) } + Method (MOST, 3, Serialized) { + // _OST method - OS status indication + Switch (And(Arg0, 0xFF)) { + Case(0x3) + { + Switch(And(Arg1, 0xFF)) { + Case(0x1) { + Store(Arg2, MEF) + } + } + } + Case(0x1) + { + Switch(And(Arg1, 0xFF)) { + Case(0x0) { + Store(Arg2, MIS) + } + Case(0x1) { + Store(Arg2, MIF) + } + } + } + } + } } diff --git a/src/ssdt-mem.dsl b/src/ssdt-mem.dsl index ee322f0..041d301 100644 --- a/src/ssdt-mem.dsl +++ b/src/ssdt-mem.dsl @@ -38,6 +38,7 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) External(CMST, MethodObj) External(MPEJ, MethodObj) + External(MOST, MethodObj) Name(_CRS, ResourceTemplate() { QwordMemory( @@ -60,6 +61,9 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) Method (_EJ0, 1, NotSerialized) { MPEJ(ID, Arg0) } + Method (_OST, 3) { + MOST(Arg0, Arg1, ID) + } } } -- 1.7.9 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SouDY-0003Op-Qw for qemu-devel@nongnu.org; Wed, 11 Jul 2012 06:32:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SouDW-0005sL-5t for qemu-devel@nongnu.org; Wed, 11 Jul 2012 06:32:24 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:57641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SouDV-0005nm-Uu for qemu-devel@nongnu.org; Wed, 11 Jul 2012 06:32:22 -0400 Received: by mail-bk0-f45.google.com with SMTP id ji1so712841bkc.4 for ; Wed, 11 Jul 2012 03:32:21 -0700 (PDT) From: Vasilis Liaskovitis Date: Wed, 11 Jul 2012 12:31:59 +0200 Message-Id: <1342002726-18258-15-git-send-email-vasilis.liaskovitis@profitbricks.com> In-Reply-To: <1342002726-18258-1-git-send-email-vasilis.liaskovitis@profitbricks.com> References: <1342002726-18258-1-git-send-email-vasilis.liaskovitis@profitbricks.com> Subject: [Qemu-devel] [RFC PATCH v2 14/21][SeaBIOS] acpi_dsdt: Support _OST dimm method List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kvm@vger.kernel.org, seabios@seabios.org Cc: gleb@redhat.com, Vasilis Liaskovitis , kevin@koconnor.net, avi@redhat.com, anthony@codemonkey.ws, imammedo@redhat.com Add support for _OST method. _OST method will write into the correct I/O byte to signal success / failure of hot-add or hot-remove to qemu. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/ssdt-mem.dsl | 4 ++++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 5d3e92b..1c253ca 100644 --- a/src/acpi-dsdt.dsl +++ b/src/acpi-dsdt.dsl @@ -762,6 +762,28 @@ DefinitionBlock ( MPE, 8 } + + /* Memory hot-remove notify failure byte */ + OperationRegion(MEEF, SystemIO, 0xafa1, 1) + Field (MEEF, ByteAcc, NoLock, Preserve) + { + MEF, 8 + } + + /* Memory hot-add notify success byte */ + OperationRegion(MPIS, SystemIO, 0xafa2, 1) + Field (MPIS, ByteAcc, NoLock, Preserve) + { + MIS, 8 + } + + /* Memory hot-add notify failure byte */ + OperationRegion(MPIF, SystemIO, 0xafa3, 1) + Field (MPIF, ByteAcc, NoLock, Preserve) + { + MIF, 8 + } + Method(MESC, 0) { // Local5 = active memdevice bitmap Store (MES, Local5) @@ -802,6 +824,30 @@ DefinitionBlock ( Store(Arg0, MPE) Sleep(200) } + Method (MOST, 3, Serialized) { + // _OST method - OS status indication + Switch (And(Arg0, 0xFF)) { + Case(0x3) + { + Switch(And(Arg1, 0xFF)) { + Case(0x1) { + Store(Arg2, MEF) + } + } + } + Case(0x1) + { + Switch(And(Arg1, 0xFF)) { + Case(0x0) { + Store(Arg2, MIS) + } + Case(0x1) { + Store(Arg2, MIF) + } + } + } + } + } } diff --git a/src/ssdt-mem.dsl b/src/ssdt-mem.dsl index ee322f0..041d301 100644 --- a/src/ssdt-mem.dsl +++ b/src/ssdt-mem.dsl @@ -38,6 +38,7 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) External(CMST, MethodObj) External(MPEJ, MethodObj) + External(MOST, MethodObj) Name(_CRS, ResourceTemplate() { QwordMemory( @@ -60,6 +61,9 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) Method (_EJ0, 1, NotSerialized) { MPEJ(ID, Arg0) } + Method (_OST, 3) { + MOST(Arg0, Arg1, ID) + } } } -- 1.7.9