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.web12.14624.1574285583311790426 for ; Wed, 20 Nov 2019 13:33:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=AYsE/L2L; 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=AU/GYU4UwV2OA2YWWev9z1NJjBGLLxoG3bzPM5qQsArNIjDadoByfnq2dtUi+A7qqNy1NtPqO+045fMcIANAEYfVGb09SbnXoXZsIyMwXoDCsw2H8sroz6wOtYU8ZCD8nk9/D810BArH6ZptygycgKn2v/AKJAAOsFwz6cuf76a/XgaY9dSZmiYqwJJrNHzbNCqDKSvbbYtuSdw/PBCAf4WAKSf/Oe3r+Sm9uEkBInrfQC9dFi1y61E0vehE/LKeGLH55qojfczmN09fhzOl5oNjNB3cCpwX3rtbEnWEmQg+JhW9o5heVklLUKdhV36e7qjbiIhp8Xhdw/O6LNY3YQ== 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=BkvcZhbaXuDF55kJy/QjBoUI0Kkl9S/wNTgojcSkqpg=; b=HmYCI0X5HJjA8/i40p47qK2ubRyQ5sWpXZ9tIU9VM4XwUJZYM96WQQXGuhzLBcI2WvoymkVM87sAUPhzxsfDy+/xZ6T5BfXk0IcZpRT/h14mTvvUTrlzbR64HHXzMP6uOhruonU6Gz6bDsBcW89rheigLr2ahz+r8Ehdv98p9NggoT6ZcJVPA9IKIZ9t+BLtk1qso5EmcWBl/2SIGwvZmfgPrrUvWN/k34c4r6hjxLkQX9lqbaGxuAVYIfmKAeJAvH+j6O3wnUjBSJGgHevQdWhbn23kCEnbBZvfmqffKsw2xwzGY4DdL4sr94Ob8aPHcLt0/x2pBYX5sGJEzcmVlA== 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=BkvcZhbaXuDF55kJy/QjBoUI0Kkl9S/wNTgojcSkqpg=; b=AYsE/L2L65uFTpDqi615fhcsHUTSZgDN9BX+ap6pALoZMkh/og2ZWP9kR3SjJXmzj0hugypgq+RAHd9T/y1W9F0UpNfnF+Aitf3V8SRQjwmQX4NtMCvO7287cRdpM+wMrBnmRWclaaka7HzIG3KEQ6gAhOl24P8TK+I3zPT3huw= 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 DM6PR12MB3514.namprd12.prod.outlook.com (20.179.104.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.16; Wed, 20 Nov 2019 21:33:02 +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 21:33:02 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io Subject: [RFC PATCH v3 43/43] MdeModulePkg/DxeCore: Perform the CPU protocol finalization support Date: Wed, 20 Nov 2019 15:32:49 -0600 Message-Id: <29e56a05142c936ebc8528dbf896de1fb9e806b0.1574280425.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: SN1PR12CA0065.namprd12.prod.outlook.com (2603:10b6:802:20::36) 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: 4f20105d-59c5-49cb-c2bd-08d76e0138de X-MS-TrafficTypeDiagnostic: DM6PR12MB3514: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 02272225C5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(199004)(189003)(50466002)(66476007)(66556008)(966005)(8936002)(14454004)(66946007)(48376002)(86362001)(25786009)(52116002)(50226002)(51416003)(316002)(16586007)(76176011)(6512007)(386003)(99286004)(6306002)(2906002)(26005)(81166006)(81156014)(186003)(6506007)(8676002)(478600001)(6486002)(6116002)(3846002)(66066001)(47776003)(5660300002)(2361001)(486006)(2351001)(6916009)(36756003)(4744005)(6666004)(2616005)(305945005)(6436002)(11346002)(446003)(7736002)(118296001)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3514;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: TV478Z1eRrReBYQb+kU68Ez/ibr+58Q8l26VR6y0+o3h1IR5RcMarrXef1cvadNlaNM3NQOZKROVMk/d3KOtfSNz8DGeVzIGhwtTuleiSzgy0KjLuX8B/3/NuRecQFzHJiNZNRbweMvvX0UhzC99KUNRNq8No3MeKUAl68c7/QOKq8T1CwxsyaAUoIL66nspEJ3GFZN6otgLGOkzmG6FFS89rjxkPt21JcG2vSdL2Yf6FzoP/wEWtR5lPvVjO8cLufT+sTLKQj4CMwkncyNnKZQkzvAOwvZD3mvQIvIvUUGiuOAAz9zf2Tyt7lXOnc1FH7di1WDqRPKWS7WO58rVA0D5iDCjVgZWp6VWzBpvfzNPM0I8fzVP5r29lsrCwGzU3mI+2bBe/edGEyfZXFuyZKeltsdNqbfs6ZAdbrohFgs1B1xZjKqnOrqwRPSUYPYRHP7PS3sOxebDqBWvEKiToP2GFtTybg1FOOrlz1JqpsM= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f20105d-59c5-49cb-c2bd-08d76e0138de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2019 21:33:02.6998 (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: f8ToKQ85SsiZNokLwms09geBpHrZJK/R/7saXZFvKziEbNIqAs4tcozwh64Jr/9Actwkr6SL5lKSmWlOxZFs7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3514 Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Invoke the CPU finalization function when exiting boot services. This allows for DXE and the MP Library to properly setup and park APs for an SEV-ES guest so that they can be booted in the OS. Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Cc: Liming Gao Signed-off-by: Tom Lendacky --- MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 514d1aa75ada..13c962247243 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -785,6 +785,11 @@ CoreExitBootServices ( // gCpu->DisableInterrupt (gCpu); + // + // Finalize CPU + // + gCpu->Finalize (gCpu); + // // Clear the non-runtime values of the EFI System Table // -- 2.17.1