xref: /freebsd/usr.sbin/bhyve/qemu_fwcfg.h (revision 5d3e7166)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
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 #define QEMU_FWCFG_MAX_ARCHS 0x2
13 #define QEMU_FWCFG_MAX_ENTRIES 0x4000
14 #define QEMU_FWCFG_MAX_NAME 56
15 
16 struct qemu_fwcfg_item {
17 	uint32_t size;
18 	uint8_t *data;
19 };
20 
21 int qemu_fwcfg_add_file(const char *name,
22     const uint32_t size, void *const data);
23 int qemu_fwcfg_init(struct vmctx *const ctx);
24