[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: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Tue, 3 Dec 2024 13:34:34 +0000
- 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=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=5xw/MM0N0dOAzwKaqMDkHInXxh8ufqcWtVk0U998Z5M=; b=SSf4k3NBJeMdSVS4lvrIZRUAJKycgenNikl6QPyxmAf1bM1Z9gAq063TKUQRbikJwsYQgdpYURphU1mYOBsQk+Yr9sG3RsN/shBMHJDXlYRNtycO28j1o7KEoeL6RmHfp/FSSfmsJ2FLL+o8lFr79LwD8FOiMlu5dMsP82oTG0pTHpj0q2xrUZwy8R7Sjvut7Xo/e8ebP5Sfkjmx4x8juz3Nv3mlp8GkZ3KdJA9q82Gp7gSuK/IgE+Y/CFegXVGgNaz4bT7GXKH3dEkuh7+DvvnsiyY+9k63AMsSGpVLTMVpEVJoZJ9XagFEK3pII97KQB/Dm8OVJnf8qmxLtEfjNw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RNLS6+04Iy+CzbU9VHxnSI+FSkragwCET4kDDuh2guDptIBiz5tyNEUAi1qMbHBQSGAqfwHrpWT6EczlyBNcMygZsALtTD2n6I+AW8UbOustom7QqY9WwIjqsRPvBwrqZz0XrOGnaN1fgZMgHJCFIYrW/JrsszrgT3nRDt3cYygU8IfiEyazRVpcFY7rzMUhVWJKamBAWArxBOranVDMTiKVjcjJkchxYvPRdM22Y/6ElSbUPFcjzN8jbJLa1s42hDqzlot1d3/2nALgqSY6is1APUtgrHLtpGbgJqjeh5eoVAV1kSwyQinNgF2SQFuHCN3JXrB+/hvawFT6SI6gnQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 03 Dec 2024 13:35:00 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 02/12/2024 20:53, Julien Grall wrote:
Hi Ayan,
Hi Julien,
On 27/11/2024 18:39, Ayan Kumar Halder wrote:
CONFIG_EARLY_UART_SIZE is introduced to let user provide physical
size of
early UART. Unlike MMU where we map a page in the virtual address space,
here we need to know the exact physical size to be mapped.
As VA == PA in case of MPU, the memory layout follows exactly the
hardware
configuration. As a consequence, we set EARLY_UART_VIRTUAL_ADDRESS as
physical
address.
EARLY_UART_BASE_ADDRESS and EARLY_UART_SIZE should be aligned to the
minimum
size of MPU region (ie 64 bits) as per the hardware restrictions.
Refer ARM
DDI 0600A.d ID120821 A1.3 "A minimum protection region size of 64
bytes.".
UART is mapped as nGnRE region (as specified by ATTR=100 , refer
G1.3.13,
MAIR_EL2, "---0100 Device memory nGnRE") and Doc ID - 102670_0101_02_en
I can't find the Doc you point online. Do you have a link?
https://developer.arm.com/documentation/102670/0101 - Cortex-R82
processor TRM
Table 4-3, Armv8 architecture memory types (nGnRE - Corresponds to
Device in
Armv7 architecture). Also, it is mapped as outer shareable, RW at EL2
only
I don't quite understand why you mention Armv7 here.
Actually I was quoting from Cortex-R82 TRM.
The code you modify below is 64-bit so Armv8 only.
The code itself LGTM.
Ack.
- Ayan
Cheers,
|