From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (NAM02-CY1-obe.outbound.protection.outlook.com []) by mx.groups.io with SMTP id smtpd.web10.13506.1574280439944511918 for ; Wed, 20 Nov 2019 12:07:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=FyI8EEzS; spf=none, err=SPF record not found (domain: amd.com, ip: , mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fGijrcpshsY4TLhGC1oH42vhOKnxy+DOWSvx6bcbXSTIImpurn1sc1vG2mhjAHB6D11um9KMg4zv97z3Uf2z0nOAR3vi03mcv85hxIj2MoFJ6zjAbe0qsSbRG48Yklgf9ndlAQrfxF0dZ5/XCMjgMuDP7SgRSt0ayXniBhsUkaWnIydA/DGwpAjEI+V6+tDadukhQRh650XfWS1Ip1kwnLKHXGXPGFcYOUZpEqbbgHjVXyuL9l/Xdo3EONA4VQLSd4rOxl1Hg99coFsouxwHKShK1G4km53aA4oJnnsOEY+zzYZmuYFmLhTr9I7AzOhCnlqdY3Dr/zrVLiUZyIb7MQ== 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=UeLbOt3Dw1iao6brCukrShzjHql9QjOtMc53lcer2qU=; b=JLFCec52rVJp5HDpxcSLSOO3kShWHGqgmd+8+fmBt0E0vY1kvMJCiQQ5fbx/xK0Tcr5Ty8rDIult/l9uakcxFhUGVUqaGLzbI8kCSpauQ4t4VUU9DS8GG4bXq/40pl17pFmFjZZQBnrpdp0WXdDcmcMRNaopMPwbqQV4VvyzQTh5EbtO32xjn1GkgjKwMVAJ3GUibf6ZO3VGCtOE7jJDwx8qwNnXXpnSOnWFUhfcEi+UOcqQO5Zn4cyAsoQgj5CILdD0UZKWhwjEnZNJ4TpxLmH8aTfbcpODIpAnBMQWD4wBLuvNUrHW6SG35hAxxdkcZhxDuXmN64ZHnOPFjfCcuA== 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=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UeLbOt3Dw1iao6brCukrShzjHql9QjOtMc53lcer2qU=; b=FyI8EEzSySoycWk6krmBvabcckQJr1iqpfdND+FPoffxKBjdlGUb73b0iGnlAdSOOa3XNl5sVU/YiSZxTDQ/CVoBk7nKwnXmQ3W9gnnWj7VMHSJ822stc/Z4QSGTCF2pkHLhkhZgSaohsg8xQpH/2rYGajbmxo+2QL0gLvtO6Kg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.71.154) by DM6PR12MB3675.namprd12.prod.outlook.com (10.255.76.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.28; Wed, 20 Nov 2019 20:07:18 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::dd0c:8e53:4913:8ef4]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::dd0c:8e53:4913:8ef4%5]) with mapi id 15.20.2451.031; Wed, 20 Nov 2019 20:07:18 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io Cc: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Michael D Kinney , Liming Gao , Eric Dong , Ray Ni , Brijesh Singh , Jian J Wang , Hao A Wu Subject: [RFC PATCH v3 01/43] MdePkg: Create PCDs to be used in support of SEV-ES Date: Wed, 20 Nov 2019 14:06:23 -0600 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: DM3PR12CA0087.namprd12.prod.outlook.com (2603:10b6:0:57::31) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:15e::26) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [165.204.77.1] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1c811c05-3788-4d26-13ae-08d76df53e88 X-MS-TrafficTypeDiagnostic: DM6PR12MB3675: X-MS-Exchange-PUrlCount: 1 X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 02272225C5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(346002)(396003)(39860400002)(366004)(136003)(189003)(199004)(7416002)(2361001)(50226002)(81156014)(81166006)(8676002)(2906002)(6486002)(99286004)(66476007)(486006)(47776003)(66556008)(25786009)(2616005)(476003)(54906003)(11346002)(118296001)(8936002)(316002)(2351001)(7736002)(305945005)(66066001)(6916009)(86362001)(16586007)(3846002)(6116002)(48376002)(14454004)(478600001)(966005)(5660300002)(66946007)(446003)(76176011)(36756003)(51416003)(6506007)(386003)(50466002)(52116002)(4326008)(6436002)(6666004)(6306002)(6512007)(26005)(186003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3675;H:DM6PR12MB3163.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iVGY2nLT4Ph6gjUAjILYRxED9gNAmLcDsFQewxtHglP0AtoeOK2DUzcMbsZ/vo3wHxyVGJQEy3WsaKI1Hymh4OWTZM6weXq7LCLWqUHdoWWHh/vDdigKcCvGmpGKWQJxjElbMcFgMiKWVbDcqL+KQvO55IQwumPuWvbZArcDeIpqAhheZNnd7lqjUf+6dagGbZjwIH6WZF8apKieXjvhjFNeM0V4a7+q4YrVHkZxY7d6UXE++S/qAfGsPSAty6EKsqWdtHY7sEs2jgRSJ+MSOBhBZg3B/Dm0hY+a/09t7BBrgllDeCExc7H8+zwT+EtFAYhtC5wwmzwvtSxZj2+WvtzoseUuDVMS6RClfq9u8ZMoPK8VQ/a2PiqIr0/jKj+B8ls6UEW1FcJv7YoG8jFGYmrN6eXB34OWi8pY387DC54i/9MvooCOzf6nHQI+23wtdf9K8jXBqW+wzI0M+MsrnssCflFlpEAmbaH5QVQC4VY= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c811c05-3788-4d26-13ae-08d76df53e88 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2019 20:07:18.1304 (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: 0BFUL0G0SCoA1O0+Xw6gEzeXqWCWeJ4bQrChfTpqNpbVWQNFiJd14BZxFe+FkrQgFS/IOVnIleQfVMtsXuttUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3675 Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Two new fixed PCSs are needed to support SEV-ES under OVMF: - PcdSecGhcbBase UINT64 value that is the base address of the GHCB used during the SEC phase. - PcdSecGhcbSize UINT64 value that is the size, in bytes, of the GHCB area used during the SEC phase. Three new dynamic PCDs are needed to support SEV-ES under OVMF: - PcdSevEsIsEnabled: BOOLEAN value used to indicate if SEV-ES is enabled - PcdGhcbBase: UINT64 value that is the base address of the GHCB allocation. - PcdGhcbSize: UINT64 value that is the size, in bytes, of the GHCB allocation (size is dependent on the number of APs). Cc: Jian J Wang Cc: Hao A Wu Signed-off-by: Tom Lendacky --- MdeModulePkg/MdeModulePkg.dec | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 41b9e70a1ac8..c3bdfcc80971 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -1037,6 +1037,14 @@ [PcdsFixedAtBuild] # @Prompt Enable UEFI Stack Guard. gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x30001055 + ## The base address of the SEC GHCB page. + # @Prompt SEC GHCB Base Address + gEfiMdeModulePkgTokenSpaceGuid.PcdSecGhcbBase|0|UINT32|0x30001056 + + ## The total size of the SEC GHCB page. + # @Prompt SEC GHCB Size + gEfiMdeModulePkgTokenSpaceGuid.PcdSecGhcbSize|0|UINT32|0x30001057 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## Dynamic type PCD can be registered callback function for Pcd setting action. # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number of callback function @@ -2053,6 +2061,21 @@ [PcdsDynamic, PcdsDynamicEx] # @Prompt If there is any test key used by the platform. gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003 + ## This dynamic PCD indicates whether SEV-ES is enabled + # TRUE - SEV-ES is enabled + # FALSE - SEV-ES is not enabled + # @Prompt SEV-ES Status + gEfiMdeModulePkgTokenSpaceGuid.PcdSevEsIsEnabled|FALSE|BOOLEAN|0x00030007 + + ## This dynamic PCD holds the base address of the GHCB pool allocation. + # @Prompt GHCB Pool Base Address + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0|UINT64|0x00030008 + + ## This dynamic PCD holds the total size of the GHCB pool allocation. + # The amount of memory allocated for GHCBs is dependent on the number of APs. + # @Prompt GHCB Pool Size + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize|0|UINT64|0x00030009 + [PcdsDynamicEx] ## This dynamic PCD enables the default variable setting. # Its value is the default store ID value. The default value is zero as Standard default. -- 2.17.1