From patchwork Fri Sep 21 11:17:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasilis Liaskovitis X-Patchwork-Id: 185699 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B756B2C0089 for ; Fri, 21 Sep 2012 21:20:52 +1000 (EST) Received: from localhost ([::1]:56497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF1Hu-0005ml-P1 for incoming@patchwork.ozlabs.org; Fri, 21 Sep 2012 07:20:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF1FB-0000JO-Nb for qemu-devel@nongnu.org; Fri, 21 Sep 2012 07:18:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF1F5-00040I-G6 for qemu-devel@nongnu.org; Fri, 21 Sep 2012 07:18:01 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:58755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF1F5-0003rI-AS for qemu-devel@nongnu.org; Fri, 21 Sep 2012 07:17:55 -0400 Received: by mail-bk0-f45.google.com with SMTP id jg9so1317042bkc.4 for ; Fri, 21 Sep 2012 04:17:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=d4Fw1VXpv1sgLok/T+/3i0Z2eE+Nmr3M5uroxRDhNb4=; b=Q2Q7MHScgxT7Z7bgd80aSBkhafoI4swodE7OR6D5UMIJ+8dH7nPqOSKKjct/kwOt3g UiC+yyGhnBgJHz5IO2ZB2mrECfuo4i1q7M2bSvNMIJcJH2dp4hbA33htktRe63Uwovfx ofakuCAcdCqvcCH2RIhqx48UENi6JCFbdiLouMrgtOMGyHqWCoiNYptLoOp0WWOcgOH3 orC05Zhid9AsPFHan+l+BNp+LxIlc9B7wtAT9zsOKz6jry4voc8pnjLb1+V7cGiyCDz7 Dqz4iQmPfChopKrFXVtQz5Nxcfte5Ym4aIWI6z0ULSGapbmSVz/SDa9FowGvQq9v14PT qxyA== Received: by 10.204.128.202 with SMTP id l10mr1940707bks.127.1348226274710; Fri, 21 Sep 2012 04:17:54 -0700 (PDT) Received: from dhcp-192-168-178-175.ri.profitbricks.localdomain ([62.217.45.26]) by mx.google.com with ESMTPS id x13sm5271435bkv.16.2012.09.21.04.17.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Sep 2012 04:17:54 -0700 (PDT) From: Vasilis Liaskovitis To: qemu-devel@nongnu.org, kvm@vger.kernel.org, seabios@seabios.org Date: Fri, 21 Sep 2012 13:17:30 +0200 Message-Id: <1348226255-4226-15-git-send-email-vasilis.liaskovitis@profitbricks.com> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1348226255-4226-1-git-send-email-vasilis.liaskovitis@profitbricks.com> References: <1348226255-4226-1-git-send-email-vasilis.liaskovitis@profitbricks.com> X-Gm-Message-State: ALoCoQk5c9cMd8L/Ag8E1tEpVXmrwNxoFuw85lf7AOExOxImyB9YaWqeg8MgyiVUUOrjf4qcg6U5 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.45 Cc: Vasilis Liaskovitis , gleb@redhat.com, blauwirbel@gmail.com, kevin@koconnor.net, avi@redhat.com, anthony@codemonkey.ws, imammedo@redhat.com, eblake@redhat.com, kraxel@redhat.com Subject: [Qemu-devel] [RFC PATCH v3 14/19][SeaBIOS] Add _OST dimm method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/ssdt-mem.dsl | 4 ++++ 2 files changed, 54 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 5d3e92b..0d37bbc 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,34 @@ 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) + // Revert MEON flag for this memory device to one + Store(One, Index(MEON, Arg2)) + } + } + } + Case(0x1) + { + Switch(And(Arg1, 0xFF)) { + Case(0x0) { + Store(Arg2, MIS) + } + Case(0x1) { + Store(Arg2, MIF) + // Revert MEON flag for this memory device to zero + Store(Zero, Index(MEON, Arg2)) + } + } + } + } + } } 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) + } } }