From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=lZIlhlS5; spf=none, err=SPF record not found (domain: amd.com, ip: , mailfrom: thomas.lendacky@amd.com) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (NAM01-BY2-obe.outbound.protection.outlook.com []) by groups.io with SMTP; Fri, 20 Sep 2019 06:16:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VV+33t1oLdRLQ7uVweZBOBd2bBtitnkXA5sP8rZc4Nf3OoaHKHSMS3vHvLtzcP2j1lZt7ZF8OpDmQvwQUG3w+6hDR2PJtm4OMKG4q6GNwGsmFyL39vyDZ0Sy9nPlpPuLPqkHBxrxSpMI2RcPvnzuX25/5KGaeedy/c+DJX1cVZN9sjARMCjY2sPYxT2Zp722FWvVmPggV28x0twRO3ItPqx8CuqeW6BW2xc55bVJMhpWqNgNcVzyrM4TAP/90k+f/kiA0je/2F5ajsNaJ1OCAJSruF4ieVRFvo2Sm3rdByLIo6UW6DEvMCHwfEAhy4n0TLqsm1L5IwP6lprjzNm2Vg== 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=TNSXKIhy9SXt7XBl+LBk8TieUo8naZSH2pkTEAAxvA4=; b=f0DQOio10hIjuh6+MAtzXr3ioRdA/Jqsl/29rRpcnXPij/S8WZ8Cca3TDix8XflG/ck9/3YuXTFziiOdlr+Z/civfk3UPWsCjX37VEbd+1tyC+WSBd1Uq4FX1NIauHne6D4HR7cJIjvYBXKJD2byXWbEZVhZMJg8jbhVD6eKxaqXkTkqHaYk1dQGhfLtgRO6NNygxGPXyThwGupVzShjBO7i6UMGQTjKzyHMTSNvc57tvg2LRhO+qpq+I3MpgtPQ/2dcXWgdNudhOKbVFP31ZWh6hTv6ymBgaAOq0CzURzxKYhjVXkR8X1MxoKsKNAqksFHcSScqmQGCBkxWs9j5KA== 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=TNSXKIhy9SXt7XBl+LBk8TieUo8naZSH2pkTEAAxvA4=; b=lZIlhlS5DhwUwckRIvORawHavKZNC/vtC/atGOnvy805VaXp9+oKfU1uClaUD2aBWfgxjFzIL2X9wh4aYKvh1SEhhlp34REUtb/+pZspOtx59XgpLac/SDjMIaKmCUcNtBGvhIJqlGqnGgStN4CJzLiptjD4hM9KyDJhaLXdlOk= Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.104.150) by DM6PR12MB3995.namprd12.prod.outlook.com (10.255.175.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.23; Fri, 20 Sep 2019 13:16:48 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::400e:f0c3:7ca:2fcc]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::400e:f0c3:7ca:2fcc%6]) with mapi id 15.20.2284.009; Fri, 20 Sep 2019 13:16:48 +0000 From: "Lendacky, Thomas" To: "devel@edk2.groups.io" Subject: [RFC PATCH v2 44/44] MdeModulePkg/DxeCore: Perform the CPU protocol finalization support Thread-Topic: [RFC PATCH v2 44/44] MdeModulePkg/DxeCore: Perform the CPU protocol finalization support Thread-Index: AQHVb7Wor0tq/Hw6LESyIx/lfeWQ0g== Date: Fri, 20 Sep 2019 13:16:48 +0000 Message-ID: <1c7c0e223a852994bfdb0ca82b3804e8ddee5e19.1568922729.git.thomas.lendacky@amd.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-clientproxiedby: SN6PR06CA0023.namprd06.prod.outlook.com (2603:10b6:805:8e::36) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:182::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.78.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0c2d7f97-a976-4ad8-de7b-08d73dcccaa2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DM6PR12MB3995; x-ms-traffictypediagnostic: DM6PR12MB3995: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 0166B75B74 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(366004)(396003)(376002)(136003)(346002)(199004)(189003)(118296001)(186003)(36756003)(99286004)(6512007)(966005)(2906002)(25786009)(66556008)(66476007)(66946007)(50226002)(2501003)(26005)(52116002)(76176011)(64756008)(446003)(11346002)(5640700003)(305945005)(6436002)(5660300002)(7736002)(316002)(6486002)(66066001)(4744005)(8676002)(71200400001)(102836004)(66446008)(6116002)(256004)(3846002)(2616005)(476003)(478600001)(6916009)(1730700003)(81156014)(71190400001)(81166006)(14454004)(6306002)(8936002)(6506007)(386003)(486006)(86362001)(2351001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3995;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-message-info: +Xmwnz2v8X0CpHD6GV1LiROnBnoYo7PC2uaHRhJx6vXyolInLykUMvhCJhOUTgbqIn5XhriIVOaoAQWzkagWyutAJ0W3/8GvHi+NS8HKBypHteHt1MTSUMkLNJFEGW50MeU2gJO7DSo8M6PRwmWcSUsBrW9bafxc7cUJWv4K58gUQyGbyFlsslsYqp9futGQRvyE9lj6/FY7QKzPNpFFO2B0Z57cmt701fl9e3L8+pX40jujkKz5vKlEYbMazJ2CbJ6fJi/g9LhaDYsXFkWJOtC43FevptdUQfqw1Bcf9Holp2NScY+q2y16wY7WJ+A94chbkpXTKO2lyNL68aZs0NRZtG0KHqUNMnW81EiyvtKJk3jWBnh5mZCJDMlrbtpWHHf/Zn3Ev5O9x5OamdsGayL/YjXCzMmthl2cwVdbDuk= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c2d7f97-a976-4ad8-de7b-08d73dcccaa2 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2019 13:16:48.1177 (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: o+/1tqQC0vx8/cpjEfALo7mK7dMSE/6BoCKJtDc1rZFnSPM+e/D3gWRzTciIO+PZVGVby3UV6fDen5cm7H8L7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3995 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <242DF55424463D4F9C4549E0D147C915@namprd12.prod.outlook.com> Content-Transfer-Encoding: quoted-printable From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2198 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 it 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/Dx= e/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); =20 + // + // Finalize CPU + // + gCpu->Finalize (gCpu); + // // Clear the non-runtime values of the EFI System Table // --=20 2.17.1