From patchwork Tue Dec 18 12:41:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasilis Liaskovitis X-Patchwork-Id: 207118 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 5BB892C008D for ; Wed, 19 Dec 2012 00:43:14 +1100 (EST) Received: from localhost ([::1]:59492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkwX5-00022e-Ab for incoming@patchwork.ozlabs.org; Tue, 18 Dec 2012 07:44:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkwVg-0000Kh-SE for qemu-devel@nongnu.org; Tue, 18 Dec 2012 07:43:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkwVf-00009N-05 for qemu-devel@nongnu.org; Tue, 18 Dec 2012 07:43:00 -0500 Received: from mail-bk0-f47.google.com ([209.85.214.47]:61338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkwVe-00008z-PC for qemu-devel@nongnu.org; Tue, 18 Dec 2012 07:42:58 -0500 Received: by mail-bk0-f47.google.com with SMTP id j4so286000bkw.6 for ; Tue, 18 Dec 2012 04:42:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=owbAnxN8dxDNfb//CXzHu6Jk6+ta16ayQraraC/AmWc=; b=YUpqpiVfj0+lCJ5fONY/FrwQPDOPKD3W/5rb8GK/ysLqnN7z23ypR7OMNvqtv0B3x2 wGJquz1qgF+tKeUvaGHc3qdQu2bgoBNEr838pPiGn9AUKpDH9PvRqrjJZPRtucSxuia/ qYwXRQjmSkQXcMDETUDbj2/E8jYrz5Xg2DN7ULJAimllDgGauibX5QVaFtXcaC6bE9bL IDXRaSRy/b1TdNxErHo51nedyNnK+ZJcJmqQjHG2ptsJKjhG/6x4jF/7AS60/rVHanGg cs+LPeDQN0GuWo8qe3X0Snd3lZ3r7YlHjjCZc90SVxqTfbNzgVy/QUiULJjgEDviwUPR +OSg== X-Received: by 10.204.147.22 with SMTP id j22mr661473bkv.66.1355834577769; Tue, 18 Dec 2012 04:42:57 -0800 (PST) Received: from dhcp-192-168-178-175.ri.profitbricks.localdomain ([62.217.45.26]) by mx.google.com with ESMTPS id f24sm1169954bkv.7.2012.12.18.04.42.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Dec 2012 04:42:56 -0800 (PST) From: Vasilis Liaskovitis To: qemu-devel@nongnu.org, seabios@seabios.org Date: Tue, 18 Dec 2012 13:41:55 +0100 Message-Id: <1355834518-17989-28-git-send-email-vasilis.liaskovitis@profitbricks.com> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1355834518-17989-1-git-send-email-vasilis.liaskovitis@profitbricks.com> References: <1355834518-17989-1-git-send-email-vasilis.liaskovitis@profitbricks.com> X-Gm-Message-State: ALoCoQnQduAhYDy3BujyjHvwu5P5SEVx03xJXvtTepjS5ZxZCjkAr1QUb4yCDJpLlXHVtibMUAo1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.214.47 Cc: Vasilis Liaskovitis , pingfank@linux.vnet.ibm.com, gleb@redhat.com, stefanha@gmail.com, jbaron@redhat.com, blauwirbel@gmail.com, kevin@koconnor.net, kraxel@redhat.com, anthony@codemonkey.ws Subject: [Qemu-devel] [RFC PATCH v4 27/30] [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. --- src/acpi-dsdt-mem-hotplug.dsl | 51 ++++++++++++++++++++++++++++++++++++++++- src/ssdt-mem.dsl | 4 +++ 2 files changed, 54 insertions(+), 1 deletions(-) diff --git a/src/acpi-dsdt-mem-hotplug.dsl b/src/acpi-dsdt-mem-hotplug.dsl index fd73ea7..a648bee 100644 --- a/src/acpi-dsdt-mem-hotplug.dsl +++ b/src/acpi-dsdt-mem-hotplug.dsl @@ -27,7 +27,28 @@ Scope(\_SB) { { 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) @@ -69,4 +90,32 @@ Scope(\_SB) { 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 eef84b6..47a3b4f 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) + } } }