Skip to content

boot fails with pl011 console #1882

Open

Description

@garethodickin

Describe the bug

On Xen/ARM64 dom0less boot, the unikernel crashes immediately with repeated data abort traps before any console output appears.

Root causes:

  1. 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.

  2. 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.

Steps to reproduce

  1. Build a Unikraft application with CONFIG_PLAT_XEN and CONFIG_LIBXENCONS enabled, CONFIG_LIBUKCONSOLE_PL011 disabled on AArch64
  2. Boot the unikernel as a Xen dom0less domain (not dom0)
  3. Observe repeated trap messages from xenconsole accessing NULL start_info
  4. Disable CONFIG_LIBXENCONS, enable CONFIG_LIBUKCONSOLE_PL011 and rebuild
  5. Boot again as dom0less domain
  6. Observe data abort on first UART register access due to IPA being used directly as VA without fixmap mapping

Expected behavior

(d1) - Unikraft booting -
(d1) - Setup CPU -
(d1) - Setup booting pagetable -
(d1) - MMU on -
(d1) - Setup stack -
(d1) - Jumping to C entry -
(XEN) DOM1: Powered by
(XEN) DOM1: o. .o _ _ __ _
(XEN) DOM1: Oo Oo ___ () | __ __ __ _ ' ) :
(XEN) DOM1: oOo oOO| | | | | (| | | (
) | ) :
(XEN) DOM1: oO oO ' _ | | |/ / _)' _ | || )
(XEN) DOM1: OoOoO .
, .
::,_., .__,:_, ___)
(XEN) DOM1: Ijiraq 0.21.0~e34d9ba
(XEN) DOM1: Hello world

Which architectures were you using or does this bug affect?

arm64

Which platforms were you using or does this bug affect?

xen

Relevant log output

(XEN) arch/arm/traps.c:1954:d1v0 HSR=0x00000093800005 pc=0xffffffc000039514 gva=0xffffffbfffc00c08 gpa=0x00000000000c08
(XEN) arch/arm/traps.c:1954:d1v0 HSR=0x00000093800005 pc=0xffffffc000039514 gva=0xffffffbfffc00c08 gpa=0x00000000000c08
(repeated infinitely, no further boot output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions