From patchwork Fri Dec 2 20:20:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 86360 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp429060qgi; Fri, 2 Dec 2016 12:21:20 -0800 (PST) X-Received: by 10.84.134.3 with SMTP id 3mr98865671plg.90.1480710080325; Fri, 02 Dec 2016 12:21:20 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id d17si6371823pgi.176.2016.12.02.12.21.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Dec 2016 12:21:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0C2DF81F5F; Fri, 2 Dec 2016 12:21:20 -0800 (PST) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4629981E06 for ; Fri, 2 Dec 2016 12:21:19 -0800 (PST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 829532DC36B; Fri, 2 Dec 2016 20:21:18 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-87.phx2.redhat.com [10.3.116.87]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB2KL4BH010188; Fri, 2 Dec 2016 15:21:16 -0500 From: Laszlo Ersek To: edk2-devel-01 Date: Fri, 2 Dec 2016 21:20:57 +0100 Message-Id: <20161202202059.5061-5-lersek@redhat.com> In-Reply-To: <20161202202059.5061-1-lersek@redhat.com> References: <20161202202059.5061-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 02 Dec 2016 20:21:18 +0000 (UTC) Subject: [edk2] [PATCH v2 4/6] OvmfPkg/QemuFwCfgLib: extend lib class header with more definitions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The last patch consists purely of code movement; going forward, we should use a few more symbolic constants. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- Notes: v2: - split these out to a separate patch OvmfPkg/Include/Library/QemuFwCfgLib.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.9.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/OvmfPkg/Include/Library/QemuFwCfgLib.h b/OvmfPkg/Include/Library/QemuFwCfgLib.h index 40a07456c530..3e017d53a97e 100644 --- a/OvmfPkg/Include/Library/QemuFwCfgLib.h +++ b/OvmfPkg/Include/Library/QemuFwCfgLib.h @@ -24,12 +24,20 @@ #define QEMU_FW_CFG_FNAME_SIZE 56 // +// If the following bit is set in the UINT32 fw_cfg revision / feature bitmap +// -- read from key 0x0001 with the basic IO Port or MMIO method --, then the +// DMA interface is available. +// +#define FW_CFG_F_DMA BIT1 + +// // Macros for the FW_CFG_DMA_ACCESS.Control bitmap (in native encoding). // #define FW_CFG_DMA_CTL_ERROR BIT0 #define FW_CFG_DMA_CTL_READ BIT1 #define FW_CFG_DMA_CTL_SKIP BIT2 #define FW_CFG_DMA_CTL_SELECT BIT3 +#define FW_CFG_DMA_CTL_WRITE BIT4 typedef enum { QemuFwCfgItemSignature = 0x0000,