From patchwork Fri Mar 29 08:16:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hu Tao X-Patchwork-Id: 232307 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 B12F42C00B3 for ; Fri, 29 Mar 2013 19:17:59 +1100 (EST) Received: from localhost ([::1]:33234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULUVZ-0008Dz-SN for incoming@patchwork.ozlabs.org; Fri, 29 Mar 2013 04:17:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULUV6-00089t-G2 for qemu-devel@nongnu.org; Fri, 29 Mar 2013 04:17:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULUV4-0007Hw-S7 for qemu-devel@nongnu.org; Fri, 29 Mar 2013 04:17:28 -0400 Received: from [222.73.24.84] (port=8551 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULUV4-00079c-IK for qemu-devel@nongnu.org; Fri, 29 Mar 2013 04:17:26 -0400 X-IronPort-AV: E=Sophos;i="4.87,372,1363104000"; d="scan'208";a="6969343" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 29 Mar 2013 16:14:48 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r2T8HIpe014556; Fri, 29 Mar 2013 16:17:20 +0800 Received: from localhost.localdomain ([10.167.233.156]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013032916162805-163881 ; Fri, 29 Mar 2013 16:16:28 +0800 From: Hu Tao To: qemu-devel , "Daniel P. Berrange" , KAMEZAWA Hiroyuki , Jan Kiszka , Gleb Natapov , Blue Swirl , Eric Blake , Andrew Jones , Marcelo Tosatti , Sasha Levin , Luiz Capitulino , Anthony Liguori , Markus Armbruster , Paolo Bonzini , Stefan Hajnoczi , Juan Quintela , Orit Wasserman , Wen Congyang , "Michael S. Tsirkin" , Alexander Graf , Alex Williamson , Peter Maydell , Christian Borntraeger Date: Fri, 29 Mar 2013 16:16:47 +0800 Message-Id: <22dff554d59724df819010322df91d40196b595f.1364541739.git.hutao@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: References: X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/29 16:16:28, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/29 16:16:30, Serialize complete at 2013/03/29 16:16:30 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Subject: [Qemu-devel] [PATCH v16 6/6] pvpanic: pass configurable ioport to seabios 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 This lets seabios patch the corresponding SSDT entry. Signed-off-by: Hu Tao --- hw/fw_cfg.h | 2 ++ hw/pvpanic.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/hw/fw_cfg.h b/hw/fw_cfg.h index 05c8df1..07cc941 100644 --- a/hw/fw_cfg.h +++ b/hw/fw_cfg.h @@ -1,6 +1,8 @@ #ifndef FW_CFG_H #define FW_CFG_H +#include "exec/hwaddr.h" + #define FW_CFG_SIGNATURE 0x00 #define FW_CFG_ID 0x01 #define FW_CFG_UUID 0x02 diff --git a/hw/pvpanic.c b/hw/pvpanic.c index ff0a116..94c3b25 100644 --- a/hw/pvpanic.c +++ b/hw/pvpanic.c @@ -17,6 +17,8 @@ #include #include #include +#include "hw/fw_cfg.h" +#include "hw/pc.h" /* The bit of supported pv event */ #define PVPANIC_F_PANICKED 0 @@ -83,6 +85,18 @@ static int pvpanic_isa_initfn(ISADevice *dev) memory_region_init_io(&s->io, &pvpanic_ops, s, "pvpanic", 1); isa_register_ioport(dev, &s->io, s->ioport); + if (fw_cfg_piix) { + fw_cfg_add_file(fw_cfg_piix, "etc/pvpanic-port", + g_memdup(&s->ioport, sizeof(s->ioport)), + sizeof(s->ioport)); + } + + if (fw_cfg_q35) { + fw_cfg_add_file(fw_cfg_q35, "etc/pvpanic-port", + g_memdup(&s->ioport, sizeof(s->ioport)), + sizeof(s->ioport)); + } + return 0; }