]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve(8): Add bootrom allocation abstraction
authorConrad Meyer <cem@FreeBSD.org>
Wed, 15 Apr 2020 01:58:51 +0000 (01:58 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Wed, 15 Apr 2020 01:58:51 +0000 (01:58 +0000)
commitbb30b08e76f7b1583ba201cff555b347af0b7028
tree1bbcd963a9f383adc857a8da12921f5ec44932fa
parent102acd72aa160751b5772dcfaa660035b17df865
bhyve(8): Add bootrom allocation abstraction

To allow more general use of the bootrom region, separate initialization from
allocation, and allocation from loading a file.

The bootrom segment is the high 16MB of the low 4GB region.

Each allocation in the segment creates a new mapping with specified protection.
By default, allocation begins at the low end of the range.  However, the
BOOTROM_ALLOC_TOP flag is provided to locate a provided bootrom in the high
region it is expected to be in.

The existing ROM-file loading code is refactored to use the new interface.

Reviewed by: grehan (earlier version)
Differential Revision: https://reviews.freebsd.org/D24422
usr.sbin/bhyve/bhyverun.c
usr.sbin/bhyve/bootrom.c
usr.sbin/bhyve/bootrom.h
usr.sbin/bhyve/pci_lpc.c