]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve(8): Add bootrom allocation abstraction
authorcem <cem@FreeBSD.org>
Wed, 15 Apr 2020 01:58:51 +0000 (01:58 +0000)
committercem <cem@FreeBSD.org>
Wed, 15 Apr 2020 01:58:51 +0000 (01:58 +0000)
commit36ff55f8c83a82afaa2a228309bcf6b97572cfbd
tree1bbcd963a9f383adc857a8da12921f5ec44932fa
parent0a2e1bb12f522a31ff55ee9db2e29b65dbf2ab41
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