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

Re: [PATCH v2 5/8] xen/arm: platforms: Add NXP S32CC platform code


  • To: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Andrei Cherechesu <andrei.cherechesu@xxxxxxxxxxx>
  • Date: Fri, 4 Oct 2024 18:37:09 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none
  • 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=HBdiDZCzBYnZfdkUmyKsBTthADAhMvLqKF+bNxro32w=; b=ZFPM/YXBiIibm4UTDPiiGQuU0zKp2OpkINmHvF8kFvOwP0DdiRJPoEbE4K87nwX4nN+2twcU9d5k6cJA7q8Mxsb7JetGRre1wvWkAC94KAXN35ftKUKD7A067NuTGzBEgu2kLI4ttW34MmPds/J5+AQfN+jd6e7dgixpOMlTr8hzoFlMpiFyT5gb5XQmG3xMPUynsEZYdrhQJgoEkGUsbdDhObw9ZYdaAjCK7W2c9r9PH593fp201gdLnKV8Y5ewEUBLVfdHl/oAcLjSlK0OL8I0RPHD11pYmrP4UsBLQN6pnR+YbWNt3ymLWaTLRLK0nCpAfsixmnJ+y0YkpMC5FQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=o+E1RDeG89bT91MyIoWSp7DMeqkMUdd9QfBA5MF1bowlo2zG2jxjVPumcv7duU2zak+ApUDaHxgPI7PPFkksGtVDFoNfUdtB5zY+QKrJJg5dL5x2qwHaccnFpG4eU7vNDDpcHCBbCV2rXlsTxG4rFRqCkJWXiysrqYB2gpa4arniOqcR+XMpiJdSJfCyr7A//R12RauN06QlGAAEb9CkRW6IS87NsY8dMCVhCJN1lupYVOksMlDWYq7vMMaFH4q+yjz+g+CR/jYgDZlSlvbpQxA+FI4ObAIHiPnIY0FgA9+6u6n3erjS4c2rT84kkq6iC7FBBSLfXjlNP25xMuh/zA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com;
  • Cc: S32@xxxxxxx, Andrei Cherechesu <andrei.cherechesu@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 04 Oct 2024 15:37:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien, Stefano,

On 01/10/2024 13:01, Julien Grall wrote:
> Hi Andrei,
>
> On 30/09/2024 12:47, Andrei Cherechesu (OSS) wrote:
>> From: Andrei Cherechesu <andrei.cherechesu@xxxxxxx>
>>
>> Add code for NXP S32CC platforms (S32G2, S32G3, S32R45).
>>
>> S32CC platforms use the NXP LINFlexD UART driver for
>> console by default, and rely on Dom0 having access to
>> SCMI services for system-level resources from firmware
>> at EL3.
>>
>> Platform-related quirks will be addressed in following
>> commits.
>
> I don't see any specific quirks in the series. Are you intended to send 
> follow-up?
>
> [...]

Well, we could use an opinion on some SoC erratum implementation
and if it would be acceptable for you or not, from any of
the ARM maintainers.

The erratum is about some TLB Invalidate (tlbi) instruction
variants (by Virtual Address) which are handled incorrectly
in some cases (for some VAs), and that need to be replaced
with broader versions.

It doesn't apply for all S32CC platforms, but we can use the
Host DT compatible to identify this. My idea is that we define
a platform quirk for this and check for it using
platform_has_quirk().
Then, we either:
    - modify the definition for the affected 'tlbi' variant
    in arm64/flushtlb.h to actually execute the broader one
    if needed
or:
    - define a new wrapper for the tlbi variant we want to
    replace the affected one with
    - check for this quirk before its usage and call the
    more potent version if needed (there's only one
    occurrence of usage for the affected version).

Number 2 seems better to me, it's more customizable and
it's similar to the existing handling for
PLATFORM_QUIRK_GIC_64K_STRIDE for some other Arm platform.

Do you have any suggestion/preference regarding how this
should be implemented?


>
>
>> diff --git a/xen/arch/arm/platforms/Makefile 
>> b/xen/arch/arm/platforms/Makefile
>> index bec6e55d1f..2c304b964d 100644
>> --- a/xen/arch/arm/platforms/Makefile
>> +++ b/xen/arch/arm/platforms/Makefile
>> @@ -10,5 +10,6 @@ obj-$(CONFIG_ALL64_PLAT) += thunderx.o
>>   obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o
>>   obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o
>>   obj-$(CONFIG_ALL64_PLAT) += imx8qm.o
>> +obj-$(CONFIG_S32CC_PLATFORM)  += s32cc.o
>>   obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o
>>   obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp-eemi.o
>> diff --git a/xen/arch/arm/platforms/s32cc.c b/xen/arch/arm/platforms/s32cc.c
>> new file mode 100644
>> index 0000000000..f99a2d56f6
>> --- /dev/null
>> +++ b/xen/arch/arm/platforms/s32cc.c
>
> We only add a new platform if there are platform specific hook to implement. 
> AFAICT, you don't implement any, so it should not be necessary.

Like I mentioned above, there's some erratum workaround which
could make use of the platform_quirk() callback, that we want
to send in the near future.

>
> Cheers,
>

Thank you for the review and support once again,

Regards,
Andrei C






 


Rackspace

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