From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) 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) 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) From: Brijesh Singh To: edk2-devel@lists.01.org, lersek@redhat.com, jordan.l.justen@intel.com Cc: jiewen.yao@intel.com, leo.duran@amd.com, star.zeng@intel.com, liming.gao@intel.com, ard.biesheuvel@linaro.org, brijesh.singh@amd.com, William.Tambe@amd.com, thomas.lendacky@amd.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: [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: , X-List-Received-Date: Tue, 25 Apr 2017 16:36:19 -0000 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 ); +/** + 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 -- 2.7.4