Page MenuHomeFreeBSD

arm64: Add CCA guest support
AbandonedPublic

Authored by sarah.walker2_arm.com on Apr 20 2026, 1:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 18, 3:21 AM
Unknown Object (File)
Mon, May 18, 3:17 AM
Unknown Object (File)
Mon, May 18, 2:33 AM
Unknown Object (File)
Mon, May 18, 2:26 AM
Unknown Object (File)
Sun, May 17, 6:23 PM
Unknown Object (File)
Sun, May 17, 6:18 PM
Unknown Object (File)
Thu, May 14, 1:38 PM
Unknown Object (File)
Thu, May 14, 10:16 AM
Subscribers

Details

Reviewers
andrew
manu
Summary

Realm status is determined early in bootup. PSCI initialisation has been moved
to initarm() to faciliate this.

When in a realm:

  • Mappings with mode VM_MEMATTR_DEVICE and VM_MEMATTR_DEVICE_NP are unprotected
  • Imported busdma buffers in protected memory are always bounced
  • If EARLY_PRINTK is in use, the UART physical address must be in the unprotected address space

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72434
Build 69317: arc lint + arc unit

Event Timeline

I think we can split out the pmap and busdma parts into 2 new revisions (i.e. one for pmap, one for busdma)

sys/arm64/arm64/rsi.c
57

This should live in pmap.c, and be marked as __read_mostly, e.g. like pmap_sh_attr. It would be useful to have pa in the name to make it obvious it's to be applied to the physical address. If FEAT_LPA2 is enabled it may not work with a page table as bits 51:50 of the output address are in bits 9:8 of the page table.

175

To get all physical memory we will need a new function that doesn't exclude EXFLAG_NOALLOC memory (e.g. the kernel image). Something like the following:

size_t
physmem_all(vm_paddr_t *avail, size_t maxavail) 
{
        return (regions_to_avail(avail, 0, maxavail, 0, NULL, NULL));
}

physmem_avail builds the array of physical memory we can allocate from so will not be complete.

177

We could drop these printf calls, or put them behind bootverbose