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 11/16] OvmfPkg/QemuFwCfgLib: Implement SEV internal function for SEC phase
Date: Thu,  6 Jul 2017 10:29:49 -0400	[thread overview]
Message-ID: <1499351394-1175-12-git-send-email-brijesh.singh@amd.com> (raw)
In-Reply-To: <1499351394-1175-1-git-send-email-brijesh.singh@amd.com>

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/QemuFwCfgSec.c | 57 ++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c
index 465ccbe90dad..071b8d9b91d4 100644
--- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c
+++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c
@@ -6,6 +6,7 @@
 
   Copyright (C) 2013, Red Hat, Inc.
   Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2017, Advanced Micro Devices. All rights reserved.<BR>
 
   This program and the accompanying materials are licensed and made available
   under the terms and conditions of the BSD License which accompanies this
@@ -94,3 +95,59 @@ InternalQemuFwCfgDmaIsAvailable (
 {
   return FALSE;
 }
+
+/**
+
+ Returns a boolean indicating whether SEV is enabled
+
+ @retval    TRUE    SEV is enabled
+ @retval    FALSE   SEV is disabled
+**/
+BOOLEAN
+InternalQemuFwCfgSevIsEnabled (
+  VOID
+  )
+{
+  //
+  // DMA is not supported in SEC phase hence SEV support is irrelevant
+  //
+  return FALSE;
+}
+
+/**
+ Allocate a bounce buffer for SEV DMA.
+
+  @param[in]     NumPage  Number of pages.
+  @param[out]    Buffer   Allocated DMA Buffer pointer
+
+**/
+VOID
+InternalQemuFwCfgSevDmaAllocateBuffer (
+  OUT    VOID     **Buffer,
+  IN     UINT32   NumPages
+  )
+{
+  //
+  // We should never reach here
+  //
+  ASSERT (FALSE);
+}
+
+/**
+ 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
+  )
+{
+  //
+  // We should never reach here
+  //
+  ASSERT (FALSE);
+}
-- 
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 ` [PATCH v8 10/16] OvmfPkg/QemuFwCfgLib: Prepare for SEV support Brijesh Singh
2017-07-06 14:29 ` Brijesh Singh [this message]
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-12-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