[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xen/arm: arm32: Add support to identify the Cortex-R52 processor


  • To: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • Date: Thu, 22 Jun 2023 16:41:37 +0100
  • 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
  • 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=9sZsReLBiQg+gJcFL6VFnpWoaS8VuGcE112WdT8rge0=; b=bgZut/f7zIQbtEGbEinR+2nL8JBXg9an7o3p5qfcibGqzrIkiob/8eiNYxk8eap7Vp577j2KRpK98t71D4YFS26HiM8wkgjAi37DyP0YoZqT/OYdyQPjSuUXC7VhD7MLxd6cI9jFaI765r9SesIdCpx1OwTkSlCZfGfSMymwmWBSU4K67pRNaMK94Aq/qxjyzZnD4sQxYHzUijDhfFy7/XoN97vKsvDXf286T8FcZd1Ia9EXNJUAIwFHdVliBUPEnq/Jq2GP6VfgQ0YLgsvavtY4IJRMNUW2tJNpaVIjeVtxpifCPfu+y3tlOb5QJwvaSz+FuZeBJPg96SRTCYXJTg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UZ9tI8hwXCN4QABZIEMGvVuER8O/2qDNlQOekzrIvgcMPyajXsi6cARVcWjPAe6XSAXACcI4gi7SkW4xa/qT0ocCJbuRHZNhZI0n5imV8x7tTZ4KmU58AARxQfXuRSh06BbD+h9pCQqBg4M96YMD/twQxg0I0t+ZleuwJSSAWMjJrtojyaJmcztSrd6rPJcL3B4a6e1h3tfq5QeNuDsfA46MCVUYy/BxPLdNNNUi4SvmwGJwARmPGMMYkOYqLfEqhp2uuRwpEmJA1UeXiF50id67MkyCXemRNsDVEBCfz9LtqebwedBjGWMS+y6/PsdoGm53I05Shee1izGS/e+Tbw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: sstabellini@xxxxxxxxxx, stefano.stabellini@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, bertrand.marquis@xxxxxxx
  • Delivery-date: Thu, 22 Jun 2023 15:42:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 22/06/2023 10:22, Julien Grall wrote:
Hi Ayan,
Hi Julien,

On 22/06/2023 09:59, Ayan Kumar Halder wrote:

On 20/06/2023 21:43, Julien Grall wrote:
Hi Ayan,
Hi Julien,

On 20/06/2023 19:28, Ayan Kumar Halder wrote:

On 20/06/2023 17:41, Julien Grall wrote:
Hi,
Hi Julien,

On 20/06/2023 16:17, Ayan Kumar Halder wrote:
Add a special configuration (CONFIG_AARCH32_V8R) to setup the Cortex-R52
specifics.

Cortex-R52 is an Arm-V8R AArch32 processor.

Refer ARM DDI 0487I.a ID081822, G8-9647, G8.2.112 MIDR,
bits[31:24] = 0x41 , Arm Ltd
bits[23:20] = Implementation defined
bits[19:16] = 0xf , Arch features are individually identified
bits[15:4] = Implementation defined
bits[3:0] = Implementation defined

Thus, the processor id is 0x410f0000 and the processor id mask is
0xff0f0000

Also, there is no special initialization required for R52.

Are you saying that Xen upstream + this patch will boot on Cortex-R52?

This patch will help for earlyboot of Xen. With this patch, cpu_init() will work on Cortex-R52.

There will be changes required for the MPU configuration, but that will be sent after Penny's patch serie "[PATCH v2 00/41] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1" is upstreamed.

My aim is to extract the non-dependent changes and send them for review.

I can review the patch. But I am not willing to merge it as it gives the false impression that Xen would boot on Cortex-R52.

In fact, I think this patch should only be merged once we have all the MPU merged.

IMHO, patches are independent are rework (e.g. code split...) that would help the MPU.

Yes, that's exactly what I intend to do. I will send out the patches (similar to this) which will not be impacted by the MPU changes.

So, that both as an author/reviewer, it helps to restrict MPU serie to only MPU specific changes. > Can you suggest some change to the commit message, so that we can commit it (without giving any false impression that Xen boots on Cortex-R52) >
May be adding this line to the commit message helps ? >
"However, Xen does not fully boot on Cortex-R52 as it requires MPU support which is under review. > Once Xen is supported on Cortex-R52, SUPPORT.md will be amended to reflect it."

While writing an answer for this patch, I was actually wondering whether the CPU allowlist still make sense for the 32-bit ARMv8-R?

From Armv7-A, we needed it because some CPUs need specific quirk when booting. But it would be best if we can get rid of it for 32-bit ARMv8-R.

Looking at your patch, your merely providing stubs. Do you have any plan to fill them up?

Actually, I would use cr52_init in a later patch to write to CNTFRQ. See below :-

+#define XPAR_CPU_CORTEXR52_0_TIMESTAMP_CLK_FREQ  800000U
+
 cr52_init:
+        /*
+         * Set counter frequency  800 KHZ
+         *
+         * Set counter frequency, CNTFRQ
+         */
+        ldr     r0,=XPAR_CPU_CORTEXR52_0_TIMESTAMP_CLK_FREQ
+        mrc     15,0,r1,c14,c0,0  /* Read CNTFRQ */
+        cmp     r1,#0
+        /* Set only if the frequency read is 0 */
+        mcreq   15,0,r0,c14,c0,0  /* Write CNTFRQ */
+
         mov pc, lr

- Ayan


Cheers,




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.