diff mbox

[edk2,v2,4/6] OvmfPkg/QemuFwCfgLib: extend lib class header with more definitions

Message ID 20161202202059.5061-5-lersek@redhat.com
State Accepted
Commit be0eaf42efe2ff3dc845b445c6d3a6e6983805bd
Headers show

Commit Message

Laszlo Ersek Dec. 2, 2016, 8:20 p.m. UTC
The last patch consists purely of code movement; going forward, we should
use a few more symbolic constants.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---

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

Comments

Leif Lindholm Dec. 5, 2016, 10:30 a.m. UTC | #1
On Fri, Dec 02, 2016 at 09:20:57PM +0100, Laszlo Ersek wrote:
> The last patch consists purely of code movement; going forward, we should

> use a few more symbolic constants.

> 

> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> Cc: Jordan Justen <jordan.l.justen@intel.com>

> Cc: Leif Lindholm <leif.lindholm@linaro.org>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com>


Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>


> ---

> 

> 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

> 

> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

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,