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#define QEMU_FWCFG_MAX_ARCHS 0x2
13#define QEMU_FWCFG_MAX_ENTRIES 0x4000
14#define QEMU_FWCFG_MAX_NAME 56
15
16#define QEMU_FWCFG_FILE_TABLE_LOADER "etc/table-loader"
17
18struct qemu_fwcfg_item {
19	uint32_t size;
20	uint8_t *data;
21};
22
23int qemu_fwcfg_add_file(const char *name,
24    const uint32_t size, void *const data);
25int qemu_fwcfg_init(struct vmctx *const ctx);
26int qemu_fwcfg_parse_cmdline_arg(const char *opt);
27