From nobody Tue Nov 26 22:26:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46103+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1566301167439471.3056282832043; Tue, 20 Aug 2019 04:39:27 -0700 (PDT) Return-Path: X-Received: from NAM05-CO1-obe.outbound.protection.outlook.com (NAM05-CO1-obe.outbound.protection.outlook.com []) by groups.io with SMTP; Mon, 19 Aug 2019 14:35:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g/O0dZ/wZ0ysu8KJSsF1tFn8WHGlUINxK1A0R6dWIxfACl8wR0XWF9VkrvReqyzgQRneT5laXfnd/G4WS4tFy3IJc7seh29A+qmhLQcnZ1WFcC2MuKHD7J+E/rrYaUyb480aSvniXNUNcP0dGxn+zK9iAd7OaoBlZReiWkKZF5UuJT3RGIMhPAXMwGkN+0J8zFYwZtuNDxnA4gf8RwUBAgldWPJP8TRkT1OaKnHL9lD5CjbPaeFxlwECuyaU23v3b+lwLc+OyASHgGxyF3BptoYnori2sJe4DoUSJIECTYeZ1pb57Awm48htCMIpCD1gKJepRIOIbWmseBVQGn/CEw== 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=tkNsWWZ5R0C/BCPQGn3a7qld1WCg1PCSBosb59WiJFk=; b=ghOWugwEtzaA/4xjY4jArIgrsoavrF77bhQV49mAp/ezq1OFXfZJRhhl4LbK46WyrSReeVDasBCDrzQjK2NUR73fNygyBfipBU08T5un8xZ4mKQYxR2vnULaIbgbNiAA16J7XSQG8/4ZFjOmWjnXpN6QxxrhU5SUz8kOn/fUsWazec47mhDtgD9S2GltOqTbNjL0SfmtumVF/+VG2wM71WAKDgukGepd/hQcAUMJ9HqqjwI3JmlztFj25/tgx5FOoeVBN5HBRuQeS3ZdLkPobiPho8fEy2dWqTWt/Mg0HBoRVH9jOdM0utAluRkkNKRJPH383ox90xd4nXpkS5NzDA== 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 X-Received: from BYAPR12MB3158.namprd12.prod.outlook.com (20.179.92.19) by BYAPR12MB3112.namprd12.prod.outlook.com (20.178.54.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.20; Mon, 19 Aug 2019 21:35:48 +0000 X-Received: from BYAPR12MB3158.namprd12.prod.outlook.com ([fe80::39b9:76bd:a491:1f27]) by BYAPR12MB3158.namprd12.prod.outlook.com ([fe80::39b9:76bd:a491:1f27%6]) with mapi id 15.20.2157.022; Mon, 19 Aug 2019 21:35:48 +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 , "Singh, Brijesh" Subject: [edk2-devel] [RFC PATCH 01/28] OvmfPkg/Sec: Enable cache early to speed up booting Thread-Topic: [RFC PATCH 01/28] OvmfPkg/Sec: Enable cache early to speed up booting Thread-Index: AQHVVtYQwtbGWnPlRU21i0AUmukzUQ== Date: Mon, 19 Aug 2019 21:35:47 +0000 Message-ID: <6a37c84f4989304b21205d6263c6491f81da3233.1566250534.git.thomas.lendacky@amd.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN2PR01CA0031.prod.exchangelabs.com (2603:10b6:804:2::41) To BYAPR12MB3158.namprd12.prod.outlook.com (2603:10b6:a03:132::19) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cdd0c0e7-2f03-4be7-d5a8-08d724ed32ce x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: BYAPR12MB3112: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46103+1787277+3901457@groups.io; helo=web01.groups.io; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Ral7ecc9Aqqgr4xMF2c4nIM7taCsg8BhywnIhhlc+cRzuxerx4EqiNoR3YkxN+eDBJaiX9l0rPYJqmEIWprOeq4+gDYBzTCPDsHkLQVKHy8OWHASVVzu9Nbj50CypPMb94HVluteuiPzyj8CVzqSVfzmQ+IyAJNShzG2fSLqjXIZfLB+tcLjD2o6h7Q6SXjZA+YEDo/3Gq0NoleveHVZ7gj7cbxPeyBBms/7Nz1YMqiEM0W6A3DkjWrPxm9b1mYvglR6QrkJcB95iEp+O+g5+4WcDJR+7KsxrsK5/GYa8J/RL7q9FRrQZWyEauGoI1Ylexp2+3JtE5JhjjN/HQOVs9FEGAc31T0PXWKBTuIahN8b/rQWNfkRd02/M6NBehblB963Ar6GUsPKUvwN+dJkRSpth1Gs1JccSwEJhxUT8ww= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: cdd0c0e7-2f03-4be7-d5a8-08d724ed32ce X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Aug 2019 21:35:47.8327 (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: IBY6nCsTSIMSd5u8kgyNvORpIufRkSjDakHDgRdpwuJNyITFzuKxF5e6WrTIhaqS3ykiu9N/aLBcijt/6q3jgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3112 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,thomas.lendacky@amd.com Content-Language: en-US Content-ID: Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566301167; bh=uxse9TKNuZuMlwLk9Yv1bj9KmISHyCqzjUc4D7xj+Rw=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=p8VBsEeH0ZazVkCYAoeWQHCZJ1GuWsMcwDFjK6XMQA6A3QBcQAoAGVr+vf2585avx07 Po8e0vXS61AAl0I9Ph1XeItj9pjMb65N7LrfxsEAsImxD3bAV1EuhUFlHb1dD030kjXM6 WLhKHyNkiACsZntxdtz7nFBPe0TPbHfA1uE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Tom Lendacky Currently, the OVMF code relies on the hypervisor to enable the cache support on the processor in order to improve the boot speed. However, with SEV-ES, the hypervisor is not allowed to change the CR0 register to enable caching. Update the OVMF Sec support to enable caching in order to improve the boot speed. Signed-off-by: Tom Lendacky --- OvmfPkg/Sec/SecMain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c index 3914355cd17b..2448be0cd408 100644 --- a/OvmfPkg/Sec/SecMain.c +++ b/OvmfPkg/Sec/SecMain.c @@ -739,6 +739,11 @@ SecCoreStartupWithStack ( =20 ProcessLibraryConstructorList (NULL, NULL); =20 + // + // Enable caching + // + AsmEnableCache (); + DEBUG ((EFI_D_INFO, "SecCoreStartupWithStack(0x%x, 0x%x)\n", (UINT32)(UINTN)BootFv, --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46103): https://edk2.groups.io/g/devel/message/46103 Mute This Topic: https://groups.io/mt/32966275/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-