From nobody Sun Dec 29 01:41:52 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 1495466652183519.3565671747249; Mon, 22 May 2017 08:24:12 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 59EC821969FA3; Mon, 22 May 2017 08:23:46 -0700 (PDT) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0626.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::626]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1414321969F92 for ; Mon, 22 May 2017 08:23:44 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Mon, 22 May 2017 15:23:41 +0000 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dkefI+x12yMzsBe7nVYmmrTWa00dSEyqgmqjuF1OMDk=; b=yAWD5mychgLGWa/7ofgCzpGItbWp9dpDCaAav1x+tQsI8+otIS/8UY6p+IUGLK0RahrQ9+REby+XlJh7NcPfL2H3PCVYT02iIi0nYZPGsWcgGQxvnVMdkDLDKdGtqb597i552gbwgRpl3+E4cAPbJsb/kDGx5kdO3eS/uPL6wGI= Authentication-Results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=amd.com; From: Brijesh Singh To: , , Date: Mon, 22 May 2017 11:23:07 -0400 Message-ID: <1495466592-21641-10-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1495466592-21641-1-git-send-email-brijesh.singh@amd.com> References: <1495466592-21641-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR17CA0030.namprd17.prod.outlook.com (2603:10b6:404:123::16) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR12MB0155: X-MS-Office365-Filtering-Correlation-Id: bfcc7480-dae2-4b8a-7617-08d4a12687b9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 3:9tiHQaBkPal5MqsldCoPsqItLgpZxbbtjdL+LsWRyrS8WTDZzRv6QsZJzdUZW3h8XA5O0I2IT11t+t8B8gEJbDgEAlrXVih/3/I8jNHjxYPK8rQli6cbA2kFc6ODlI78rRWb42YuArM/JbdUJIVwAGtBl0xc9jRZwxpg/FFZPVa6l736hfmpMDLBjtkAjPt0n0OdrRaOJBl6gwHJMI5I4PHB5ZPSXcqmmRM5T6t9+ySQS8dOfOgNrSeLXjxG3sYszZQeShcdtUfXuXri+o7GxWIicd5vWR9XffYiFV4Xs4eqZZwgjQCIugiJc37jDXmXe/1CrZyUH8MRvwzsA6zbNMQrHNoAhHorv+YII01Q2Js=; 25:p7m1Zx8MVNoGyAqhKLM8M4SK/o/YcBJa5LoM8ENpKgh/cjAbwlvSbV4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eVtA44tP/DeGEkP/eHPr6KxszQKs04qxFThv+6UQvxGmk93JWy5C2I+eNrXv56VYq7KF6+T6rWMXJECVy7JNtTYG+6Op5YWZPfBIqHMVYdeJ4Qbj2lXn0V5RPgEwfTbIZqBt3uVvg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148); SRVR:DM2PR12MB0155; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 4:fZPTPaxzywseXviOLJbkNJ42dtfKsAGkJeQNGX85ZC85zoqsCTBe9LtBUiebzQhHOiVhCnXyM0P+WeHp6bHBeczVwuvr6ZZqb+LPfFDXJbM1SHz6+kbhjJmTzWHg/1issXIN+5jrmeVMUQOwbOO9wQi4tK7GrexjpLOPJldsNhi5FWk6A22nmPxj95x5EKnVrHrReBrQG5nzYo+FdwxJcZOVlg7AdyKv4p5tyI+YTF5VGqWKBlLw4Qj1Jrwx1TmM2NLxy7RFUroXlbBDJMM9UnqzYVRcAnGdKfNA5/LBWOnopOvc0x2lPaPovKQ0TebU2XLV84TDq+Es4O2vn4/xx3cgvnPyR8jRgYxTfp0t/342/wLCV+vw01PNSkOydvPazVshrO+qsw6k8m8jiqXuQJ7bN0EBAi5pCcjQiAfn8DRcuEpC+r32vNB/EzOwx3g2UTm/kY2S+0V3B88bIZBI+ws+H8LtxQDZjhk1BaRgXsHJ196021r7n6E4O21AZ6kpBD4EkdwSHeSiCLuvHRb8ixlFbrPGfz54M8Kzuhu9wUzWoikW0gP1XJ+kL5zW56SEa602YEgKl6l/EpwV3pcmIzf5gF/813KwV03GEmCzY0LLc4rI6tBfMAnRTvJqP2246pXBAHTliIq8F1ng4/Ifypsq9Isbk9KFPcoB39pMtZfZzpYTk9Lb2r2xgYhY6sSyxAJ9m1tCggEYcg+SpHABHJNKFjZxDYvItoZ5hfZNFr7HQVlEkECpY5kjOVVCZVK5EJdyIO1r43qYcHffFy4lCj4MtlByV0IRu+AMH17dojCsN/3M/Kogk60wAQUCGOW+icDCG+VvYldWtst3SB7nKFqQ3Ou3auECPVBnRugSEzDR2zfChtId+KvCoZvoRsYc X-Forefront-PRVS: 03152A99FF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39860400002)(39850400002)(39450400003)(39410400002)(39400400002)(6486002)(5003940100001)(54906002)(6666003)(2950100002)(36756003)(53416004)(42186005)(86362001)(47776003)(2201001)(66066001)(2906002)(5660300001)(305945005)(7736002)(50226002)(38730400002)(3846002)(6116002)(189998001)(8676002)(76176999)(81166006)(53936002)(50986999)(33646002)(4326008)(478600001)(48376002)(50466002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0155; H:brijesh-build-machine.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR12MB0155; 23:3VTNunl2Vni8nJqnZ0qt3xcNjRDxmNglHIRXXXaxl?= =?us-ascii?Q?I7aHnDfLkg1M6ObCByd1WYJ5K4d2Bas/AFb7QkAvfQzYBx4NKFAceIg2iuNp?= =?us-ascii?Q?iK49b8t1niWw95MHtyl6LVmwEG1RHh9Ee3xoWcUaaQhsl0wXgCcr4EXF9Drx?= =?us-ascii?Q?ICeduQy3NE4OZGgIndU0mZsogwkL3Di9LrhZbU0Mn2b7o27WSMUv72sbBC8u?= =?us-ascii?Q?2Tem9dHoAeNnrp1A44uGOKJbT0XrSzzacl5qs8AsLCYsm7jJh2iHxDkb7zvS?= =?us-ascii?Q?syDU1owoolRpqFX9Bn1AABkh7mhh3pC0NzdqIWD4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aTAcOh/7VECU2Cmzdel0aJ+QSrqpS2Xpbs81lvcA==; 20:oQb3RC6jKaN83bsUWYJhBnA1Qa7A4yTYd1JAYUwMCCEu34EECX8NkvhTCuIseBqoQuJ7KjObZJJZqxIZZM5e6zUu4wEP39WkOxHeHNl89Bt9KMsixxtixrN/ieG9hTqeuZaY1YlsPSq40+xPHUVBnL7xZ86RivPcfdxlIGjClB7OBdp+L8A3bfRYbFeuUlQOh6CwllQBL8/s+uSkO/H6kQkB4KGpcSHETwiT2bpwjvIDypM+jupQ2LClLzbLgEmu X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2017 15:23:41.7271 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 Subject: [edk2] [PATCH v5 09/14] 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, leo.duran@amd.com 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" Add SEV specific internal functions which will be used while intergrating the SEV support into QemuFwCfgLib. Cc: Jordan Justen Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brijesh Singh Reviewed-by: Laszlo Ersek --- 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. =20 Copyright (C) 2016, Red Hat, Inc. + Copyright (C) 2017, Advanced Micro Devices. All rights reserved =20 This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this @@ -43,4 +44,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[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 --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel