Page MenuHomeFreeBSD

arm64: Add CCA guest support
AbandonedPublic

Authored by sarah.walker2_arm.com on Mon, Apr 20, 1:17 PM.
Tags
None
Referenced Files
F154278782: D56520.id.diff
Mon, Apr 27, 1:47 PM
F154276430: D56520.id175986.diff
Mon, Apr 27, 1:26 PM
F154235580: D56520.id175894.diff
Mon, Apr 27, 8:00 AM
F154223113: D56520.id175986.diff
Mon, Apr 27, 5:58 AM
F154180072: D56520.id175894.diff
Sun, Apr 26, 9:09 PM
Unknown Object (File)
Sat, Apr 25, 10:15 PM
Unknown Object (File)
Sat, Apr 25, 12:22 PM
Unknown Object (File)
Sat, Apr 25, 10:47 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