提交 8b5b80f4 编写于 作者: M Michal Privoznik

qemu: Introduce basic skeleton for parsing firmware description

The firmware description is a JSON file which follows
specification from qemu.git/docs/interop/firmware.json. The
description file basically says: Firmware file X is {bios|uefi},
supports these targets and machine types, requires these features
to be enabled on qemu cmd line and this is how you put it onto
qemu cmd line.

The firmware.json specification covers more (i.e. how to select
the right firmware) but that will be covered and implemented in
next commits.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 d947fa8a
......@@ -21,6 +21,8 @@ QEMU_DRIVER_SOURCES = \
qemu/qemu_cgroup.h \
qemu/qemu_extdevice.c \
qemu/qemu_extdevice.h \
qemu/qemu_firmware.c \
qemu/qemu_firmware.h \
qemu/qemu_hostdev.c \
qemu/qemu_hostdev.h \
qemu/qemu_hotplug.c \
......
此差异已折叠。
/*
* qemu_firmware.h: QEMU firmware
*
* Copyright (C) 2019 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef LIBVIRT_QEMU_FIRMWARE_H
# define LIBVIRT_QEMU_FIRMWARE_H
# include "viralloc.h"
typedef struct _qemuFirmware qemuFirmware;
typedef qemuFirmware *qemuFirmwarePtr;
void
qemuFirmwareFree(qemuFirmwarePtr fw);
VIR_DEFINE_AUTOPTR_FUNC(qemuFirmware, qemuFirmwareFree);
qemuFirmwarePtr
qemuFirmwareParse(const char *path);
char *
qemuFirmwareFormat(qemuFirmwarePtr fw);
#endif /* LIBVIRT_QEMU_FIRMWARE_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册