From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.47]) by mx.groups.io with SMTP id smtpd.web09.156.1630513070864767401 for ; Wed, 01 Sep 2021 09:17:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=tAN//WS7; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.92.47, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kOWsE7UAnjYLRNOvwHbjyWYV8j37JzwaGDwXprmusWOnrfv2W93Y08B8WHE10UsC8geO4R6Q3BbIQnLIUSNK4v8sIfLQ5CWZGG+bE7+qGrUlPDYFe6wVWIILIPJ+i4Ssnob3MhkOVEKUXykN5qD5GIEvqKV+m5ZUV4HkC1RAO0Lw1G8TC4HRNcV523qT3QZICjd3k/HD48hfQ2TFNVgpNO9T5vQE7bUDZxkCZJHg1SIS//cQMD8XfSXP0oRrkQEWgdL8nPA6UN030CPWa6DTpIfJ+ei1NlrHFWVKDh45YJaapXS/i51fNCEEIazk7pf3hZ6SDBkYELxcZWWmuXnQmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jbglhkrZMH1ZVWNCh6Kk83BlMnocdUoPvNUvfVoyczY=; b=IA7nGWD/gsF9kAkfdKzxMESDMfLMJZ3Tofr/bvgOyfqTPKGKCJPmbi+HVZO/ov6s/E6oRJct8nGtavd9/fLRFialRKqipAIGro0YIY1BwJhewPIJ8Q/ErF50VPL7u81HCwrB90arQbKCT2QX5GdiIGDSlzb0t2lTKielcb4JvPeDAYjh+wKxk/TEKw2m6H6jr15SIj4c6Vai1epJh/q1fiIdRtU4wxUmmu/sp28mSz0lnv8cH9XQkzD+mvkAvZz7kp1pOvo/p6BYRken81KrF1q8nTI2bM0hXyrzi/+viV6uDqbJS1S3XaknTSI9O9kXOB3b99Ez2btWzn5l7+KkMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jbglhkrZMH1ZVWNCh6Kk83BlMnocdUoPvNUvfVoyczY=; b=tAN//WS7UOtax5u77TN4XFyk2Beb7/S5RQ3DPod71ECAZC2B/gseSz1il5cVb1al1BD4436PxNbyWEAqlYFQwv7sQDBsjPgpZnCDo4L+JlCOW7dQeBdsXcJWq5R2kmIYsgIBMcdI9hwNyW8vp+aAsa74AZ+KdRIpgC7FicV9LYE= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) by SA0PR12MB4512.namprd12.prod.outlook.com (2603:10b6:806:71::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17; Wed, 1 Sep 2021 16:17:49 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3%6]) with mapi id 15.20.4457.025; Wed, 1 Sep 2021 16:17:49 +0000 From: "Brijesh Singh" To: devel@edk2.groups.io CC: James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth , Gerd Hoffmann , Brijesh Singh , Michael Roth Subject: [PATCH v6 20/29] OvmfPkg/PlatformPei: set the SEV-SNP enabled PCD Date: Wed, 1 Sep 2021 11:16:37 -0500 Message-ID: <20210901161646.24763-21-brijesh.singh@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210901161646.24763-1-brijesh.singh@amd.com> References: <20210901161646.24763-1-brijesh.singh@amd.com> X-ClientProxiedBy: SN4PR0501CA0062.namprd05.prod.outlook.com (2603:10b6:803:41::39) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sbrijesh-desktop.amd.com (165.204.77.1) by SN4PR0501CA0062.namprd05.prod.outlook.com (2603:10b6:803:41::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.12 via Frontend Transport; Wed, 1 Sep 2021 16:17:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 09679de5-0555-4ca9-d327-08d96d640aeb X-MS-TrafficTypeDiagnostic: SA0PR12MB4512: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q9MfPZEQypPQ9URCUZg51GdotACJ2gf4IES6hIwlXqk9vKJjhsMLM4Sv9JndRsXG/0SWlwW/WeQApE45yg1SKDx+avnqsL/N2EkYpD2p3M8vX0/3l/2M0YytMNIIOjeaqocAsjDcH2iFmrBmuFxnVQPX92Uw4o2RZfLR3a9Aw9AV8c0I+J1Di35c5sHx4CXpX0uX9z/zNy0Hl5NQvtf0L9u+7A93epWC3p2eIaVgHGoBpPe1sLmVgIpOEY27zLLZeMpTOko5AV9g5JU9PzvwIsRLXPPheN4FzNBX0ww2eVsPH/v71ca5U+YrW8DPjEfp9RjRvRwdoiB8K2yudDp1E4ZkrPKvcuPAU5OEgBHM2l5N+6wzjD8xEuhoAXSIB1dK3ws8zqhN65YJ/9oY2+5gmBI4Mpy09h12cTn+c/SdYdHDLrYBRaCQpuyOtK7rRFBbrznIOBVtSvyyFkbJ67ZnqAGC+Q5B0MSKweEFPwdy0MV0RdQW/n3k1E4Uw0xMKWe25cw+bUChSjY75hvQZreUD50RphQr36RM0ihc+64934YwaIfxL0N/dG/We604RRiJGDNg/Aq+9h08pZKA+YEgcITcFgHscPUHUndAx933ilpWJwIMoQcGFoiEHm4h/Ma7RcGFeU/U0jvm4EWLbbUjxcJmcVKeKslWbVpHCn7HQ2gr3lTiddZAv3RH3GJtDMIkqm146rl4mu/0ItPj1c757JN1CrWc/6geC08hok9Mu+9mrtk8fWWxvzRrO1iNVUKXOAKcNugdgDxBX0xruTM6fiTIUL0EcCSd/MCZ6aq734s= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2718.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(346002)(366004)(39860400002)(136003)(66476007)(66946007)(66556008)(4326008)(478600001)(316002)(26005)(2616005)(956004)(186003)(83380400001)(44832011)(5660300002)(966005)(86362001)(54906003)(7696005)(8936002)(36756003)(2906002)(8676002)(38100700002)(38350700002)(6486002)(6666004)(52116002)(1076003)(6916009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+qjjoMRoKetEfwwGVN0uE1X3OLFoNNibdg4KJ+0dda8zNT6II0+o1jJe6Tf1?= =?us-ascii?Q?+vt5kbcFPtnJ2ARRsEipUxOlg7D2ccWoz5iVO9zX5hcycRJZqo3jehaCY99U?= =?us-ascii?Q?sOFLPoKJ2IEFcpBZkL6FsZTDyRHHT3o7LyK06o8XpvPBDCJrYfIyN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ludr+d4VYyYyLrXfdvdcn1ASQbmr5?= =?us-ascii?Q?PrRuKR3yGdZ7n9TS1H/BrS5zVDgFObjBssejGzBzwK5Gy0H56No+/EFGnSW6?= =?us-ascii?Q?ApWeeqIleIkxiowbIXsVEfHjKi18vwLWDG6onK/O/YI+O823XXAUgcjWQx2l?= =?us-ascii?Q?/SCV19ORUmXN/M73XOjo29X4uhEcFvyyAeJhpxedsKEQIAmcojsyuUi0xYe5?= =?us-ascii?Q?08UaWENRWxjeeMwPG2JykUr6wSa+TJaC+R/RTuTUlvYI0s4fq45zWak/0ESx?= =?us-ascii?Q?nnqmtpBXnnPnCUWID7Qv2rcJ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09679de5-0555-4ca9-d327-08d96d640aeb X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2021 16:17:49.8539 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AAadJBbxMOg1qxbYku0S2M6ZqGWyocyRno+tYbi84ku7Ap2NA3DNH/5QhCIwdwpPa8ZTr8oRs3Iv5BLAlDWasw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4512 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3275 The MpInitLib uses the PcdSevSnpIsEnabled to determine whether the SEV-SNP is active. If the SEV-SNP is active, then set the PCD to TRUE. Cc: Michael Roth Cc: James Bottomley Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Erdem Aktas Signed-off-by: Brijesh Singh --- OvmfPkg/PlatformPei/PlatformPei.inf | 1 + OvmfPkg/PlatformPei/AmdSev.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/Plat= formPei.inf index 67eb7aa7166b..c8c89ab648d0 100644 --- a/OvmfPkg/PlatformPei/PlatformPei.inf +++ b/OvmfPkg/PlatformPei/PlatformPei.inf @@ -106,6 +106,7 @@ [Pcd] gUefiCpuPkgTokenSpaceGuid.PcdCpuBootLogicalProcessorNumber gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled + gUefiCpuPkgTokenSpaceGuid.PcdSevSnpIsEnabled =20 [FixedPcd] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/OvmfPkg/PlatformPei/AmdSev.c b/OvmfPkg/PlatformPei/AmdSev.c index 391e7bbb7dbd..ec577ef3efcc 100644 --- a/OvmfPkg/PlatformPei/AmdSev.c +++ b/OvmfPkg/PlatformPei/AmdSev.c @@ -33,6 +33,7 @@ AmdSevSnpInitialize ( VOID ) { + RETURN_STATUS PcdStatus; EFI_PEI_HOB_POINTERS Hob; EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob; =20 @@ -40,6 +41,9 @@ AmdSevSnpInitialize ( return; } =20 + PcdStatus =3D PcdSetBoolS (PcdSevSnpIsEnabled, TRUE); + ASSERT_RETURN_ERROR (PcdStatus); + // // Iterate through the system RAM and validate it. // --=20 2.17.1