From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0601.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4a::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2490021A16E2A for ; Wed, 10 May 2017 15:09:50 -0700 (PDT) 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=HI+MUqDbZKSIjNnAoDkMS5KYvnN1cBFir4XQZiiq08o=; b=q3qFBuWlj3qT5B03u2ci0fIc9RIN4V4GT/SN1K5Q15cRiNrDbzXzAtX/S5UlK4lKbFk7GohS0Lt8Mnk8K2xOWBKZkeC83kGdZijSwwtY0sPTD61Iz5yQ7ylC5NF4qD1l+QqDmMslioVnUJhJDmSijPn5l4V9UYO5/wpL0S0AuJA= Authentication-Results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=amd.com; Received: from brijesh-build-machine.amd.com (165.204.77.1) by CY1PR12MB0149.namprd12.prod.outlook.com (10.161.173.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Wed, 10 May 2017 22:09:48 +0000 From: Brijesh Singh To: CC: , , Brijesh Singh , Jordan Justen , Laszlo Ersek Date: Wed, 10 May 2017 18:09:17 -0400 Message-ID: <1494454162-9940-9-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494454162-9940-1-git-send-email-brijesh.singh@amd.com> References: <1494454162-9940-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR21CA0051.namprd21.prod.outlook.com (10.172.93.141) To CY1PR12MB0149.namprd12.prod.outlook.com (10.161.173.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4cba5ea-428c-4390-5d69-08d497f1466e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:CY1PR12MB0149; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 3:VUhUSEqNwvsV+Hb178HKwyLR9oPF7nIt294RaABKO43bVMoWSbiHA8JU+XnWunfdgZLkXpNfT0Kv7NjAo+r6UH+rjcI3XbY99AZRGeUUA7x7iCKa4XhuYnk2laRIIMOithhXc+L5xwAj7tpYiIz3bqEo78nTStuZ4GPXcpmm5X1GcDjn8opOsVJOQJPVpursT00rzWxv80bXpRcUaETdCEnUxAccqKdi+ej0s/s+fMDxerB9gMTI5oRzj5JtTGnJ+2HknP8B2rBF03W5bG6BxhrZz7rGwTTN/cFGtx2zk+Hqao0QM6dmjkeIqLGE1+Lmnq51vLtoOzeB/FJXBOYw8aHuK74kNOg8v4NBYxZC5tI=; 25:7Ycyn/MbutVfy4mZGrLtl3PQrZKv6XDZAETrP2z+jr7Bn6CngDM0dZcmq5s/FfEmgcGk2J4BotUitS1uy6JvjcNDmdNFNYu72D9/LEMs/wn/AC7sPCLuL1yvcRTb8wxhUfrejtEGdvZknOw8xruLX11XwNHRBWjCJz/86UyFPw++8eq1p8WGNK1T/UQuyLp+j+JdKbjDo021qqCnEr1LVP80qnjJIh0qpNGVObrGc1l+zIir5qtGNqSEtZKr1F3fblTFn6xwxmwtAnMYs2Gh/LzKybR5euk/4+GKjnIr7bCy8nPS1gHa64PekRp683+BJLHmeJzIEisK90Q6+YfkhS7Arnhz61mVjF/2WdJUKa/aYFEOJ5YRGcx2ds3POPlk5pT8WRhJJnYDsNmyAz52evwwkgdLPg2vZj22RM6QdmSO2+LZTDsRxHe7cpaKx9Z8SMfqQ5nAD8kY44aufI/F7lWCAXLbCda819SocuIc2yg= X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 31:Mht21lU9IrVoY+5SIp6y6TDTg8sUmfrcOhID1Bhi1GgpQn2UlKBWFBUx3dXaN81Ab6zpbulmB0MnY+eCOWZmBr6yzO2k0fN/wWhliVn3hnIBW1HoqlR1+qd6WZObBJ6g02SCnlY5Xx9GO6UWW9rSST0o2W2VQbGlapjlkdkujIa3QaAOs7FWMy+Sa5ymEH3pHspMQDAVFZBvf/jVhrsKI9k6bb/MM1keD7v1QHHGTCY=; 20:jZJNMb/gIYAI6MXscONOVmVe29DwGaknhsToP7KU0l1G1Jf3AJmHQXPsOn8qGVOvfIAdm5Vz0Hlh4xUe1Ao9NJ7805rFRfwKMG1NlqXru1qtRuYf6asygV7yuFMv4pS6bzGQ+VAYi+BGxzm63JNswx4SDp7DsDB7aMJQLeuJZ/6+pSf1K8Z7aXDPN193tnySC3tMFTsFobweiuQvGGhKnlE7SuS7k/cRpANORxoyjg/e484gW4E55AHHJP8vQMc+xMik+ZdbhI5ugTLRQyYZ61hnmkIIySYe5vppHtDFUampi3VNiMBEgECM9Ah25inmLusGbqJDQDBWbKUtf42JuTH+uxMW2HDXLAm1Xpou9S9SDKEWiFF+bUhun+jtOEUzmaxLHEuplIkxINUizOlwEl8jd0KlSRxUFic546bRRYvNu580Nsn7QGkKO65VyWoRlqJ1ZVgLN3mdE7KztdvGXrfQjfV9s3dCIX7uoIcmjNICmGnANonpdHWlfD/v3hqS 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)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(6072148); SRVR:CY1PR12MB0149; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0149; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 4:x7C4gVPHXWg5iYV9R+KhXptC5OV3SpZfqL72IGqAMge8nr9mw/LrW5Kc07OtTJJxAVDuKl+pWwUSZkSzvZ1g48hinyYGtGRmiy+DwbKLeHt9bochwqQBgFlVeoEK8tXgtwHcRQfqStDHGpP8pryi9LvQQD8miOCyKL8OZKBZ5LiUKgr4k8m6BjhXZh+oIIzWxxHbOgFNJhiXqwsi/joFAgZcnMoil6EufaDKKR0mXlhIva8Vz/Wh0u3cMinQkHeY5i3/1Z44wIJNmpS1SfESeuJ/05GGQIwfRe34mPMV3zMMfX1c0KBMljsXWQx15e3fonW0wDxHK3DEBy63P0E1NmLmFD4Psu1WH5jXDFSYYCOfQciK9mYlLp6m+Jm6U8ACPFlOFTr11z6jniEgHdTLX2RtFFDO3wW/o6qeahVc216Zk1bPerTsvUpQHtGlQEB1j6qfANW+jD20X+VDcWWqHuSP4tYFNJF8f5lxC3zwX5s1iYoYGkntNtCy8bjozOKAqmQ1jRenQBoDUp1Dz2Nm7MDR6XcIWoq8z+FILJXil1gD+4ZBwV3+mXLx7zfG9SC1AKk62LYPlJeXKbPRqWVVy0qb9tpzKjh4HwGEiuUnzMVHyIyYug/K05yTyx2iMcLqGVYZHZHQZ6jt4jQQyDMUeIYcxdvirLNFgjAKHVqhGidp+WxxWX57/6TGF7rJmCPMcXYTC3/6RE7UefFd7yzO2kF6XtLEAy3FhGmc3uIbWfl2fFmGoYOgoTpaf6QbdepMJqPQ/VHB6/xAWDiOcFbXZ/CnSNYDXOyI+U2qKO62ZS12zz55u2nEiQ9GRSg2qJx2B1nttNx/fTkI1WsqMMIp9zoaWgevblKij3i7EzrYl6IzB3OOAHXvgovGXkiRsmjV X-Forefront-PRVS: 03030B9493 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(39840400002)(39400400002)(39410400002)(39850400002)(50986999)(2950100002)(6666003)(6916009)(6486002)(76176999)(50466002)(33646002)(478600001)(86362001)(189998001)(48376002)(110136004)(8676002)(4326008)(2906002)(54906002)(38730400002)(53936002)(3846002)(6116002)(50226002)(25786009)(81166006)(5003940100001)(5660300001)(53416004)(36756003)(42186005)(66066001)(7736002)(305945005)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0149; H:brijesh-build-machine.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0149; 23:9b39uBdP40h/V+YQo3lvh96nyyePJGZo5OciwIl2q?= =?us-ascii?Q?gbjgYm/N3EqAJj0tphxqypRwM/npzUhG21ejpWowO56Z0wYo23M2GD7s1AFw?= =?us-ascii?Q?pGRnVM6FjroBxBSD/Riz58nxcwyl6yPGSjnB0E78DlT1fvn9WBNQUuRUEvp1?= =?us-ascii?Q?mLJ83rrFsx3CgBi7tsXJH+KhjplUbsf119xghE55I++fpX7nby8uIjjqqGla?= =?us-ascii?Q?+np65Dmly3FC3Wbu7Y0dMv0h+f6Oyq0njVpGnJl4QQzXb6uokzvmdoY74NBE?= =?us-ascii?Q?7nr5fXFTn1GduJcN6wya20PA9H8yr4BfYoi3TLxpxcuFfsTmZzMcblWb0LuS?= =?us-ascii?Q?IxSGSdSw4/Rq3cmPOJ1807Z+M3/EMno8Oz5PTr30JJLM14k9rIfdI7zUaEZr?= =?us-ascii?Q?7Amp4r29b2JoNZUvARuiU6gmNt6MQiTM5KFbTejUiVsfUboLk42IbBxU+gDE?= =?us-ascii?Q?ZLw/GkagowYZ1q8SwXsyLRHANacd22YR86eEUrPfXgF4Tc1+n/b8rH3rO8aY?= =?us-ascii?Q?vjaEic6CA/u79ddvxr6QdBKsbyp9/9KmuyerxhM7fiDZwrgdxY+0acBPRvWf?= =?us-ascii?Q?wJ4B74LabExUIs/1Xnd59wmVjo1qwfqTMG2H28viy0+Rov52laieV9eEfSNR?= =?us-ascii?Q?MEA4g71auFsBmK7E0E4Y3hb3wnKshH3sIaw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NxULRs2Wv8e4DQcWHNdxpX5eqj7F+8oGul4fcWlJYIJmHw2+BChdhqSeaZ67zLzQUKIPGMpCQ+8qbXPgXC8XChoa+4kmg==; 24:twbM3fb32YRDD+0HDEXUej2YG3kTnNUayT3NBom6aMqX+8nG/fmaCOGDGUQOHkqaO7MrJ9KWqnn8KUc6ZK1IV1Y621jFc78iF3QPUVE/Dsk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 7:X6uiyn21CFxAT5qqjIGMeYL5BRMtfgfkBgrYha827ATgLJUsdSaQiXWg1Z8DbJJHRGKtinawDMKsJLhNo2tgEU52X0PQhpykjCHOBboKAFSd0I+5r4BuTUKNxWJhJ4m7mYI4A+tG0/YZpIAGu3SBvcqUP5B9z5FzMrkcgOchnQmtad+Z5qsWG69vZohgtMjB48HQYRCfUQYo6Mj6pfyH/lXKgvvGNMvyTP6XYSXnurW1S44CQgFeS0m2o1JVrJZrZ7S989CzKQzdoeryyugDYfvmBtKzCaR6P/6kCy5D5zJU20kq+Jat3AMa9vsmfSkgGNUEwyXLNFI0yh71wyP0mA==; 20:EOvoqO64FEcnc/kpER/v9bfM60I932ZaF3Trr0hIyz4z2jyngK2FL4BZASkUI4xIl7ECBRj5fvikztr5vM52Fn4cbW5u66eQSStPj6OPeu/EUUwWFYydw49f++xIf7bRRZCl/qqEokGLOaitI+MfPyjSHwQ32DS/Cui++mofyrQ2gviDysGej/ertpTz28iqapKZhDLaoxhV8S2nxKNNjaxkTvTTSCSnlOTMuwiC8uEyzeD2zu7BtpfSYpAyadnM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 22:09:48.3898 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0149 Subject: [RFC v4 08/13] 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: Wed, 10 May 2017 22:09:50 -0000 Content-Type: text/plain 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 --- 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