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 []) by mx.groups.io with SMTP id smtpd.web11.1654.1580857323583857410 for ; Tue, 04 Feb 2020 15:02:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=4XTmmJVw; 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=WDPUGBPq9SX3B6Ibm9z6935xHnkY2pj1i8adD7JLsYRWJoTY/zQKXuia5cwmTyFUyAHzqmojV+t+q19Sr7xa7CK0LPfzWyeB96ZNJBM4djAuSuHg5A5O40dHPYLNkAU+aZZ6ozNH+SmgLXTtQvucSEUrUySkm+33xH9SSARHYG2CecCEogq4pRAbQdDpQhg/dAE6d5sKwvuvUT1ru/6tgdJrDWyw4siPOfnCzuYH1KFyIyPfwJyoBXUZRTz5rn1A5j9ArGrkZfmg9vGYwgYuyk1u7H94khAF4u/8krhlro1MnlmgDcgBCZzw1L08EvyuOik22DGKp9xQVs7d5RayGQ== 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=vQKWDO71TeBMs1WJHDPb9J7fuQQZFiBY2jkyUoYYw3k=; b=BjDzQW5YHf7BkSsnalECSFD6wQ/jbOm6G2lch8lJqb34CU5tbVkoCXFnT9pezQJq0SE+VNrfL2PLpWW8Q/L3G1s+9dhwXkBBhHUBdrPEZSuPyuK6HW4B01U703xBLih3aKdorodDEFMLsnQsznJitoYyoCGLY4DXQ47ae9U0CJDA+i4Ib1RVYEe1iV0ZaeLW3QSEqw7YPk4Wf0k29npo+DAB05j59dwWTvQLyX4Uu9R5SxLD5+Cj6zzfuCm75h9lOgMjU5hZRKXfASS5m4k0jB8q+3ZIj5mbH5l3iEl8Klx7bnLo14x8dmtQ6d2T9iYvnxX0iFMeFsen/0wuapc9Lw== 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=vQKWDO71TeBMs1WJHDPb9J7fuQQZFiBY2jkyUoYYw3k=; b=4XTmmJVwOVj11BAXiPd5jZO5BTLeSXWCCuyRT/GgibbuPKE+s/eRovO86tSx6DciIiAq/ryN+O1geBq39trGG7lSITzSNp1h5y61eEeSVyq6lYH63AP6JomkS8TItiL56EkwTRqXiwh70+jno2puGf26k4cUHcIJnQHc6R5B0S4= 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 DM6PR12MB3930.namprd12.prod.outlook.com (10.255.174.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2686.29; Tue, 4 Feb 2020 23:02:02 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::a0cd:463:f444:c270]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::a0cd:463:f444:c270%7]) with mapi id 15.20.2707.020; Tue, 4 Feb 2020 23:02:02 +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: [PATCH v4 01/40] MdePkg: Create PCDs to be used in support of SEV-ES Date: Tue, 4 Feb 2020 17:01:05 -0600 Message-Id: <46e0301662e5cba91f39117e4dea2f72530f47c3.1580857303.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: SN6PR16CA0062.namprd16.prod.outlook.com (2603:10b6:805:ca::39) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:15e::26) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 Received: from tlendack-t1.amd.com (165.204.77.1) by SN6PR16CA0062.namprd16.prod.outlook.com (2603:10b6:805:ca::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2686.32 via Frontend Transport; Tue, 4 Feb 2020 23:01:59 +0000 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: 71dc3341-b2fe-44f1-ae18-08d7a9c63e0e X-MS-TrafficTypeDiagnostic: DM6PR12MB3930:|DM6PR12MB3930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 03030B9493 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(366004)(376002)(136003)(396003)(346002)(199004)(189003)(4326008)(478600001)(6916009)(81156014)(2616005)(956004)(81166006)(8676002)(6666004)(966005)(316002)(54906003)(2906002)(6486002)(66476007)(66556008)(7416002)(52116002)(7696005)(186003)(26005)(16526019)(5660300002)(86362001)(36756003)(66946007)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3930;H:DM6PR12MB3163.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX: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: 5IcwE9EHWyTZAImgQrYGUGsAn4K/np2QeYB4tVgDf8LWnPT4w8EoxnRFaJTZuFO5X5dDPu43qe0LtfsxbCNO/FoyDCJSbeEbeb7MTrFwp7zfw1r5TKBPsGxer8J3yYgKNqBWiqO+3bLd0WrFrbdISGSnSesJAFZn5+2KdvYewo/HCOS9h+87FrDgVdHZqY69rboBaAj73038V9dTk6KW5hb5LHArkMOcNqOtYoMFbUP7x59mGC/1Mb1BQjXES+PB0Vk2NivPfA4xay/UmSstEaEC/xTEyzlFBxX6ObHmVkykRHsgTZ1jhgN5+xmWomsFgGXiMSJGzoC4eCKNhIof2D4ImLv0lYcTyVR6zRBW4IEEjFyxEHikVFTPB7xMugueFrPBDfodpWA0RvEhCuHJz71nmLznKW13LRM6W4hO5PMCsKpEH2+OWF9Jo2x9RxGYk51KJi0EcSWhjzDbMgfK+hWQxJ1XNoCqmghi/Nhm1vdOMk0fnpajX+i5oVmL27htZY7rPWBI6gaq3KGnUJRRaQ== X-MS-Exchange-AntiSpam-MessageData: 8KGR1VAtlqpDZYaQJqE6jcTSov3gcv0SLR6lxQ29/Oh2syp31f+ULjhnf6y+1t7QytC7kTkBl7TVLkTiYSZJ5ySwWqIutTyE5Axx6xH3ojoATSYItcoayS2RzOc+KgjpS2Dg3RQWM+ttJN4G491ORw== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71dc3341-b2fe-44f1-ae18-08d7a9c63e0e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Feb 2020 23:02:00.9110 (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: Rl6Bi+M5bpjln/7k6sndFEmUA3h2CBJLURycHN+6vkeKpKM63fHEobzl4j0Lm14tbuCNzrd1sSHbfr4tARTYMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3930 Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Two new fixed PCDs 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 | 9 +++++++++ UefiCpuPkg/UefiCpuPkg.dec | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index e840cebe2eae..4474c4d5bd43 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -2065,6 +2065,15 @@ [PcdsDynamic, PcdsDynamicEx] # @Prompt If there is any test key used by the platform. gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003 + ## This dynamic PCD holds the base address of the GHCB pool allocation. + # @Prompt GHCB Pool Base Address + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0|UINT64|0x00030007 + + ## 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|0x00030008 + [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. diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index a6ebdde1cfb6..005703d8a3e7 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -161,6 +161,14 @@ [PcdsFixedAtBuild] # @Prompt Specify the count of pre allocated SMM MP tokens per chunk. gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmMpTokenCountPerChunk|64|UINT32|0x30002002 + ## The base address of the SEC GHCB page used by SEV-ES. + # @Prompt SEC GHCB Base Address + gUefiCpuPkgTokenSpaceGuid.PcdSecGhcbBase|0|UINT32|0x30002003 + + ## The total size of the SEC GHCB page used by SEV-ES. + # @Prompt SEC GHCB Size + gUefiCpuPkgTokenSpaceGuid.PcdSecGhcbSize|0|UINT32|0x30002004 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## This value is the CPU Local APIC base address, which aligns the address on a 4-KByte boundary. # @Prompt Configure base address of CPU Local APIC @@ -367,5 +375,11 @@ [PcdsDynamic, PcdsDynamicEx] # @ValidRange 0x80000001 | 0 - 1 gUefiCpuPkgTokenSpaceGuid.PcdCpuProcTraceOutputScheme|0x0|UINT8|0x60000015 + ## This dynamic PCD indicates whether SEV-ES is enabled + # TRUE - SEV-ES is enabled + # FALSE - SEV-ES is not enabled + # @Prompt SEV-ES Status + gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|FALSE|BOOLEAN|0x60000016 + [UserExtensions.TianoCore."ExtraFiles"] UefiCpuPkgExtra.uni -- 2.17.1