2019-02-19 10:07:46 +00:00
|
|
|
/*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#pragma once
|
2019-02-19 10:07:46 +00:00
|
|
|
|
2019-06-18 16:12:37 +00:00
|
|
|
#include "domain_conf.h"
|
|
|
|
#include "qemu_conf.h"
|
|
|
|
#include "virarch.h"
|
2019-08-05 12:56:32 +00:00
|
|
|
#include "virfirmware.h"
|
2019-02-19 10:07:46 +00:00
|
|
|
|
|
|
|
typedef struct _qemuFirmware qemuFirmware;
|
|
|
|
typedef qemuFirmware *qemuFirmwarePtr;
|
|
|
|
|
|
|
|
void
|
|
|
|
qemuFirmwareFree(qemuFirmwarePtr fw);
|
|
|
|
|
2019-10-15 12:47:50 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmware, qemuFirmwareFree);
|
2019-02-19 10:07:46 +00:00
|
|
|
|
|
|
|
qemuFirmwarePtr
|
|
|
|
qemuFirmwareParse(const char *path);
|
|
|
|
|
|
|
|
char *
|
|
|
|
qemuFirmwareFormat(qemuFirmwarePtr fw);
|
|
|
|
|
2019-02-21 12:16:41 +00:00
|
|
|
int
|
|
|
|
qemuFirmwareFetchConfigs(char ***firmwares,
|
|
|
|
bool privileged);
|
|
|
|
|
2019-02-22 14:25:31 +00:00
|
|
|
int
|
|
|
|
qemuFirmwareFillDomain(virQEMUDriverPtr driver,
|
2019-12-13 14:41:16 +00:00
|
|
|
virDomainDefPtr def,
|
2019-02-22 14:25:31 +00:00
|
|
|
unsigned int flags);
|
|
|
|
|
2019-04-04 13:52:53 +00:00
|
|
|
int
|
|
|
|
qemuFirmwareGetSupported(const char *machine,
|
|
|
|
virArch arch,
|
|
|
|
bool privileged,
|
|
|
|
uint64_t *supported,
|
2019-08-05 12:56:32 +00:00
|
|
|
bool *secure,
|
|
|
|
virFirmwarePtr **fws,
|
|
|
|
size_t *nfws);
|
2019-04-04 13:52:53 +00:00
|
|
|
|
2020-01-09 10:39:55 +00:00
|
|
|
G_STATIC_ASSERT(VIR_DOMAIN_OS_DEF_FIRMWARE_LAST <= 64);
|