aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bhyve/qemu_fwcfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bhyve/qemu_fwcfg.h')
-rw-r--r--usr.sbin/bhyve/qemu_fwcfg.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/qemu_fwcfg.h b/usr.sbin/bhyve/qemu_fwcfg.h
new file mode 100644
index 000000000000..5c73e8309c6e
--- /dev/null
+++ b/usr.sbin/bhyve/qemu_fwcfg.h
@@ -0,0 +1,26 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG
+ * Author: Corvin Köhne <c.koehne@beckhoff.com>
+ */
+
+#pragma once
+
+#include <vmmapi.h>
+
+#define QEMU_FWCFG_MAX_ARCHS 0x2
+#define QEMU_FWCFG_MAX_ENTRIES 0x4000
+#define QEMU_FWCFG_MAX_NAME 56
+
+#define QEMU_FWCFG_FILE_TABLE_LOADER "etc/table-loader"
+
+struct qemu_fwcfg_item {
+ uint32_t size;
+ uint8_t *data;
+};
+
+int qemu_fwcfg_add_file(const char *name,
+ const uint32_t size, void *const data);
+int qemu_fwcfg_init(struct vmctx *const ctx);
+int qemu_fwcfg_parse_cmdline_arg(const char *opt);