From nobody Sat Nov 2 10:22:53 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1493138192412388.4987692862903; Tue, 25 Apr 2017 09:36:32 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AAE6E21951C86; Tue, 25 Apr 2017 09:36:20 -0700 (PDT) Received: from mail-oi0-x244.google.com (mail-oi0-x244.google.com [IPv6:2607:f8b0:4003:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E70C521951C82 for ; Tue, 25 Apr 2017 09:36:18 -0700 (PDT) Received: by mail-oi0-x244.google.com with SMTP id w12so7958475oiw.0 for ; Tue, 25 Apr 2017 09:36:18 -0700 (PDT) Received: from brijesh-build-machine.amd.com ([165.204.77.1]) by smtp.gmail.com with ESMTPSA id j17sm9666356ota.24.2017.04.25.09.36.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Apr 2017 09:36:17 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vbehmsLBsi0Y+GtUtFyX7bc7EfA+ZpyaWgDyREgHToU=; b=An/p8iCJWBs2Oz+whx2KYvCd5zpO3UkhAJhuDil2PT9dSgxIHkkTpq94hAp84K/F4R F2M/MpG/rvtUYOUiNmPWKtzPqajsnBFL+cyGQnmnRw2TyG8Y94t1UYqS0YlS/9FThypE F/rlr/M09ENY0rWnYUcsZoL84b56k/Z+DSSjI43IsB2LbBFmJhHC4davuJuhVGVVD2Qh lu+qaunQaL806JXRWFnxj/+EaBNaXw5IGSf/suYaxLdhBoxJ75hQzlQOVItfbfxs6fMt cwqIFj6QdJbDCQBAew0Mu/77hYlw8ja22Q9GHXfMIocSTo175SvhIK17L8O5SgS4RKIO Q6UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vbehmsLBsi0Y+GtUtFyX7bc7EfA+ZpyaWgDyREgHToU=; b=aaW4chVzQkl2Esk3Lz8mWMRDsPWCS/RdMEo1y2a/liQ/EuCHPh5Lq7lIDLAxPgIe9s zO/FQyw30gof1vAe3dPxQ5U17GR6xJU7FJ2BZjccdiJjhWFU4xS9FxBrTNGPkKU20hgU M1YPd2IZZkA10fZrXYXt5o7Hy/N8ynFJsPHO21PfkTVA/OB1AMqaE2jWWAtNS/Y+5H9r sig7E4/NLQtyEYtqbCQWTISV0rVChz0xQje0bJRcJz/WVqsZiNPpwRjkvwvsaaY/4vMP z7KxgGy18P4K2JRbrYbdebaP6znrLpLsl7Vxsih/B6KQCbBAHOEmhg3UuQAxN5gWPtF/ Oeyg== X-Gm-Message-State: AN3rC/6VqFy6P0WjM+RB7B88xcqJcWLsMY4OQFxoytmdu4sl0DUkP4Gv epKPSXE3evvrBg== X-Received: by 10.202.175.23 with SMTP id y23mr17869307oie.155.1493138178175; Tue, 25 Apr 2017 09:36:18 -0700 (PDT) From: Brijesh Singh To: edk2-devel@lists.01.org, lersek@redhat.com, jordan.l.justen@intel.com Date: Tue, 25 Apr 2017 12:34:18 -0400 Message-Id: <1493138064-7816-10-git-send-email-brijesh.ksingh@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493138064-7816-1-git-send-email-brijesh.ksingh@gmail.com> References: <1493138064-7816-1-git-send-email-brijesh.ksingh@gmail.com> Subject: [edk2] [RFC v3 09/15] OvmfPkg/QemuFwCfgLib: Prepare for SEV support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.lendacky@amd.com, brijesh.singh@amd.com, ard.biesheuvel@linaro.org, liming.gao@intel.com, leo.duran@amd.com, jiewen.yao@intel.com, star.zeng@intel.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Brijesh Singh Add SEV specific internal functions which will be used while intergrating the SEV support into QemuFwCfgLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brijesh Singh --- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h | 36 +++++++++++++++++= +++ 1 file changed, 36 insertions(+) diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h b/OvmfPkg/= Library/QemuFwCfgLib/QemuFwCfgLibInternal.h index 6e87c625102e..87573ff2fbe3 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h @@ -43,4 +43,40 @@ InternalQemuFwCfgDmaIsAvailable ( VOID ); =20 +/** + 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[in] NumPage Number of pages. + @param[out] Buffer Allocated DMA Buffer pointer + +**/ +VOID +InternalQemuFwCfgSevDmaAllocateBuffer ( + IN UINT32 NumPages, + OUT VOID **Buffer + ); + +/** + 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 --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel