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

Re: [PATCH v2 2/7] arm/mpu: Provide access to the MPU region from the C code


  • To: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 9 Apr 2025 10:56:26 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=amd.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Tggu0kKceMXHitowsjFTiqg5lD7rPQ5JchRwMuc6HRg=; b=q2vEWdfUsiQuXL3ik57BHt5UA8dzgM/mWRLg1UOgNUD6A6RZGpDf8Z3EU/GYCGAbZu0mcZvuLgJho+SHeWUBugflfxdSGmRS7NUw8rjGcv5Z0lCUDOXoNz7C6Qzyh2j8OHEdLTqC1agCzKTZUyvr6TYr9I3bzzNfdiahyZvYhdnXQ9aUuG9fltAHp46r4sCYZMBPru7Kfi4Nah15scnwbvQJE5giHMSI69Rfl+2I7b/Ezt6xyv84SJpGIEc53UINmu2BXQ1oIkx2XFv9FGX8rw+Jj893lhW9TKbTT2AzFwZLhplv0qEhCQdLw77DaJaJ1ZYwwjvLAabIIDmBEHLAwA==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Tggu0kKceMXHitowsjFTiqg5lD7rPQ5JchRwMuc6HRg=; b=osjWreUU5rMq7LTh/AforoZKm0yjP4BXf94P7ZlzGgd1KD1ANtzMvIPd1NFcM95lPjtF1yDYmUWf/nR8ibiKhWxlEzZnKK9gtawVqlfNAVwxzZ8k2vXYfQAfI7cVZk1kRoe+2YWQwISevHCXdD3kFjIm6txs0AH7kgTHfefe0mzOf8ZRwu5LxROC2OrI862lghLLlCmXXFF8SSzMA5r3ffUhAv5zfOK0F/9k49tdNX5jlyeeVUfYia4pwTBMlXNmwkbkyxc1mybMxfsNn4LBsUcFixKq19sRC2+ZHcxklqcDNavcPLocfWJc/fBWwXjEKPMORFFTejHe0ZoMQPZZSQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=KHxHi91BtgNtNI1iHoEZ5TawvnLSRxlDS9mb5YF/i9O5jRFwVP9S905goXQKtW9Wrw7sAtiblqUW0RLSaeHowzPrHodwi4SEllj34E3iCBphVLyit7IeRFgkcnIqTGSHZdud07NXL0PTWz1GrNDFWElAftd8JT6rSAj4gdjLreeJ3ALhtPekob2t8d368qsOgh0LrSHZ6Z/dXvS8Ft711DTd+qrOmR/JAybrtyD7VP/2+BrLBzH2KtPVu6EvECORSFQkt8nTCuDo6eVNIBHk28vcZLq1P6J2uCM1MQ2cVFqyZuP9cy2UaCSZhFYV3xnzleECSZfpkcuvcCdGkWLrfQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IVv4Ix3g9Ummr1CHCkosGVJtrrk9ZG8GGExvVyqBYQPaDnZn7c1CntskDTTW5JPG8OCUa8J4hABQqZLkpWL9RL9aiq+N+42EernFnUKi84EOt04iIpEtGjL7jHfp8p/FGzo72q44VOannRkBYi2KYllqKyezGeZV1cy7/5URbokdybR7uzBPJKQgsR/x40TamV+grO7LK8DMcaB2bNXzQHqKP56uSRH1iFI7GvhfoGLVLv3YINpPnekXKxUu63Z09WVXuYzhXE2s9/48s4tPun8+NJUBfsq8mwS3ZIYwZWgTUyaSWfxfxwkez+XLJflfMWjs5WzfyipTI92zpIo9RQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 09 Apr 2025 10:57:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHbp52Ro+Yg+pQClU+WnJSxei+hH7OZzl8AgAAHm4CAACKVAIAABC6AgAAEEwCAAPj6AIAACQkAgAAcT4CAAAO6gIAABy6AgAACqoA=
  • Thread-topic: [PATCH v2 2/7] arm/mpu: Provide access to the MPU region from the C code

Hi Ayan,

> On 9 Apr 2025, at 11:46, Ayan Kumar Halder <ayankuma@xxxxxxx> wrote:
> 
> 
> On 09/04/2025 11:21, Luca Fancellu wrote:
>> Hi Ayan,
> Hi,
>> 
>>> On 9 Apr 2025, at 11:07, Ayan Kumar Halder <ayankuma@xxxxxxx> wrote:
>>> 
>>> 
>>> On 09/04/2025 09:26, Luca Fancellu wrote:
>>>> Hi Ayan,
>>> Hi Luca,
>>>>>>> The point of the code was to don’t issue an isb() every time we change 
>>>>>>> the selector,
>>>>>>> of course the code would be easier otherwise, but do we want to do that?
>>>>>> Not sure if it is beneficial as you would need to use isb() from 
>>>>>> region16 onwards.
>>>>> The isb() is issued only when changing the selector, so when you go from 
>>>>> reading/writing regions
>>>>> from 0-15 to 16-31 for example, of course there is a case that if you 
>>>>> continuously write on region 15
>>>>> and 16 you would have to always change the selector, but it’s the less 
>>>>> impact we could have.
>>>>> 
>>>>> armv8-R is even better since it’s able to address regions from 0 to 23 
>>>>> without flushing the pipeline,
>>>>                  ^— aarch32 :)
>>> Can you point me to the document where you got this info ?
>> was referring to the r52, of course you are more knowledgeable on the 
>> armv8-r aarch32 part, so ...
> If you can point me to the page and section within R52 TRM, I can take a look 
> to see if I missed something (which isn't suprising as the docs are huge :))

Arm® Cortex®-R52 Processor TRM, r1p1, 8.5 MPU Register summary, I can see 
HPRBAR going from 0 to 24 (so I was wrong above, there should be 25 regions?).
Anyway we should follow the armv8-r aarch32 specs here as you mentioned before, 
so max 32 region. Anyway you are the developer of the arm32 code so I’m
ok with your choices!

Cheers,
Luca


 


Rackspace

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