From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id BB96BD8094F for ; Thu, 25 Jan 2024 18:43:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=4OwhI5DRijkqLmisc6aFsPHXeTLI0/ynoFiqjN0uYv0=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706208182; v=1; b=JjY0qAXhJDGJzv8Nk+MNHG+1Z1az1Kz0JG5SE34jL2L3LXfbE5KagTeNV6WNEYc/mWLanLuM uoRbaosde8YKWLmgZWAFYEYgNBY8g+LgUXcM6EUi5uV9YHI8CFtD3INFYdG1BRlmvJQhXnJhVO3 /EQYQMiBZB/FqLqJDwO67DvQ= X-Received: by 127.0.0.2 with SMTP id JYpTYY7687511xyALE1H80i8; Thu, 25 Jan 2024 10:43:02 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web11.26576.1706208181308438100 for ; Thu, 25 Jan 2024 10:43:01 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="9641808" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="9641808" X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2024 10:43:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="736417012" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="736417012" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 25 Jan 2024 10:43:00 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 25 Jan 2024 10:42:59 -0800 X-Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 25 Jan 2024 10:42:59 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 25 Jan 2024 10:42:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RYYpQU97hI+lqo9MUUeOhWklRt7kL7sLxCkQRCikUt4sHU79gv2T+Rw74LAtYii6pg3KgoTteHd1T5j7Lt8Wse+5KKLrL+PLl1HhsGyvQKse4I3EsIh6mtwQoY729t8a67ixkleAP1pMfsznF27JuyQjmtENIkXFFhbHbaNmsxUNqYZoKB1871t1NqTtjgANUIqpHAf0/OZETHN+2dUQbSOjMP3RUyKUiszye36v3eLBoIbOJchmdcJ1WRxRr7Jk6LrlLoai6GT/RDYjAB8imyfF2uZbuO0U8SNN7yc/sPNvDZytu7TWj35hYSku9khM5Kaxgk/M04x614JPav7WzQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ca+Q9Ock7EYEq881+Ky9aFoiRpBPteDYWzlQNhRZCy8=; b=GVifx76jywOEMe8pSPKHxlkiDVglC/SLYBwkB4obn4nUHc1X0oEl3Dbrlm8W6nIelDsUNnzxYIrAjykalWaHbAnVi4DdvH+Gw8NH18kYWv9vlUxAYOQEot6g5tJtxu0lT6QgPbonZuU50qj+Wj0ewbncwSi0F5Wm6OQ/cQ8/ZU1NxL7MVEjwG14b6fNZFysY5Lsak5VcenL+OmdOKGoo+Vm74qh93SXwYHM0ru/fWD8KbYLq2aD5G3wNk4TQ1ACouAgCHQsRGWRocGaj/Ka/Agb5v1CBFxvB0qx7zdn0/80MGrZuUB0quhRJ/fZT+Up2qfi4yiSdmwMvZ5W4O1rcOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by SA1PR11MB8573.namprd11.prod.outlook.com (2603:10b6:806:3ab::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Thu, 25 Jan 2024 18:42:49 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00%6]) with mapi id 15.20.7228.026; Thu, 25 Jan 2024 18:42:49 +0000 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "kraxel@redhat.com" CC: Ard Biesheuvel , Laszlo Ersek , "Aktas, Erdem" , Michael Roth , "Xu, Min M" , "Yao, Jiewen" , Tom Lendacky , "Oliver Steffen" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH v2 3/4] UefiCpuPkg/MtrrLib.h: use cache type #defines from ArchitecturalMsr.h Thread-Topic: [edk2-devel] [PATCH v2 3/4] UefiCpuPkg/MtrrLib.h: use cache type #defines from ArchitecturalMsr.h Thread-Index: AQHaT2fdN7ScuuXFDkqzMHo+rV4F7bDq3ZFQ Date: Thu, 25 Jan 2024 18:42:49 +0000 Message-ID: References: <20240125082311.310203-1-kraxel@redhat.com> <20240125082311.310203-4-kraxel@redhat.com> In-Reply-To: <20240125082311.310203-4-kraxel@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|SA1PR11MB8573:EE_ x-ms-office365-filtering-correlation-id: f18db163-bacd-417c-79d1-08dc1dd56e1a x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: eCou5n8mDlFEGxeCGktTKiCjL9A6uPBGPij5USzQB2kVpaT0+JmlXau4BcqIJBwwT9azBnuz8W8HylIr0Kbj0jfL3+4Bc5cmTY/UWN8b6wCOUA/THxpehbn5LFlbEMSyw0DeLwTuXGb2DjuzbOWV1/ZJIVwBaHLTdKT/QgpgHS3CwpnPMRV5zV6m6DpgjOXR4F3QWAfzHGppnS8ctgNtVzgYyTbL3arUDRbdDv1nOrPKZMpSemnxQXLpCIBkMGLqtwdugOI4S4QyoPvrCYNHxvdmuEA0OyR6M6i69H/Ir6cD+8j6eXSuQFyEII61tPITIcSRG59CmW80DLugugNTtDUTwBfFg3s8LvEgSdhJ3KvI1csc5x0BQwSioFfo5Q/q3c0aAzn981psI8j5IRE9/d/y6x8gSbFhaqDVsQ7FWkoIirRIAcDS6X+KSksUljajWWKUkwOCNSz0ov6pVvIA36Xk5AGm3k+YBjulXQ98vcQdl0gMXTzS+w+aic3t48k1cmRRWuQLnnk/xWfIDTXc946K0TbdnqjkY0hNWYWpXSwM6vFmwR/elQid63/VqrA1MlQH9AOxd5oa1K+t4ZjNXS/+3sQtwYdSo3KLCaWoqeGfjVexiuYCNEdPHQ8BDrI2NoWJt9YqCgklop9l5TlJwQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/ym+1pS/v7iZ/amnva1f3u8ADpIVvX1BRfQMVoXTEFwwXTIlxCX8qeux2BWp?= =?us-ascii?Q?ovU9hPu+oSzq1lk7MNdo9WS+1gkbCFlb+rY6BdH8MjQHU3tOS3WsAMe/k9aj?= =?us-ascii?Q?ZWos8c+ZstehKxUkBV5c1qhe7NhE8l11DOUQe5OxgM5l5Ik8GYSJWkEK1QBS?= =?us-ascii?Q?FKcdqtcFV3stJ6I++gtg/LjsnZvS5qMnZEnBpownQN2yae99N51dVVEMI8gQ?= =?us-ascii?Q?mEHcUDQjjaUa6H2magZbRSSPejBTlCVw7B32ZlMdxRUhUzjxZ3xxIoWif0vN?= =?us-ascii?Q?FHD5WfMCvI8OCF0mjlzqRdZboO5vVj8DVGdYNK/WpFsrRJyO4KZKhwvNGXzm?= =?us-ascii?Q?3ttYDgpSR+Ka7Si6nULDjSuxVssPn1A4LJ3rVGRP5Bh2ze5Z110qq2d0oQHH?= =?us-ascii?Q?+1uvwFQq5X7Q+FFnjH2awUvFOfGo8UH/oSoCzZEa75sTF7Px/EL5/+DRg2sj?= =?us-ascii?Q?56YU8wyo3GUVhxolhANeoCdTzwJ77x/x96SWHim0hoDrUTuonX57zB/tdrRl?= =?us-ascii?Q?5KHIGlgZvqnlu1dZ3IKWg8YfYR3ew1+x8/FbpSIPITVKbkED6hSt9P4Hc92L?= =?us-ascii?Q?iIcURah/yy2NnTa77Kt8cuRXpUOz91paSA/LxWhyuLq/T209+PJf4bnFXGQb?= =?us-ascii?Q?JPTuhPTDcGyhOz9GmUsSNnhEVpHcFY1YjMl0UXvewOqtxoD0IIZqycxL2B1k?= =?us-ascii?Q?4GBddTPUKsj4RDFLQD3YmOETtm4aNzeuiQ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?ew=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f18db163-bacd-417c-79d1-08dc1dd56e1a X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2024 18:42:49.1825 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Tf8ZAybeTGqESTr/nZrLgqXPRAr6/Jq8MtKD8f8Ex2jqREITl/ZYio9Yi58ozItAmHfaubnKpdLgY5vnWrGb72F6S/DkCuWJp0LrCT+35x4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8573 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: WFi5WPebKRjuwqG8fLh3YP8ex7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=JjY0qAXh; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gerd > Hoffmann > Sent: Thursday, January 25, 2024 12:23 AM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Laszlo Ersek > ; Aktas, Erdem ; Michael Roth > ; Xu, Min M ; Gerd Hoffmann > ; Yao, Jiewen ; Tom Lendacky > ; Oliver Steffen > Subject: [edk2-devel] [PATCH v2 3/4] UefiCpuPkg/MtrrLib.h: use cache > type #defines from ArchitecturalMsr.h >=20 > Signed-off-by: Gerd Hoffmann > --- > UefiCpuPkg/Include/Library/MtrrLib.h | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) >=20 > diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h > b/UefiCpuPkg/Include/Library/MtrrLib.h > index 86cc1aab3b8e..c7d505ac06ed 100644 > --- a/UefiCpuPkg/Include/Library/MtrrLib.h > +++ b/UefiCpuPkg/Include/Library/MtrrLib.h > @@ -9,6 +9,8 @@ > #ifndef _MTRR_LIB_H_ > #define _MTRR_LIB_H_ >=20 > +#include > + > // > // According to IA32 SDM, MTRRs number and MSR offset are always > consistent > // for IA32 processor family > @@ -90,12 +92,12 @@ typedef enum { > CacheInvalid =3D 7 > } MTRR_MEMORY_CACHE_TYPE; I think the values in the above enum should also use the MSR_IA32_MTRR_CACHE values. >=20 > -#define MTRR_CACHE_UNCACHEABLE 0 > -#define MTRR_CACHE_WRITE_COMBINING 1 > -#define MTRR_CACHE_WRITE_THROUGH 4 > -#define MTRR_CACHE_WRITE_PROTECTED 5 > -#define MTRR_CACHE_WRITE_BACK 6 > -#define MTRR_CACHE_INVALID_TYPE 7 > +#define MTRR_CACHE_UNCACHEABLE MSR_IA32_MTRR_CACHE_UNCACHEABLE > +#define MTRR_CACHE_WRITE_COMBINING > MSR_IA32_MTRR_CACHE_WRITE_COMBINING > +#define MTRR_CACHE_WRITE_THROUGH MSR_IA32_MTRR_CACHE_WRITE_THROUGH > +#define MTRR_CACHE_WRITE_PROTECTED > MSR_IA32_MTRR_CACHE_WRITE_PROTECTED > +#define MTRR_CACHE_WRITE_BACK MSR_IA32_MTRR_CACHE_WRITE_BACK > +#define MTRR_CACHE_INVALID_TYPE MSR_IA32_MTRR_CACHE_INVALID_TYPE >=20 > typedef struct { > UINT64 BaseAddress; > -- > 2.43.0 >=20 >=20 >=20 >=20 >=20 -=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 (#114457): https://edk2.groups.io/g/devel/message/114457 Mute This Topic: https://groups.io/mt/103950481/7686176 Mute #defines:https://edk2.groups.io/g/devel/mutehashtag/defines Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-