From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.55]) by mx.groups.io with SMTP id smtpd.web12.5445.1625057672335157513 for ; Wed, 30 Jun 2021 05:54:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=Gv6w34jH; 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.243.55, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B9SSNU1ClvbfATFLvsJJv2BBG7r4WBSfFsMtC/AkmOm2s9AtJvlCpuxPvwgd+0bL+PA6fZ+KmywKuyV/qCDmjvvKJfA5k9ZV7uDnNpiscHsNoYMxubEFIdML/iSgFPaLszJjYY8/CZIOaZ0vzY/J97lVCFvREFvg3RO0IOIDb8ru+kvgmq/dvah/4erVoM9zcYBtL0P/7nzE07xfig0Tz7+KPehgPKK4sKrD4DRfCj0O6ztcCUsOwYF8BqOwMx7hNl7lyHoyPPOx8uIfXcHLCpdULx4PTaMXp27/t54brxFk6c4K0LPRk5Soo4JoY0t97iW188t9/6KHdbNfkuxgaw== 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:X-MS-Exchange-SenderADCheck; bh=X8iJK0RA6H7zy7+jojiEXmYOCznUQhp9pLOxxxw1hJw=; b=P9cCTr/arFTK6744eiXgg/jGqIFPhAn94n9T6aWev95uiVCsi8VMV9Hc0ZXb7O79Z7Oe5aUuDQqabMAbSamD05aivBMPQ5K6t8JE+zp5PWihfxW0GnBfDzw6f3jcUFM81hLZERLFxCB9OUuNnU6y7Nzf0piPfpWhFJZE9EeXBMzB/pefihJmQpqlMde+fvLYZZV/68LmuaJg8wkEsN2+JqsgLlFrXgLpJXUrkRIoqgP8rTmfUbpLPaUQ+pbuHyylRc5gl/9REa/CWVsuYEI61ULLHEG8mA58Q09ZBCQPKM/7PQIjVc2an5leQ/s5HQM/HpMt09gHl6Q6D4m1SnEAUQ== 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=X8iJK0RA6H7zy7+jojiEXmYOCznUQhp9pLOxxxw1hJw=; b=Gv6w34jHUn6JxveZupjYUOF0EKZ2qTNpxy/UnP+Oc6MKTNxmFQue8/LCXdKwIiBrU2ifXrDicUA6uFSdvqq1scDXIZZff35sM9IvohnhN1jyij6HY+oqdHe3UsSQbaPwubo8Cj+kaV19SAHwraRTYPDORDbGQED6ssC2S23vy+o= 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 DM6PR12MB2714.namprd12.prod.outlook.com (2603:10b6:5:42::18) by DM6PR12MB4170.namprd12.prod.outlook.com (2603:10b6:5:219::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Wed, 30 Jun 2021 12:54:30 +0000 Received: from DM6PR12MB2714.namprd12.prod.outlook.com ([fe80::7df8:b0cd:fe1b:ae7b]) by DM6PR12MB2714.namprd12.prod.outlook.com ([fe80::7df8:b0cd:fe1b:ae7b%5]) with mapi id 15.20.4264.026; Wed, 30 Jun 2021 12:54:30 +0000 From: "Brijesh Singh" To: devel@edk2.groups.io CC: James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Laszlo Ersek , Erdem Aktas , Eric Dong , Ray Ni , Rahul Kumar , Michael D Kinney , Liming Gao , Zhiguang Liu , Michael Roth , Brijesh Singh Subject: [RFC PATCH v5 20/28] OvmfPkg/PlatformPei: set the SEV-SNP enabled PCD Date: Wed, 30 Jun 2021 07:53:13 -0500 Message-ID: <20210630125321.30278-21-brijesh.singh@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210630125321.30278-1-brijesh.singh@amd.com> References: <20210630125321.30278-1-brijesh.singh@amd.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SA9PR13CA0018.namprd13.prod.outlook.com (2603:10b6:806:21::23) To DM6PR12MB2714.namprd12.prod.outlook.com (2603:10b6:5:42::18) 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 SA9PR13CA0018.namprd13.prod.outlook.com (2603:10b6:806:21::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.14 via Frontend Transport; Wed, 30 Jun 2021 12:54:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 010b21e1-a470-40ae-7602-08d93bc633b5 X-MS-TrafficTypeDiagnostic: DM6PR12MB4170: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jTBOPU3/5/jvFi06+FI4hACBgf5r/jMgNWh9Imh4MJUZCk6iEeygUqdoMLcwvCzjmvgEEl1ZAv7/xw3gg+4ZM1f2dZ4Db4azfoes8lRnIGEp6UL5OH1jejiGcarKnYwq2bBcZlxsysYgSNPDYm+QCNHJzAm4LgFPTQj3NcZfvoOEj3FCSnnXLo7MaKd3iksHYAf9DrKDpabtLRe6IqutO346bVhKfStlzhxHaumBnxQfCz8oQrfYsw04OFP3wgXYnLipJ5nDQ+2eQ7qlWYBIxKKL65amkdppdbgvhtUFVt8LiGpxjt16g/YCt5XrUdYw1W3kWKU3Tf3hH11+TclwSxd1vIxal90VNy+vhmn4Bt9Sr12gSI13KMwfD0LGQZXXf/UAdYxrG4i9coxGQ0ww7cH4WL62qKllqTEwAcmMm+6lg9SgWvbRNj8KFpUY73o7fpCLzRVFzGJqfOrTtHa/X5Bfn9gOJ8+qOpkbjw2K8P/o5C4DryCf4aJQZM9L4RREx8QBXFJf662l7lm6LO9bwN1ra2gc4s7gwVnpLFyuA4gakC3ZIoh0VXhWgiFSQx7JA/0SVDllDV5Wd7nk/iVv4+GwX2ashuj54wz4HY823CvcgDQMHAQsDfg9qam/aLYsY2e46KXcFP2CqSsIpaAgH55N5Ocy3Mzv0SJ1EJnMx+Rr41tEAsniZxnLsSDUw9JgwaJrHroPoTm8EA5cGtyZ8iCEPI7fPnq5L04CxxSGPEZcjjmWvgZbqK+9vgiFXj1MYOSXZ4lTWfdROYjX50qQXqoaP9SvhBPEh0w4HpZ7EYnJBsbGxXCSGpQq3gU07XLT X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB2714.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(346002)(136003)(39860400002)(366004)(396003)(5660300002)(86362001)(1076003)(186003)(16526019)(6486002)(7416002)(2906002)(83380400001)(6916009)(66556008)(8936002)(4326008)(44832011)(956004)(478600001)(966005)(8676002)(316002)(36756003)(26005)(54906003)(38350700002)(2616005)(52116002)(66476007)(7696005)(6666004)(66946007)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?aEr72y2mHX5VR3rwIjeF0/fgJOPhPXHErLWndhNPD/QNK6q5yxEimaeRrojG?= =?us-ascii?Q?d4CJ4+9huPeuyXsqbQeBWg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X3GGh?= =?us-ascii?Q?ybz5s5Dn50Birqkf/C3vvQMN8aFj71VPbl2gbvzogU9Xaq8uCLTt5InkjNQR?= =?us-ascii?Q?O4wB+3pLaL7jesSevQ8NWWb3+8DDRSyeedWf5BMPRiIJjPBqmW7B5cocL/Ym?= =?us-ascii?Q?N9dL0O4z9zSLCVnmPnkGjpS+masveS6a+IxszMVpn2JqWINJIh92A5gIwVtT?= =?us-ascii?Q?b0IRHuLnVn2boHYKbrM+eRtt8yUphkh2ElNt+iCsdsQxxlX4HDD+rg7fCJev?= =?us-ascii?Q?TWV25CnfhksLLWvI0Ik0zRQDStcZIB2emG5J5nsffcj0pu57XYacu8jdbb5s?= =?us-ascii?Q?JqNKvm2hPTTmMig8YSZBX2rG5ckecuGEPLCO7XmCllESgpWMrVIZJPr7LR3F?= =?us-ascii?Q?roMss7VdCIN/JjiEaBU6qJ/f?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 010b21e1-a470-40ae-7602-08d93bc633b5 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB2714.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 12:54:30.8108 (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: J2pV10aS3oFGYZWUfwkCaBD6fSFoGBw9y2evWuKqQ0pqj0PnIt2gd132b4Lw2SCs2WVFlOz9Qf4uE8q65NsNxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4170 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: James Bottomley Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Laszlo Ersek 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 89d1f7636870..041b3262ff3b 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