Some guest allow to configure themself by fw_cfg. E.g. Fedora CoreOs can be provisioned by adding a JSON file as fw_cfg item. Reviewed by: jhb MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38338
27 lines
605 B
C
27 lines
605 B
C
/*-
|
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
|
*
|
|
* 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);
|