From patchwork Tue Dec 18 12:41:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasilis Liaskovitis X-Patchwork-Id: 207107 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 E4FC32C008E for ; Wed, 19 Dec 2012 00:26:56 +1100 (EST) Received: from localhost ([::1]:58622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkwWo-0001Ya-KQ for incoming@patchwork.ozlabs.org; Tue, 18 Dec 2012 07:44:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkwVj-0000S0-II for qemu-devel@nongnu.org; Tue, 18 Dec 2012 07:43:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkwVi-0000B9-Ea for qemu-devel@nongnu.org; Tue, 18 Dec 2012 07:43:03 -0500 Received: from mail-bk0-f42.google.com ([209.85.214.42]:53681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkwVi-0000Ay-8j for qemu-devel@nongnu.org; Tue, 18 Dec 2012 07:43:02 -0500 Received: by mail-bk0-f42.google.com with SMTP id ji2so290683bkc.15 for ; Tue, 18 Dec 2012 04:43:01 -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=8mOPuO8uT/wPeTez46MHUjWSfUV1NAlB7Sob0gTEMEs=; b=oWODQA2nSMPOQH6h2c4YbG28viwAD3YNYZ/Wotjpb8pk+R6L5zRxWwxfzRhR0W+5CV 7VgS2FpfErMfxBLGqEJhEObynEFANT7gvOelf6eSZwsCOLivv1h+tCBzFKdoLFJPBB3I 7hFFv3aV+ud3D9wQgMt+Dg4g67tylTm8VdAVJXi5xg350D4eThmQExUkhxr3C8Ay8a4i faSmaAJlHSCI0Zohwcifq/1Zrl9khqEywxVZRtdpTJ2W6ouc7D96TnFe4JT4ehsEtwo0 1/nxvtFEV7q2+D+aUSBzsrAcQ7hEe7O+HXHIjBeQC+DNFSSRTv7GAECF8dWVZxuHbXP9 sqGQ== X-Received: by 10.204.3.211 with SMTP id 19mr650749bko.99.1355834581253; Tue, 18 Dec 2012 04:43:01 -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.59 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Dec 2012 04:43:00 -0800 (PST) From: Vasilis Liaskovitis To: qemu-devel@nongnu.org, seabios@seabios.org Date: Tue, 18 Dec 2012 13:41:57 +0100 Message-Id: <1355834518-17989-30-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: ALoCoQlbAaTkTok4+pnu8V877C/YsPHnog2gy3Xlwa1NwiMKSeiI0Dpq04yyQF/BuCgyUTgkYFaK X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.214.42 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 29/30] [SeaBIOS] Implement _PS3 method for memory device 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 --- src/acpi-dsdt-mem-hotplug.dsl | 15 +++++++++++++++ src/ssdt-mem.dsl | 4 ++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt-mem-hotplug.dsl b/src/acpi-dsdt-mem-hotplug.dsl index a648bee..7d7c078 100644 --- a/src/acpi-dsdt-mem-hotplug.dsl +++ b/src/acpi-dsdt-mem-hotplug.dsl @@ -49,6 +49,13 @@ Scope(\_SB) { MIF, 8 } + /* Memory _PS3 byte */ + OperationRegion(MPSB, SystemIO, 0xafa4, 1) + Field (MPSB, ByteAcc, NoLock, Preserve) + { + MPS, 8 + } + Method(MESC, 0) { // Local5 = active memdevice bitmap Store (MES, Local5) @@ -90,6 +97,14 @@ Scope(\_SB) { Sleep(200) } + + Method (MPS3, 1, NotSerialized) { + // _PS3 method - power-off method + Store(Arg0, MPS) + Store(Zero, Index(MEON, Arg0)) + Sleep(200) + } + Method (MOST, 3, Serialized) { // _OST method - OS status indication Switch (And(Arg0, 0xFF)) { diff --git a/src/ssdt-mem.dsl b/src/ssdt-mem.dsl index 47a3b4f..9827a58 100644 --- a/src/ssdt-mem.dsl +++ b/src/ssdt-mem.dsl @@ -39,6 +39,7 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) External(CMST, MethodObj) External(MPEJ, MethodObj) External(MOST, MethodObj) + External(MPS3, MethodObj) Name(_CRS, ResourceTemplate() { QwordMemory( @@ -64,6 +65,9 @@ DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1) Method (_OST, 3) { MOST(Arg0, Arg1, ID) } + Method (_PS3, 0) { + MPS3(ID) + } } }