Page MenuHomeFreeBSD

bhyve: add common memory holes to E820 table
ClosedPublic

Authored by corvink on Apr 13 2023, 7:09 AM.
Tags
None
Referenced Files
F102923272: D39546.diff
Mon, Nov 18, 7:16 PM
Unknown Object (File)
Sat, Nov 9, 6:33 AM
Unknown Object (File)
Sep 24 2024, 5:14 AM
Unknown Object (File)
Sep 24 2024, 4:14 AM
Unknown Object (File)
Sep 19 2024, 10:24 PM
Unknown Object (File)
Sep 19 2024, 11:42 AM
Unknown Object (File)
Sep 18 2024, 6:42 PM
Unknown Object (File)
Sep 17 2024, 8:11 PM
Subscribers

Details

Summary

The VGA and the ROM memory ranges can't be used as system memory. For
that reason, remove them from the E820 table.

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.

  • make use of helper for e820_element allocations
This revision is now accepted and ready to land.Apr 24 2023, 3:16 PM
This revision was automatically updated to reflect the committed changes.