The VGA and the ROM memory ranges can't be used as system memory. For
that reason, remove them from the E820 table.
Details
Details
- Reviewers
jhb markj - Group Reviewers
bhyve - Commits
- rG951ca31bf66b: bhyve: add common memory holes to E820 table
rG059af92a300f: bhyve: add common memory holes to E820 table
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
usr.sbin/bhyve/e820.c | ||
---|---|---|
275 | ||
279 | I think the code would benefit from a helper routine: static struct e820_element * e820_element_alloc(uint64_t base, uint64_t end, enum e820_memory type type) { struct e820_element *elem; elem = calloc(1, sizeof(*elem)); if (elem != NULL) { elem->base = base; elem->end = end; elem->type = type; } return (elem); } since this code is duplicated several times now. |