summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve/pci_lpc.h
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2015-06-18 06:00:17 +0000
committerneel <neel@FreeBSD.org>2015-06-18 06:00:17 +0000
commit8c70d6c7af8325d488ec8dff7b0bbe7b6dfc32f9 (patch)
tree34972705799ce1ec23ee45b1e6c0c7631ad7ed98 /usr.sbin/bhyve/pci_lpc.h
parent07553194d65f7f87d0eea74f0ad0f786e9a189bb (diff)
downloadFreeBSD-src-8c70d6c7af8325d488ec8dff7b0bbe7b6dfc32f9.zip
FreeBSD-src-8c70d6c7af8325d488ec8dff7b0bbe7b6dfc32f9.tar.gz
Restructure memory allocation in bhyve to support "devmem".
devmem is used to represent MMIO devices like the boot ROM or a VESA framebuffer where doing a trap-and-emulate for every access is impractical. devmem is a hybrid of system memory (sysmem) and emulated device models. devmem is mapped in the guest address space via nested page tables similar to sysmem. However the address range where devmem is mapped may be changed by the guest at runtime (e.g. by reprogramming a PCI BAR). Also devmem is usually mapped RO or RW as compared to RWX mappings for sysmem. Each devmem segment is named (e.g. "bootrom") and this name is used to create a device node for the devmem segment (e.g. /dev/vmm/testvm.bootrom). The device node supports mmap(2) and this decouples the host mapping of devmem from its mapping in the guest address space (which can change). Reviewed by: tychon Discussed with: grehan Differential Revision: https://reviews.freebsd.org/D2762 MFC after: 4 weeks
Diffstat (limited to 'usr.sbin/bhyve/pci_lpc.h')
-rw-r--r--usr.sbin/bhyve/pci_lpc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/pci_lpc.h b/usr.sbin/bhyve/pci_lpc.h
index 55a5865..431f5cf 100644
--- a/usr.sbin/bhyve/pci_lpc.h
+++ b/usr.sbin/bhyve/pci_lpc.h
@@ -68,5 +68,6 @@ struct lpc_sysres {
int lpc_device_parse(const char *opt);
char *lpc_pirq_name(int pin);
void lpc_pirq_routed(void);
+const char *lpc_bootrom(void);
#endif
OpenPOWER on IntegriCloud