We want to allow the UEFI firmware to enumerate and assign
addresses to PCI devices so we can boot from NVMe[1]. One issueAddress
with this is that fbuf uses a special memory segment for the frameassignment of PCI BARs is properly handled by the PCI emulation
buffer memory.code in general, The pci_emul code can handlebut a few specific cases need address assignments toitional support.
PCI BARs, but doesn't know anything about the frame buffer memoryfbuf and passthru map additional objects into the guest physical
segmentaddress space and so need to handle address updates. Here we add a callback to emulated PCI devices to inform
them of a BAR configuration change. pci_fbufcallback to emulated PCI devices to inform then watches form of a BAR
these BARconfiguration changes and relocates the frame buffer memory segment.. fbuf and passthru then watch for these BAR
We also add a new VM_MUNMAP_MEMSEG ioctl to allow pci_fbuf tochanges and relocate the frame buffer memory segment and passthru
actually change the frame buffer mappingdevice mmio area respectively.
We also add new VM_MUNMAP_MEMSEG and VM_UNMAP_PPTDEV_MMIO ioctls
to vmm(4) to facilitate the unmapping needed for addres updates.
[1]: https://github.com/freebsd/uefi-edk2/pull/9/
MFC After: 1 week
Sponsored by: Intel Corporation