[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 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: Mon, 11 Nov 2024 11:08:12 +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=QJu23F4CbP+5sLQcykVHR5QsV+ro2NkEXqOFbU+LagM=; b=ELKtsI1Z+jTgMN88f0ojna31Eo9UC+sII8uhswRge4alPWBs9nl6rz4k1V4bMKj03MvQTnUg0dXLrQZH+AZ4MPCR3JqdspcuSpIuCIG3VXZvZ3KKWnk4mVhqyTw/DSSuIPhNLQlRnkNn0Rwnhda/SW2Ye8BPvttXUyU244Dgqh4vPpYDzht52SpLEyV1FVfmBezWaLm0yO9mzw9xwRRi1C6+nYcssUM17CvtVRNaCpDIGX4FXOKYrqzFYZXUblcIU6bvabsWZJpWiVU8hK4l1lQhS68sohM/zeexOufN/7b2D9jQ6wobxJ/7XX3AjUoQxdAakeRHn1XRZ5rMMmvaRg==
- 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=QJu23F4CbP+5sLQcykVHR5QsV+ro2NkEXqOFbU+LagM=; b=E2t7JnfoLcyxQyIDiA0l+j52xwvo3ydQBHAvnMuhYDuFTo1orPBvFQYSb5tEbWGIOlmMlARNtIxEcdK2oe12hxdcIU7mF0TRYmBF8sjNLS8vFQi6VFGPLHXvySkz/hz+EONSaT9mWpio++4sE9jnp7GYBL6U94POCSe/90kX5A/k/0DbaFDPaXT/um+9QENxwTciZVU3VvtcoxjVJBLXPG49+xJXp8rA6UNP5w7+8aN2zyRykPMPZ+5srhq/wnvXv95kzP0ypkcTdHtzdfsaZqdVwh2lS7HpkyjnM3TxHnfDpeSoExN4IGQUfGoIa2mibn8/tPlNuJcBi205N5cRCA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=MNzWoeocQawAf9XSx6zyylD1bdQtmCglk3ya8mQoFrFIEEPHw5Fn/cwGQHTIyfsJbFcZlfTifwZ9VrZJD1R+4dw9AbstUsnOE4cYhE1/fwybwtnuiVQx4tSDbyr4ozFoIMj1aGc8Xcp+I7kcmIhMEyqION3FedtLabYcguvSYqTv79/KAv2iMFkxgYansk6aMrDLzdqtbQCQ59T4zgiI9QdK8AtonobfzHU1FcMNYh9NxMQAvDiwaiftPTAkJZeRMj9zCp7ozsuAoiuzbNmXOQQRJBSTomcVQ3gsTKkv31NISvNpGrXZWErOQcXim/leNz1sCNnqZJMi8X3axT27pA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=A9yXSicMABe+SR1P0sZ9ClZfZOp+wcOCHDH1MzpEv9cqeecuLcGl1qJfib57nZoek/XpmpNqnlxIOpmmR6CYt3CJy97wzjRHkHVZtU2VhqR6lq6+5pDDI4vNxa2e4VC96Cn6hDp3dAK6aPxDyOz4G2oFR63RqjwOGIySkmGWfvWevljqFt3GocNuJYi1DZCqD7snwKiswHbfjH47hkAPWrt7kt+0dlvBFg9/E0/XJlIKEIX8cP+cKyATnJo5/n7AJjJulcXX8qp5yKVYzeMFq5KyRdP2ayPMRXhi4lGuODwh+PPrfOdBrCxPtal2ClReAqyW0ubmD8DXmuYQu4by8A==
- 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: Mon, 11 Nov 2024 11:08:40 +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: AQHbMhjv52dbbNhpnEiehVgzpuNQ9rKx78AA
- Thread-topic: [PATCH v1 1/2] xen/mpu: Map early uart when earlyprintk on
> On 8 Nov 2024, at 20:00, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> 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.
>
> Further, we check whether user-defined EARLY_UART_SIZE is aligned to PAGE_SIZE
> (4KB). This is partly because we intend to map a minimum of 1 page(ie 4KB) and
> the limit address is set as "EARLY_UART_SIZE-1". The limit address needs to
> end
> with 0x3f (as required by PRLAR register).
>
> 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
> 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
> and execution of instructions from the region is not permitted.
>
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
> —
This looks ok to me
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
|