From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Ard Biesheuvel , Jordan Justen , Leif Lindholm 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: [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: , X-List-Received-Date: Fri, 02 Dec 2016 20:21:19 -0000 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(+) 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, -- 2.9.2