public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Brijesh Singh <brijesh.singh@amd.com>
To: edk2-devel@lists.01.org
Cc: Thomas.Lendacky@amd.com, lersek@redhat.com,
	jordan.l.justen@intel.com, leo.duran@amd.com,
	Brijesh Singh <brijesh.singh@amd.com>
Subject: [PATCH v8 10/16] OvmfPkg/QemuFwCfgLib: Prepare for SEV support
Date: Thu,  6 Jul 2017 10:29:48 -0400	[thread overview]
Message-ID: <1499351394-1175-11-git-send-email-brijesh.singh@amd.com> (raw)
In-Reply-To: <1499351394-1175-1-git-send-email-brijesh.singh@amd.com>

Add SEV specific internal functions which will be used while intergrating
the SEV support into QemuFwCfgLib.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
---
 OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h | 37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
index 6e87c625102e..8cfa7913ffae 100644
--- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
+++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
@@ -2,6 +2,7 @@
   Internal interfaces specific to the QemuFwCfgLib instances in OvmfPkg.
 
   Copyright (C) 2016, Red Hat, Inc.
+  Copyright (C) 2017, Advanced Micro Devices. All rights reserved
 
   This program and the accompanying materials are licensed and made available
   under the terms and conditions of the BSD License which accompanies this
@@ -43,4 +44,40 @@ InternalQemuFwCfgDmaIsAvailable (
   VOID
   );
 
+/**
+ Returns a boolean indicating whether SEV support is enabled
+
+ @retval    TRUE    SEV is enabled
+ @retval    FALSE   SEV is disabled
+**/
+BOOLEAN
+InternalQemuFwCfgSevIsEnabled (
+  VOID
+  );
+
+/**
+ Allocate a bounce buffer for SEV DMA.
+
+  @param[out]    Buffer   Allocated DMA Buffer pointer
+  @param[in]     NumPage  Number of pages.
+
+**/
+VOID
+InternalQemuFwCfgSevDmaAllocateBuffer (
+  OUT    VOID     **Buffer,
+  IN     UINT32   NumPages
+  );
+
+/**
+ Free the DMA buffer allocated using InternalQemuFwCfgSevDmaAllocateBuffer
+
+  @param[in]     NumPage  Number of pages.
+  @param[in]     Buffer   DMA Buffer pointer
+
+**/
+VOID
+InternalQemuFwCfgSevDmaFreeBuffer (
+  IN     VOID     *Buffer,
+  IN     UINT32   NumPages
+  );
 #endif
-- 
2.7.4



  parent reply	other threads:[~2017-07-06 14:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 14:29 [PATCH v8 00/16] x86: Secure Encrypted Virtualization (AMD) Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 01/16] OvmfPkg/ResetVector: Set C-bit when building initial page table Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 02/16] OvmfPkg: Update dsc to use IoLib from BaseIoLibIntrinsicSev.inf Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 03/16] OvmfPkg/BaseMemcryptSevLib: Add SEV helper library Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 04/16] OvmfPkg/PlatformPei: Set memory encryption PCD when SEV is enabled Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 05/16] OvmfPkg: Add AmdSevDxe driver Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 06/16] OvmfPkg: Introduce IoMmuAbsent Protocol GUID Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 07/16] OvmfPkg: Add PlatformHasIoMmuLib Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 08/16] OvmfPkg: Add IoMmuDxe driver Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 09/16] OvmfPkg/QemuFwCfgLib: Provide Pei and Dxe specific library Brijesh Singh
2017-07-06 14:29 ` Brijesh Singh [this message]
2017-07-06 14:29 ` [PATCH v8 11/16] OvmfPkg/QemuFwCfgLib: Implement SEV internal function for SEC phase Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 12/16] OvmfPkg/QemuFwCfgLib: Implement SEV internal functions for PEI phase Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 13/16] OvmfPkg/QemuFwCfgLib: Implement SEV internal function for Dxe phase Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 14/16] OvmfPkg/QemuFwCfgLib: Add option to dynamic alloc FW_CFG_DMA Access Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 15/16] OvmfPkg/QemuFwCfgLib: Add SEV support Brijesh Singh
2017-07-06 14:29 ` [PATCH v8 16/16] OvmfPkg: update PciHostBridgeDxe to use PlatformHasIoMmuLib Brijesh Singh
2017-07-11  8:34 ` [PATCH v8 00/16] x86: Secure Encrypted Virtualization (AMD) Jordan Justen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499351394-1175-11-git-send-email-brijesh.singh@amd.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox