From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id B0E5E7803D1 for ; Tue, 16 Apr 2024 03:31:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=m6HmwYFer1xvwgEEVtDuWhYIwK3K6JdWj3fd/8EVGcA=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1713238262; v=1; b=TR4K2PHQ4tbIscS7SaKJeIk0i2odP1Ov+O9bli5LIT1wz5tBs/Hpaf0KcVh9AwqBJvhkoi8k YLDpx7RczOpovVzAhI2N7oFaj8rICFprEZLB37ac40p9ysm20ud016q7FRGqfsgeSdX0Mjzxyts 3qi3oYPOYLYwqULHHFT1/fA2+/Bp1td6CVywYco+42C+rIeKgk0yayLA9doiRwJtvaQkr0o0CYU dLLTdgsiREs/aK+6E0ydjTpWcS0YXXgCHu5O9uyxxlJ7Rjt/nZtqi76T7js77B88DBgWO4Y4WwK PeJeXbKZEqE29jlr5U49Yj96iXalRa2i2FIzbY2Q4zYUA== X-Received: by 127.0.0.2 with SMTP id PhdwYY7687511xxxrZdPWgOl; Mon, 15 Apr 2024 20:31:02 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mx.groups.io with SMTP id smtpd.web10.11739.1713238261470368335 for ; Mon, 15 Apr 2024 20:31:01 -0700 X-CSE-ConnectionGUID: WXSqYYIeQKC1BVn+on6y0w== X-CSE-MsgGUID: JWIsvUOyThGpcUU20//Rvw== X-IronPort-AV: E=McAfee;i="6600,9927,11045"; a="8819473" X-IronPort-AV: E=Sophos;i="6.07,204,1708416000"; d="scan'208,217";a="8819473" X-Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 20:30:57 -0700 X-CSE-ConnectionGUID: cK4MjslORYOJEp82kaLoGw== X-CSE-MsgGUID: V3KuP5SHRXGruCTLTePAUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,204,1708416000"; d="scan'208,217";a="26683233" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Apr 2024 20:30:57 -0700 X-Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 15 Apr 2024 20:30:56 -0700 X-Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 15 Apr 2024 20:30:56 -0700 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 15 Apr 2024 20:30:55 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CY8PR11MB7135.namprd11.prod.outlook.com (2603:10b6:930:61::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26; Tue, 16 Apr 2024 03:30:47 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c%7]) with mapi id 15.20.7452.049; Tue, 16 Apr 2024 03:30:47 +0000 From: "Ni, Ray" To: Chao Li , "devel@edk2.groups.io" CC: "Kumar, Rahul R" , Gerd Hoffmann , Sami Mujawar , Sunil V L , Bibo Mao , Dongyan Qian Subject: Re: [edk2-devel] [PATCH v4 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg Thread-Topic: [PATCH v4 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg Thread-Index: AQHaj6fbrRGaar6LmUehgubDaiqX0bFqPYSl Date: Tue, 16 Apr 2024 03:30:47 +0000 Message-ID: References: <20240416024251.3173738-1-lichao@loongson.cn> In-Reply-To: <20240416024251.3173738-1-lichao@loongson.cn> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|CY8PR11MB7135:EE_ x-ms-office365-filtering-correlation-id: 43a23165-862f-4bfc-881c-08dc5dc59b7a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: WpPOoDEL7n8DM1cXUyk9mTu2ukIHh+5GaqiI8abXm1x6g/VnU6JDyi7D8rMuMXRLaxIcD1Pfq/+EH0dyJ+CBNOlkUnCIL5mFRwei6ItXsqFUUSWkfO8rEl1MIKIP8J1HwR91t0oThh2M8SwWt+WMGVQIF1Vcux5NNTjH6Y06URUp/1rWc3QZ0FCIohsJ4wa/gjqjIAsUPTQbfA27a7Fsffj9XW4S+nhqm17Cox50zDtkNesIcNyQrUiomLMN2TgXzeOJTdZdj4PIOs5V+kudPNJbmls2UO5p0FR9SlCikoDH9dnnrZYXCsuU/a+hGaX0+QOJOBGbSh3nzsFnXYe1O/i7Li/zkmUcG7RVNp8A0Coe/VcPUSjrEav5BnAj1I7p8ZeMEBmsKxuorxWUZBEpCtbkr/XG984EZ0SKckHMK3SMXCxzuGT7X9aK0KZwBbhDG1MgmSLPX4zWYKuVvmpXLF5DzzPG7wiqKy+jBzlAvtCAv4oH1ECbRdrbsWw2S3zVUWyLI17RTYPhC0h7nFm3bx8FUTV82QyAtWtDyNzlOe38VeJs72Z9hAB9YCudHqdTlBch1wd0mIvVYbJfRExzJcGxQkX/KFvG0I4nbwswB+DzXV/JewbMYRxgIY/uvhZL4IkvBTVTQ7eT55EpmDVqS6qNfR03kr/QQ8VBseWMZg73Le0haWQt7kETOxMGnM1u x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?62eyqWsrBy+vwqNbkTyyQwBI+3+L0znkePWo73H3AbP/zjZ9/riZTBvnr+?= =?iso-8859-1?Q?fIvU0PaDD58n5Vd0ayX2fUoci2lvE92A0PB3DnDETb/Kj848WcouLukO5i?= =?iso-8859-1?Q?yXw9vUwTNnLbdcRSjpIHItw1RiXfxLA/KWJwbueJmWYAgEVS59U0s4c5hS?= =?iso-8859-1?Q?u9C5XVgb6UXnmIDFVOj72Fw04T9cb1BhzyR69JoEd0DzIrzZMmYywQIVEf?= =?iso-8859-1?Q?45n1zUJ1ZQl/qd4WXqeAZA/V/fj0AYszPdzHwVlmVHmbg+E1R8dIgP+QZu?= =?iso-8859-1?Q?XD1M0KuD/J9HLaMHdq4T/RMkefXhd/TZ0V7THnq76ThN5iJhl4XBm5u5w1?= =?iso-8859-1?Q?YjovItzTSeu/Vo6cqzUqUi08E9+tBl6BChXc9dZ3Oi7XOY5CCRVObmJWqH?= =?iso-8859-1?Q?lwMk1Atz6wqfPL4PugRFGKq8GGONkFmU+q1CycY9IrrVlUtRRCD80G1VCt?= =?iso-8859-1?Q?0aS9H1rf5oBOyd49Ykw/IWhdcFUESLE02ZdqdMr/g7vuazhM2YqEwhXbzq?= =?iso-8859-1?Q?z6p8ykqX5y8Ucvv96acGS8M752o75OlyKWa1Pv9LyPLfY/ujY5hErDXJpk?= =?iso-8859-1?Q?gQD1UDvUhfOB6TELvEwW8mzlqEjCURGmMb7uRFNOiabncP23lwv1rhil6b?= =?iso-8859-1?Q?lU4PQ+Rb8NMmiba6NsaGGwUkZRexQdH2QiS9Tpjx0INWixrz3M4xP5Elk0?= =?iso-8859-1?Q?zp/wSkx3GVcavSAemCzpo4/Ke9spUzSpmaRLwwogIACFjYGES5qnpDBuPd?= =?iso-8859-1?Q?gxWpFejg9es1LniYIPNed0wqnM9ZK+2eD4PV5lyHYOSZng4WqgthODfCzN?= =?iso-8859-1?Q?wuemil3p2VmPp7OCJgf9qUtUGmvEVAyOM/AkgsHyOnFXVr1ckWUAdDa+2A?= =?iso-8859-1?Q?KW5VSqIfDPgY+LHZ3O1Rl/Ma4oYXquIwXfeYo51hg/Ync0yuuyDFdhGf2+?= =?iso-8859-1?Q?57BkZs5OWhDRVO+8hJSHSq7cUPcTPuUOn5OHI9uvEd7WrKQz8ULa7dXcB5?= =?iso-8859-1?Q?rw6HPXFrsSUqDtX+jXwsEfV1cmCCFMXKuVEj4soIru8tSZxVQv/Q3pSQzk?= =?iso-8859-1?Q?uFZWd7f+97KzMFrv38deeAOQ+hscZYmu0XGQv0IjjQz34Bu4iXHqoW+InG?= =?iso-8859-1?Q?GkwQE0wCKOGPyptStCoNNS5K/XNfuQZrFKMqW7kysm7PP5P2mcfED7fuic?= =?iso-8859-1?Q?t6kSiKCFmoy1o8IttWXsGixc87ZbV5YawMzOe50ecLy5cmwpMv9pca8wTh?= =?iso-8859-1?Q?C10RN+Z29wR3bkcDUSuPeKnxkn9bcBWhjH6sbkA4ZS/O9YUkK+YwmtbzfS?= =?iso-8859-1?Q?fBu65ZdU/Dq3AR7hJQj1fJSiNYn0vofMJQlM5/Pe0SYKk9imXtJ9arO/9s?= =?iso-8859-1?Q?yHu/XOv/bcB8qTeHygGYK/IXdbKQ3r6AHtY2kJ9sxmKOiKnkJSurOb2gQF?= =?iso-8859-1?Q?N52OYpDRHEQZE1+JRhnRZcHzkQnwuekYktNXUOKmNUtHoSqU6HhakmaOWo?= =?iso-8859-1?Q?BSNYiKFiTmShG3p50Z9Tv1M2VAfgSsG/hzb/L81G+K6okiKWrWHEyaiCPx?= =?iso-8859-1?Q?/ZSn7vCLRjGTvZbRJZlFsuvaLLvIC0Si3qq3SK+7s2WLIs6YRr15VLl8u+?= =?iso-8859-1?Q?Ea8tcNNpgRN6g=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 43a23165-862f-4bfc-881c-08dc5dc59b7a X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2024 03:30:47.7739 (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: KK9u7jgofAU1D6C0aKw4QgNFnGxmKHHnQ3Mtngvr7WewnzQLg81+CtGfO/aSSLOJqLvjuxQB5Qr1Mk+HmQyK3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7135 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 Resent-Date: Mon, 15 Apr 2024 20:31:01 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: bg6ZlNGrYxZpHOvxiJ8KCnfgx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82441EFEEFF19D3C76676A078C082MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=TR4K2PHQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB82441EFEEFF19D3C76676A078C082MN6PR11MB8244namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable PR created for merge: Loongcpu by niruiyu =B7 Pull Request #5560 =B7 tianoc= ore/edk2 (github.com) Thanks, Ray ________________________________ From: Chao Li Sent: Tuesday, April 16, 2024 10:42 To: devel@edk2.groups.io Cc: Ni, Ray ; Kumar, Rahul R ; G= erd Hoffmann ; Sami Mujawar ; Suni= l V L ; Bibo Mao ; Dongyan Q= ian Subject: [PATCH v4 00/13] Part 2 patch set to add LoongArch support into Ue= fiCpuPkg This patch set adjusted some order in UefiCpuPig alphabetically, added LoongArch libraries and drivers into UefiCpuPkg, it is a continuation of the first patch series v8 submitted at https://edk2.groups.io/g/devel/message/114526. And also separated from https://edk2.groups.io/g/devel/message/116583. This series only contents the changes for UefiCpuPkg. Patch1-Patch4: Reorder some INF files located in UefiCpuPkg alphabetically. Patch5-Patch13: Added Timer, CpuMmuLib, CpuMmuInitLib, MpInitLib, CpuDxe for LoongArch, and added some PCD and header files requested by the above libraries and drivers. Modfied modules: UefiCpuPkg BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4726 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4734 PR: https://github.com/tianocore/edk2/pull/5483 V1 -> V2: 1. Removed PcdCpuMmuIsEnabled. 2. Removed API GetMemoryRegionAttributes API as it is no longer needed. 3. Patch3, added two empty line in DXE and PEI INF files. 4. Patch5, added the Status check in GetTimeInnanoSecond function. 5. Separated into two series, this is series one, and the second one is OvmfPkg. V2 -> V3: 1. Remove CpuMmuInitLib. 2. Added a new GUID HOB named PROCESSOR_RESOURCE_HOG_GUID. 3. Following Ray suggest, adjust CpuMmuLib API, rename the API name. 4. Rename the PcdCpuExceptionVectorBaseAddress to PcdLoongArch64ExceptionVectorBaseAddress. 5. Enable CpuMmio2Dxe in LoongArch. V3 -> V4: Patch 10, use flexible arrays in PROCESSOR_RESOURCE_DATA. Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Sami Mujawar Cc: Sunil V L Cc: Bibo Mao Cc: Dongyan Qian Chao Li (13): UefiCpuPkg/CpuTimerLib: Reorder the INF file alphabetically UefiCpuPkg/CpuExceptionHandlerLib: Reorder the INF files alphabetically UefiCpuPkg/MpInitLib: Reorder the INF files alphabetically UefiCpuPkg/CpuDxe: Reorder the INF file alphabetically UefiCpuPkg: Add LoongArch64 CPU Timer instance UefiCpuPkg: Add CPU exception library for LoongArch UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg UefiCpuPkg: Added a new PCD named PcdLoongArchExceptionVectorBaseAddress UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg UefiCpuPkg: Add a new GUID to store the processors resource UefiCpuPkg: Add multiprocessor library for LoongArch64 UefiCpuPkg: Add CpuDxe driver for LoongArch64 UefiCpuPkg/UefiCpuPkg.dsc: Add CpuMmio2Dxe.inf to LoongArch64 field UefiCpuPkg/CpuDxe/CpuDxe.inf | 39 +- UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c | 514 ++++++ UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h | 288 +++ UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c | 544 ++++++ UefiCpuPkg/CpuDxe/LoongArch64/Exception.c | 159 ++ .../Include/Guid/ProcessorResourceHob.h | 29 + UefiCpuPkg/Include/Library/CpuMmuLib.h | 41 + .../DxeCpuExceptionHandlerLib.inf | 37 +- .../LoongArch/DxeExceptionLib.c | 198 ++ .../LoongArch/ExceptionCommon.c | 171 ++ .../LoongArch/ExceptionCommon.h | 131 ++ .../LoongArch64/ArchExceptionHandler.c | 268 +++ .../LoongArch64/ExceptionHandlerAsm.S | 366 ++++ .../LoongArch/SecPeiExceptionLib.c | 102 ++ .../PeiCpuExceptionHandlerLib.inf | 16 +- .../SecPeiCpuExceptionHandlerLib.inf | 31 +- .../SmmCpuExceptionHandlerLib.inf | 16 +- UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf | 39 + UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni | 14 + .../Library/CpuMmuLib/LoongArch64/CpuMmu.c | 784 ++++++++ .../Library/CpuMmuLib/LoongArch64/Page.h | 33 + .../LoongArch64/TlbExceptionHandle.S | 51 + .../LoongArch64/TlbExceptionHandle.h | 36 + .../CpuMmuLib/LoongArch64/TlbInvalid.S | 24 + .../CpuMmuLib/LoongArch64/TlbInvalid.h | 24 + .../Library/CpuTimerLib/BaseCpuTimerLib.inf | 17 +- .../CpuTimerLib/LoongArch64/CpuTimerLib.c | 250 +++ UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 42 +- .../Library/MpInitLib/LoongArch64/DxeMpLib.c | 480 +++++ .../Library/MpInitLib/LoongArch64/MpLib.c | 1626 +++++++++++++++++ .../Library/MpInitLib/LoongArch64/MpLib.h | 350 ++++ .../Library/MpInitLib/LoongArch64/PeiMpLib.c | 381 ++++ UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 40 +- UefiCpuPkg/UefiCpuPkg.dec | 13 + UefiCpuPkg/UefiCpuPkg.dsc | 7 + 35 files changed, 7082 insertions(+), 79 deletions(-) create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/Exception.c create mode 100644 UefiCpuPkg/Include/Guid/ProcessorResourceHob.h create mode 100644 UefiCpuPkg/Include/Library/CpuMmuLib.h create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Dxe= ExceptionLib.c create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Exc= eptionCommon.c create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Exc= eptionCommon.h create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Loo= ngArch64/ArchExceptionHandler.c create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Loo= ngArch64/ExceptionHandlerAsm.S create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/Sec= PeiExceptionLib.c create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/Page.h create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbExceptionHa= ndle.S create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbExceptionHa= ndle.h create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvalid.S create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvalid.h create mode 100644 UefiCpuPkg/Library/CpuTimerLib/LoongArch64/CpuTimerLib.= c create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/DxeMpLib.c create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.h create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/PeiMpLib.c -- 2.27.0 -=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 (#117841): https://edk2.groups.io/g/devel/message/117841 Mute This Topic: https://groups.io/mt/105550140/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB82441EFEEFF19D3C76676A078C082MN6PR11MB8244namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Thanks,
Ray

From: Chao Li <lichao@lo= ongson.cn>
Sent: Tuesday, April 16, 2024 10:42
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ni, Ray <ray.ni@intel.com>; Kumar, Rahul R <rahul.r.kum= ar@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Sami Mujawar <= ;sami.mujawar@arm.com>; Sunil V L <sunilvl@ventanamicro.com>; Bibo= Mao <maobibo@loongson.cn>; Dongyan Qian <qiandongyan@loongson.cn&= gt;
Subject: [PATCH v4 00/13] Part 2 patch set to add LoongArch support = into UefiCpuPkg
 
This patch set adjusted some order in UefiCpuPig a= lphabetically, added
LoongArch libraries and drivers into UefiCpuPkg, it is a continuation of the first patch series v8 submitted at
https://edk2.grou= ps.io/g/devel/message/114526.

And also separated from https://edk2.groups.io/g/devel/message/116583.

This series only contents the changes for UefiCpuPkg.

Patch1-Patch4: Reorder some INF files located in UefiCpuPkg
alphabetically.

Patch5-Patch13: Added Timer, CpuMmuLib, CpuMmuInitLib, MpInitLib, CpuDxe for LoongArch, and added some PCD and header files requested by the
above libraries and drivers.

Modfied modules: UefiCpuPkg

BZ: https= ://bugzilla.tianocore.org/show_bug.cgi?id=3D4726
BZ: https= ://bugzilla.tianocore.org/show_bug.cgi?id=3D4734

PR: https://github.= com/tianocore/edk2/pull/5483

V1 -> V2:
1. Removed PcdCpuMmuIsEnabled.
2. Removed API GetMemoryRegionAttributes API as it is no longer needed.
3. Patch3, added two empty line in DXE and PEI INF files.
4. Patch5, added the Status check in GetTimeInnanoSecond function.
5. Separated into two series, this is series one, and the second one is
OvmfPkg.

V2 -> V3:
1. Remove CpuMmuInitLib.
2. Added a new GUID HOB named PROCESSOR_RESOURCE_HOG_GUID.
3. Following Ray suggest, adjust CpuMmuLib API, rename the API name.
4. Rename the PcdCpuExceptionVectorBaseAddress to
PcdLoongArch64ExceptionVectorBaseAddress.
5. Enable CpuMmio2Dxe in LoongArch.

V3 -> V4:
Patch 10, use flexible arrays in PROCESSOR_RESOURCE_DATA.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Dongyan Qian <qiandongyan@loongson.cn>



Chao Li (13):
  UefiCpuPkg/CpuTimerLib: Reorder the INF file alphabetically
  UefiCpuPkg/CpuExceptionHandlerLib: Reorder the INF files
    alphabetically
  UefiCpuPkg/MpInitLib: Reorder the INF files alphabetically
  UefiCpuPkg/CpuDxe: Reorder the INF file alphabetically
  UefiCpuPkg: Add LoongArch64 CPU Timer instance
  UefiCpuPkg: Add CPU exception library for LoongArch
  UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg
  UefiCpuPkg: Added a new PCD named
    PcdLoongArchExceptionVectorBaseAddress
  UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg
  UefiCpuPkg: Add a new GUID to store the processors resource
  UefiCpuPkg: Add multiprocessor library for LoongArch64
  UefiCpuPkg: Add CpuDxe driver for LoongArch64
  UefiCpuPkg/UefiCpuPkg.dsc: Add CpuMmio2Dxe.inf to LoongArch64 field<= br>
 UefiCpuPkg/CpuDxe/CpuDxe.inf       = ;           |  = 39 +-
 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c     &= nbsp;  |  514 ++++++
 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h     &= nbsp;  |  288 +++
 UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c     &n= bsp;   |  544 ++++++
 UefiCpuPkg/CpuDxe/LoongArch64/Exception.c     |&n= bsp; 159 ++
 .../Include/Guid/ProcessorResourceHob.h     =   |   29 +
 UefiCpuPkg/Include/Library/CpuMmuLib.h     &= nbsp;  |   41 +
 .../DxeCpuExceptionHandlerLib.inf      =        |   37 +-
 .../LoongArch/DxeExceptionLib.c      &n= bsp;        |  198 ++
 .../LoongArch/ExceptionCommon.c      &n= bsp;        |  171 ++
 .../LoongArch/ExceptionCommon.h      &n= bsp;        |  131 ++
 .../LoongArch64/ArchExceptionHandler.c     &= nbsp;  |  268 +++
 .../LoongArch64/ExceptionHandlerAsm.S     &n= bsp;   |  366 ++++
 .../LoongArch/SecPeiExceptionLib.c      = ;      |  102 ++
 .../PeiCpuExceptionHandlerLib.inf      =        |   16 +-
 .../SecPeiCpuExceptionHandlerLib.inf     &nb= sp;    |   31 +-
 .../SmmCpuExceptionHandlerLib.inf      =        |   16 +-
 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf    | &= nbsp; 39 +
 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni    | &= nbsp; 14 +
 .../Library/CpuMmuLib/LoongArch64/CpuMmu.c    |  = 784 ++++++++
 .../Library/CpuMmuLib/LoongArch64/Page.h     = ; |   33 +
 .../LoongArch64/TlbExceptionHandle.S     &nb= sp;    |   51 +
 .../LoongArch64/TlbExceptionHandle.h     &nb= sp;    |   36 +
 .../CpuMmuLib/LoongArch64/TlbInvalid.S     &= nbsp;  |   24 +
 .../CpuMmuLib/LoongArch64/TlbInvalid.h     &= nbsp;  |   24 +
 .../Library/CpuTimerLib/BaseCpuTimerLib.inf   |  = 17 +-
 .../CpuTimerLib/LoongArch64/CpuTimerLib.c     |&n= bsp; 250 +++
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   42 +-
 .../Library/MpInitLib/LoongArch64/DxeMpLib.c  |  480 +++++<= br>  .../Library/MpInitLib/LoongArch64/MpLib.c     | 1= 626 +++++++++++++++++
 .../Library/MpInitLib/LoongArch64/MpLib.h     |&n= bsp; 350 ++++
 .../Library/MpInitLib/LoongArch64/PeiMpLib.c  |  381 ++++  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   40 +-
 UefiCpuPkg/UefiCpuPkg.dec       &n= bsp;            = ; |   13 +
 UefiCpuPkg/UefiCpuPkg.dsc       &n= bsp;            = ; |    7 +
 35 files changed, 7082 insertions(+), 79 deletions(-)
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.c
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuDxe.h
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/CpuMp.c
 create mode 100644 UefiCpuPkg/CpuDxe/LoongArch64/Exception.c
 create mode 100644 UefiCpuPkg/Include/Guid/ProcessorResourceHob.h
 create mode 100644 UefiCpuPkg/Include/Library/CpuMmuLib.h
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArc= h/DxeExceptionLib.c
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArc= h/ExceptionCommon.c
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArc= h/ExceptionCommon.h
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArc= h/LoongArch64/ArchExceptionHandler.c
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArc= h/LoongArch64/ExceptionHandlerAsm.S
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArc= h/SecPeiExceptionLib.c
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/CpuMmuLib.uni
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c<= br>  create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/Page.h  create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbExcept= ionHandle.S
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbExcept= ionHandle.h
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvali= d.S
 create mode 100644 UefiCpuPkg/Library/CpuMmuLib/LoongArch64/TlbInvali= d.h
 create mode 100644 UefiCpuPkg/Library/CpuTimerLib/LoongArch64/CpuTime= rLib.c
 create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/DxeMpLib.= c
 create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c  create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.h  create mode 100644 UefiCpuPkg/Library/MpInitLib/LoongArch64/PeiMpLib.= c

--
2.27.0

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#117841) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB82441EFEEFF19D3C76676A078C082MN6PR11MB8244namp_--