plat/xen, drivers/pl011: Fix PL011 UART mapping on Xen/arm64 - #1885
Open
kang-yoongu wants to merge 2 commits into
Open
plat/xen, drivers/pl011: Fix PL011 UART mapping on Xen/arm64#1885kang-yoongu wants to merge 2 commits into
kang-yoongu wants to merge 2 commits into
Conversation
Xen inserts "arm,sbsa-uart" as the compatible string for the vpl011 node in the guest DTB. Add it to the fdt_compatible list so the PL011 driver can match the device on Xen dom0less guests. Signed-off-by: Peter Kang <peter.kang@boeing.com> Signed-off-by: Anderson Choi <anderson.choi@boeing.com>
On Xen, IPA cannot be used directly as a VA. Add FIX_PL011 fixmap region in xen-arm/mm.h and use set_pgt_entry() in the PL011 driver to map the UART MMIO address through the fixmap page table when running on Xen. This avoids direct use of physical address as VA. - Add FIX_PL011_TOP/START to fixmap layout in xen-arm/mm.h - Add FIXMAP_ENTRIES macro (PAGE_SIZE / sizeof(lpae_t)) - Move extern fixmap_pgtable declaration into mm.h - Use set_pgt_entry() API (includes dsb ishst + isb) instead of direct assignment, consistent with other fixmap users in setup64.c Signed-off-by: Peter Kang <peter.kang@boeing.com> Signed-off-by: Anderson Choi <anderson.choi@boeing.com>
michpappas
self-requested a review
August 13, 2026 11:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Xen/ARM64 dom0less boot, the unikernel crashes immediately with repeated data abort traps before any console output appears.
Root causes:
In dom0less environment, HYPERVISOR_start_info is not initialized (remains 0x0). The xenconsole driver attempts to write pointer derived from start_info, which is NULL, triggering a data abort trap on every uk_pr_* / printk call.
The PL011 UART driver uses the physical/IPA address from the FDT reg property directly as a virtual address (dev->base = reg_base). Under Xen, guest IPA is not identity-mapped to VA, so UART register accesses hit an incorrect virtual address.
Description of Changes
This series fixes PL011 UART initialization on Xen/arm64 dom0less guests.
On Xen, IPA cannot be used directly as a VA. The PL011 driver was using reg_base (IPA) directly as dev->base, causing a fault when accessing UART MMIO.
Patch 1 adds arm,sbsa-uart to the compatible string list so the PL011 driver can match the virtual PL011 node inserted by Xen in the guest DTB.
Patch 2 maps the UART MMIO through the fixmap page table when running on Xen, consistent with how other devices are mapped
Related Work
Issue : #1882
PR Checklist
checkpatch.ukon your commit series before opening this PR;