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

Re: [PATCH v2 1/2] xen/mpu: Map early uart when earlyprintk on


  • To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 3 Dec 2024 10:26:56 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org 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=0CB/1zE4sssgW4K4RAwcWrfF175IqUSsEX0VuPOdf5o=; b=M5mh+ihrGYhEoxibbASbS4TOMm9ylXByURgC1+rYOo9ei4dv7t2fZZiDMcJZUn+ffv10ADq7bv1aB2Jm5gK3U2wyvPE6xBUFkcUfbc61rKl3DUBPpgXXUxkKg9rKVwlkAARsCLe4a0Qv7LuUcSi1uz3cxyhxIqe7BE5i4JcfRPpDQ/lGHv+8Hyp449VUEkxBV60i0BSmmbBe6QEuaKE6T6//yQ4MMA3FJtY7uecgrOeoOPEzfHT5sMcD4kHUow7pvZZTk3zxKKzppX764JODGYFYmprjTAhju32yDEpUt4eLM6DhFOleW2nhwZgrx+uJSqgQT4798ZHFDne5DxcWaA==
  • 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=0CB/1zE4sssgW4K4RAwcWrfF175IqUSsEX0VuPOdf5o=; b=NC3KRuy5zc3iWksG0roTIzyumq5QpT7z/4JVQ91gm3Z1cuq/6MJjyVh9ouHXhs+q2wgjZU5qukEK2rboddrS9ahzZ0TEGUmipx7qOwB7KiH1xWPgr7ECzIU9n+NK4rSPNImwouxkrmKPzC+vPdcsK69AkRaPE8NIY8eavysR1wExJr18xvnFra2VuCshWg1mreZIXexskzM+uSNdW5wIzjZGuVDVQ8TSrv5i4Ar+X86qi214wy7IamSfqtz1lakJXNvYt/YrEd8BZSCNvz6pduQr9zNgA9fjXQZNsqwXab7JMUiRsmLb8WBMw6Wr7aLp9Z/ksiZ8XZq6H5bCyhTkow==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=urmZ2jO+jYWCI0vX0JuRa5xlO48tXlHjrGInW4CVWd+QTNaPqkNuz8vNMIeeaxlCSvqa1DUdtkNS5cYPg5OedeHV4srVOmFCK9Yz2LbqSzUocaUc1RnVErP76xDRcNL4mJeqWidzoJQ4JnkjGw1LmVlHeC0icdQG4HCKSRP6urEVZlVwpBFq6or75QIpMoo5pPWpvdg2zOmPSCAcQ2IJqvoH7ItQzzpM+F/ZX5sWEuV9t2V8p0m05Ex/gFT2qoZjPg3Qs9DIOUML6aJzhXxi2AbCbQ5Z+vHbf8ZIZrvHlDyR6MZ36CCHmMd1ue/Y1hg6kJSU+4JWSf1Xbz7dYwMF2A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VolOVbnvtTQF0a2F5UOsJcVci+2nsL603VoUrtz5FTUO60zwb3iR3Yg+EmC+81quePjilbiMaeBvR7XHH3KdKzGTqCtkCf+bAmg3uQ/vAwgBQnOm0OmrkPBpUFE0tYSJofWLDeTPcE03sXyx1XELvI0DfHJ9r0LDqzlnEXqabV0JcMn575NWgj55f6VHnxLEYZHxG43iJbOqmQF0MMlEvwhaMvuezmiJHNmqLSLJfAqPhMrUOBwCKpLsN6GHzZNMxla8KC8sjB44LD6L89VhPjEFmLTWS8Mb+ae/8+lutUTHFjegu6NkEk4tr8i0BL4u+4UosZvOzdYD3oTBCzU2+Q==
  • 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: Tue, 03 Dec 2024 10:27:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHbRWz5mao3stJzR02TMW5lND/1eLLUUMKA
  • Thread-topic: [PATCH v2 1/2] xen/mpu: Map early uart when earlyprintk on

Hi Ayan,

sorry I've just spotted some issues while compiling


> diff --git a/xen/arch/arm/include/asm/early_printk.h 
> b/xen/arch/arm/include/asm/early_printk.h
> index 46a5e562dd..606aaedd6e 100644
> --- a/xen/arch/arm/include/asm/early_printk.h
> +++ b/xen/arch/arm/include/asm/early_printk.h
> @@ -15,6 +15,29 @@

you need to include

#include <asm/arm64/mpu.h>

in order to see MPU_REGION_ALIGN which otherwise will be zero for the 
preprocessor

> 
> #ifdef CONFIG_EARLY_PRINTK
> 
> +#if defined(CONFIG_MPU)
> +
> +/*
> + * For MPU systems, there is no VMSA support in EL2, so we use VA == PA
> + * for EARLY_UART_VIRTUAL_ADDRESS.
> + */
> +#define EARLY_UART_VIRTUAL_ADDRESS CONFIG_EARLY_UART_BASE_ADDRESS
> +
> +/*
> + * User-defined EARLY_UART_BASE_ADDRESS and EARLY_UART_SIZE must be aligned 
> to
> + * minimum size of MPU region.
> + */
> +
> +#if (EARLY_UART_BASE_ADDRESS % MPU_REGION_ALIGN) != 0
           ^— This needs to be CONFIG_*


> +#error "EARLY_UART_BASE_ADDRESS must be aligned to minimum MPU region size"
> +#endif
> +
> +#if (EARLY_UART_SIZE % MPU_REGION_ALIGN) != 0
           ^— This needs to be CONFIG_*


Once these are addressed and taking care also of Julien's comment:

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx 
<mailto:luca.fancellu@xxxxxxx>>

Cheers,
Luca


 


Rackspace

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