]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/bhyve/e820.h
bhyve: add basic E820 implementation
[FreeBSD/FreeBSD.git] / usr.sbin / bhyve / e820.h
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG
5  * Author: Corvin Köhne <c.koehne@beckhoff.com>
6  */
7
8 #pragma once
9
10 #include <vmmapi.h>
11
12 #include "qemu_fwcfg.h"
13
14 enum e820_memory_type {
15         E820_TYPE_MEMORY = 1,
16         E820_TYPE_RESERVED = 2,
17         E820_TYPE_ACPI = 3,
18         E820_TYPE_NVS = 4
19 };
20
21 struct e820_entry {
22         uint64_t base;
23         uint64_t length;
24         uint32_t type;
25 } __packed;
26
27 struct qemu_fwcfg_item *e820_get_fwcfg_item(void);
28 int e820_init(struct vmctx *const ctx);