|
|
7711c0 |
From ec98b4315beedbb1c61277d47a11dccaecfa3fb1 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
7711c0 |
Date: Tue, 13 Nov 2018 18:16:39 +0100
|
|
|
7711c0 |
Subject: [PATCH 20/22] docs/interop: add "firmware.json"
|
|
|
7711c0 |
MIME-Version: 1.0
|
|
|
7711c0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7711c0 |
Content-Transfer-Encoding: 8bit
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: Laszlo Ersek <lersek@redhat.com>
|
|
|
7711c0 |
Message-id: <20181113181639.4999-7-lersek@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 83009
|
|
|
7711c0 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 6/6] docs/interop: add "firmware.json"
|
|
|
7711c0 |
Bugzilla: 1607406
|
|
|
7711c0 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
Add a schema that describes the different uses and properties of virtual
|
|
|
7711c0 |
machine firmware.
|
|
|
7711c0 |
|
|
|
7711c0 |
Each firmware executable installed on a host system should come with at
|
|
|
7711c0 |
least one JSON file that conforms to this schema. Each file informs the
|
|
|
7711c0 |
management applications about
|
|
|
7711c0 |
- the firmware's properties and one possible use case / feature set,
|
|
|
7711c0 |
- configuration bits that are required to run the firmware binary.
|
|
|
7711c0 |
|
|
|
7711c0 |
In addition, define rules for management apps for picking the highest
|
|
|
7711c0 |
priority firmware JSON file when multiple such files match the search
|
|
|
7711c0 |
criteria.
|
|
|
7711c0 |
|
|
|
7711c0 |
Cc: "Daniel P. Berrange" <berrange@redhat.com>
|
|
|
7711c0 |
Cc: David Gibson <dgibson@redhat.com>
|
|
|
7711c0 |
Cc: Eric Blake <eblake@redhat.com>
|
|
|
7711c0 |
Cc: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
7711c0 |
Cc: Kashyap Chamarthy <kchamart@redhat.com>
|
|
|
7711c0 |
Cc: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Cc: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
Cc: Thomas Huth <thuth@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
7711c0 |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
7711c0 |
Message-Id: <20180509152608.9343-1-lersek@redhat.com>
|
|
|
7711c0 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit 3a0adfc9bfcf217017bfc49d00c9a9b845e7118d)
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
docs/interop/firmware.json | 540 +++++++++++++++++++++++++++++++++++++++++++++
|
|
|
7711c0 |
1 file changed, 540 insertions(+)
|
|
|
7711c0 |
create mode 100644 docs/interop/firmware.json
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json
|
|
|
7711c0 |
new file mode 100644
|
|
|
7711c0 |
index 0000000..28f9bc1
|
|
|
7711c0 |
--- /dev/null
|
|
|
7711c0 |
+++ b/docs/interop/firmware.json
|
|
|
7711c0 |
@@ -0,0 +1,540 @@
|
|
|
7711c0 |
+# -*- Mode: Python -*-
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Copyright (C) 2018 Red Hat, Inc.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Authors:
|
|
|
7711c0 |
+# Daniel P. Berrange <berrange@redhat.com>
|
|
|
7711c0 |
+# Laszlo Ersek <lersek@redhat.com>
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# This work is licensed under the terms of the GNU GPL, version 2 or
|
|
|
7711c0 |
+# later. See the COPYING file in the top-level directory.
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# = Firmware
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+{ 'include' : 'common.json' }
|
|
|
7711c0 |
+{ 'include' : 'block-core.json' }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareOSInterface:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Lists the firmware-OS interface types provided by various firmware
|
|
|
7711c0 |
+# that is commonly used with QEMU virtual machines.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @bios: Traditional x86 BIOS interface. For example, firmware built
|
|
|
7711c0 |
+# from the SeaBIOS project usually provides this interface.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @openfirmware: The interface is defined by the (historical) IEEE
|
|
|
7711c0 |
+# 1275-1994 standard. Examples for firmware projects that
|
|
|
7711c0 |
+# provide this interface are: OpenBIOS, OpenHackWare,
|
|
|
7711c0 |
+# SLOF.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @uboot: Firmware interface defined by the U-Boot project.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @uefi: Firmware interface defined by the UEFI specification. For
|
|
|
7711c0 |
+# example, firmware built from the edk2 (EFI Development Kit II)
|
|
|
7711c0 |
+# project usually provides this interface.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'enum' : 'FirmwareOSInterface',
|
|
|
7711c0 |
+ 'data' : [ 'bios', 'openfirmware', 'uboot', 'uefi' ] }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareDevice:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Defines the device types that firmware can be mapped into.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @flash: The firmware executable and its accompanying NVRAM file are to
|
|
|
7711c0 |
+# be mapped into a pflash chip each.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @kernel: The firmware is to be loaded like a Linux kernel. This is
|
|
|
7711c0 |
+# similar to @memory but may imply additional processing that
|
|
|
7711c0 |
+# is specific to the target architecture and machine type.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @memory: The firmware is to be mapped into memory.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'enum' : 'FirmwareDevice',
|
|
|
7711c0 |
+ 'data' : [ 'flash', 'kernel', 'memory' ] }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareTarget:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Defines the machine types that firmware may execute on.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @architecture: Determines the emulation target (the QEMU system
|
|
|
7711c0 |
+# emulator) that can execute the firmware.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @machines: Lists the machine types (known by the emulator that is
|
|
|
7711c0 |
+# specified through @architecture) that can execute the
|
|
|
7711c0 |
+# firmware. Elements of @machines are supposed to be concrete
|
|
|
7711c0 |
+# machine types, not aliases. Glob patterns are understood,
|
|
|
7711c0 |
+# which is especially useful for versioned machine types.
|
|
|
7711c0 |
+# (For example, the glob pattern "pc-i440fx-*" matches
|
|
|
7711c0 |
+# "pc-i440fx-2.12".) On the QEMU command line, "-machine
|
|
|
7711c0 |
+# type=..." specifies the requested machine type (but that
|
|
|
7711c0 |
+# option does not accept glob patterns).
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'struct' : 'FirmwareTarget',
|
|
|
7711c0 |
+ 'data' : { 'architecture' : 'SysEmuTarget',
|
|
|
7711c0 |
+ 'machines' : [ 'str' ] } }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareFeature:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Defines the features that firmware may support, and the platform
|
|
|
7711c0 |
+# requirements that firmware may present.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @acpi-s3: The firmware supports S3 sleep (suspend to RAM), as defined
|
|
|
7711c0 |
+# in the ACPI specification. On the "pc-i440fx-*" machine
|
|
|
7711c0 |
+# types of the @i386 and @x86_64 emulation targets, S3 can be
|
|
|
7711c0 |
+# enabled with "-global PIIX4_PM.disable_s3=0" and disabled
|
|
|
7711c0 |
+# with "-global PIIX4_PM.disable_s3=1". On the "pc-q35-*"
|
|
|
7711c0 |
+# machine types of the @i386 and @x86_64 emulation targets, S3
|
|
|
7711c0 |
+# can be enabled with "-global ICH9-LPC.disable_s3=0" and
|
|
|
7711c0 |
+# disabled with "-global ICH9-LPC.disable_s3=1".
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @acpi-s4: The firmware supports S4 hibernation (suspend to disk), as
|
|
|
7711c0 |
+# defined in the ACPI specification. On the "pc-i440fx-*"
|
|
|
7711c0 |
+# machine types of the @i386 and @x86_64 emulation targets, S4
|
|
|
7711c0 |
+# can be enabled with "-global PIIX4_PM.disable_s4=0" and
|
|
|
7711c0 |
+# disabled with "-global PIIX4_PM.disable_s4=1". On the
|
|
|
7711c0 |
+# "pc-q35-*" machine types of the @i386 and @x86_64 emulation
|
|
|
7711c0 |
+# targets, S4 can be enabled with "-global
|
|
|
7711c0 |
+# ICH9-LPC.disable_s4=0" and disabled with "-global
|
|
|
7711c0 |
+# ICH9-LPC.disable_s4=1".
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @amd-sev: The firmware supports running under AMD Secure Encrypted
|
|
|
7711c0 |
+# Virtualization, as specified in the AMD64 Architecture
|
|
|
7711c0 |
+# Programmer's Manual. QEMU command line options related to
|
|
|
7711c0 |
+# this feature are documented in
|
|
|
7711c0 |
+# "docs/amd-memory-encryption.txt".
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @enrolled-keys: The variable store (NVRAM) template associated with
|
|
|
7711c0 |
+# the firmware binary has the UEFI Secure Boot
|
|
|
7711c0 |
+# operational mode turned on, with certificates
|
|
|
7711c0 |
+# enrolled.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @requires-smm: The firmware requires the platform to emulate SMM
|
|
|
7711c0 |
+# (System Management Mode), as defined in the AMD64
|
|
|
7711c0 |
+# Architecture Programmer's Manual, and in the Intel(R)64
|
|
|
7711c0 |
+# and IA-32 Architectures Software Developer's Manual. On
|
|
|
7711c0 |
+# the "pc-q35-*" machine types of the @i386 and @x86_64
|
|
|
7711c0 |
+# emulation targets, SMM emulation can be enabled with
|
|
|
7711c0 |
+# "-machine smm=on". (On the "pc-q35-*" machine types of
|
|
|
7711c0 |
+# the @i386 emulation target, @requires-smm presents
|
|
|
7711c0 |
+# further CPU requirements; one combination known to work
|
|
|
7711c0 |
+# is "-cpu coreduo,-nx".) If the firmware is marked as
|
|
|
7711c0 |
+# both @secure-boot and @requires-smm, then write
|
|
|
7711c0 |
+# accesses to the pflash chip (NVRAM) that holds the UEFI
|
|
|
7711c0 |
+# variable store must be restricted to code that executes
|
|
|
7711c0 |
+# in SMM, using the additional option "-global
|
|
|
7711c0 |
+# driver=cfi.pflash01,property=secure,value=on".
|
|
|
7711c0 |
+# Furthermore, a large guest-physical address space
|
|
|
7711c0 |
+# (comprising guest RAM, memory hotplug range, and 64-bit
|
|
|
7711c0 |
+# PCI MMIO aperture), and/or a high VCPU count, may
|
|
|
7711c0 |
+# present high SMRAM requirements from the firmware. On
|
|
|
7711c0 |
+# the "pc-q35-*" machine types of the @i386 and @x86_64
|
|
|
7711c0 |
+# emulation targets, the SMRAM size may be increased
|
|
|
7711c0 |
+# above the default 16MB with the "-global
|
|
|
7711c0 |
+# mch.extended-tseg-mbytes=uint16" option. As a rule of
|
|
|
7711c0 |
+# thumb, the default 16MB size suffices for 1TB of
|
|
|
7711c0 |
+# guest-phys address space and a few tens of VCPUs; for
|
|
|
7711c0 |
+# every further TB of guest-phys address space, add 8MB
|
|
|
7711c0 |
+# of SMRAM. 48MB should suffice for 4TB of guest-phys
|
|
|
7711c0 |
+# address space and 2-3 hundred VCPUs.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @secure-boot: The firmware implements the software interfaces for UEFI
|
|
|
7711c0 |
+# Secure Boot, as defined in the UEFI specification. Note
|
|
|
7711c0 |
+# that without @requires-smm, guest code running with
|
|
|
7711c0 |
+# kernel privileges can undermine the security of Secure
|
|
|
7711c0 |
+# Boot.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @verbose-dynamic: When firmware log capture is enabled, the firmware
|
|
|
7711c0 |
+# logs a large amount of debug messages, which may
|
|
|
7711c0 |
+# impact boot performance. With log capture disabled,
|
|
|
7711c0 |
+# there is no boot performance impact. On the
|
|
|
7711c0 |
+# "pc-i440fx-*" and "pc-q35-*" machine types of the
|
|
|
7711c0 |
+# @i386 and @x86_64 emulation targets, firmware log
|
|
|
7711c0 |
+# capture can be enabled with the QEMU command line
|
|
|
7711c0 |
+# options "-chardev file,id=fwdebug,path=LOGFILEPATH
|
|
|
7711c0 |
+# -device isa-debugcon,iobase=0x402,chardev=fwdebug".
|
|
|
7711c0 |
+# @verbose-dynamic is mutually exclusive with
|
|
|
7711c0 |
+# @verbose-static.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @verbose-static: The firmware unconditionally produces a large amount
|
|
|
7711c0 |
+# of debug messages, which may impact boot performance.
|
|
|
7711c0 |
+# This feature may typically be carried by certain UEFI
|
|
|
7711c0 |
+# firmware for the "virt-*" machine types of the @arm
|
|
|
7711c0 |
+# and @aarch64 emulation targets, where the debug
|
|
|
7711c0 |
+# messages are written to the first (always present)
|
|
|
7711c0 |
+# PL011 UART. @verbose-static is mutually exclusive
|
|
|
7711c0 |
+# with @verbose-dynamic.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'enum' : 'FirmwareFeature',
|
|
|
7711c0 |
+ 'data' : [ 'acpi-s3', 'acpi-s4', 'amd-sev', 'enrolled-keys',
|
|
|
7711c0 |
+ 'requires-smm', 'secure-boot', 'verbose-dynamic',
|
|
|
7711c0 |
+ 'verbose-static' ] }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareFlashFile:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Defines common properties that are necessary for loading a firmware
|
|
|
7711c0 |
+# file into a pflash chip. The corresponding QEMU command line option is
|
|
|
7711c0 |
+# "-drive file=@filename,format=@format". Note however that the
|
|
|
7711c0 |
+# option-argument shown here is incomplete; it is completed under
|
|
|
7711c0 |
+# @FirmwareMappingFlash.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @filename: Specifies the filename on the host filesystem where the
|
|
|
7711c0 |
+# firmware file can be found.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @format: Specifies the block format of the file pointed-to by
|
|
|
7711c0 |
+# @filename, such as @raw or @qcow2.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'struct' : 'FirmwareFlashFile',
|
|
|
7711c0 |
+ 'data' : { 'filename' : 'str',
|
|
|
7711c0 |
+ 'format' : 'BlockdevDriver' } }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareMappingFlash:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Describes loading and mapping properties for the firmware executable
|
|
|
7711c0 |
+# and its accompanying NVRAM file, when @FirmwareDevice is @flash.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @executable: Identifies the firmware executable. The firmware
|
|
|
7711c0 |
+# executable may be shared by multiple virtual machine
|
|
|
7711c0 |
+# definitions. The corresponding QEMU command line option
|
|
|
7711c0 |
+# is "-drive
|
|
|
7711c0 |
+# if=pflash,unit=0,readonly=on,file=@executable.@filename,format=@executable.@format".
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @nvram-template: Identifies the NVRAM template compatible with
|
|
|
7711c0 |
+# @executable. Management software instantiates an
|
|
|
7711c0 |
+# individual copy -- a specific NVRAM file -- from
|
|
|
7711c0 |
+# @nvram-template.@filename for each new virtual
|
|
|
7711c0 |
+# machine definition created. @nvram-template.@filename
|
|
|
7711c0 |
+# itself is never mapped into virtual machines, only
|
|
|
7711c0 |
+# individual copies of it are. An NVRAM file is
|
|
|
7711c0 |
+# typically used for persistently storing the
|
|
|
7711c0 |
+# non-volatile UEFI variables of a virtual machine
|
|
|
7711c0 |
+# definition. The corresponding QEMU command line
|
|
|
7711c0 |
+# option is "-drive
|
|
|
7711c0 |
+# if=pflash,unit=1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format".
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'struct' : 'FirmwareMappingFlash',
|
|
|
7711c0 |
+ 'data' : { 'executable' : 'FirmwareFlashFile',
|
|
|
7711c0 |
+ 'nvram-template' : 'FirmwareFlashFile' } }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareMappingKernel:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Describes loading and mapping properties for the firmware executable,
|
|
|
7711c0 |
+# when @FirmwareDevice is @kernel.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @filename: Identifies the firmware executable. The firmware executable
|
|
|
7711c0 |
+# may be shared by multiple virtual machine definitions. The
|
|
|
7711c0 |
+# corresponding QEMU command line option is "-kernel
|
|
|
7711c0 |
+# @filename".
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'struct' : 'FirmwareMappingKernel',
|
|
|
7711c0 |
+ 'data' : { 'filename' : 'str' } }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareMappingMemory:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Describes loading and mapping properties for the firmware executable,
|
|
|
7711c0 |
+# when @FirmwareDevice is @memory.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @filename: Identifies the firmware executable. The firmware executable
|
|
|
7711c0 |
+# may be shared by multiple virtual machine definitions. The
|
|
|
7711c0 |
+# corresponding QEMU command line option is "-bios
|
|
|
7711c0 |
+# @filename".
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'struct' : 'FirmwareMappingMemory',
|
|
|
7711c0 |
+ 'data' : { 'filename' : 'str' } }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @FirmwareMapping:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Provides a discriminated structure for firmware to describe its
|
|
|
7711c0 |
+# loading / mapping properties.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @device: Selects the device type that the firmware must be mapped
|
|
|
7711c0 |
+# into.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'union' : 'FirmwareMapping',
|
|
|
7711c0 |
+ 'base' : { 'device' : 'FirmwareDevice' },
|
|
|
7711c0 |
+ 'discriminator' : 'device',
|
|
|
7711c0 |
+ 'data' : { 'flash' : 'FirmwareMappingFlash',
|
|
|
7711c0 |
+ 'kernel' : 'FirmwareMappingKernel',
|
|
|
7711c0 |
+ 'memory' : 'FirmwareMappingMemory' } }
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+# @Firmware:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Describes a firmware (or a firmware use case) to management software.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# It is possible for multiple @Firmware elements to match the search
|
|
|
7711c0 |
+# criteria of management software. Applications thus need rules to pick
|
|
|
7711c0 |
+# one of the many matches, and users need the ability to override distro
|
|
|
7711c0 |
+# defaults.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# It is recommended to create firmware JSON files (each containing a
|
|
|
7711c0 |
+# single @Firmware root element) with a double-digit prefix, for example
|
|
|
7711c0 |
+# "50-ovmf.json", "50-seabios-256k.json", etc, so they can be sorted in
|
|
|
7711c0 |
+# predictable order. The firmware JSON files should be searched for in
|
|
|
7711c0 |
+# three directories:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# - /usr/share/qemu/firmware -- populated by distro-provided firmware
|
|
|
7711c0 |
+# packages (XDG_DATA_DIRS covers
|
|
|
7711c0 |
+# /usr/share by default),
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# - /etc/qemu/firmware -- exclusively for sysadmins' local additions,
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# - $XDG_CONFIG_HOME/qemu/firmware -- exclusively for per-user local
|
|
|
7711c0 |
+# additions (XDG_CONFIG_HOME
|
|
|
7711c0 |
+# defaults to $HOME/.config).
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Top-down, the list of directories goes from general to specific.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Management software should build a list of files from all three
|
|
|
7711c0 |
+# locations, then sort the list by filename (i.e., last pathname
|
|
|
7711c0 |
+# component). Management software should choose the first JSON file on
|
|
|
7711c0 |
+# the sorted list that matches the search criteria. If a more specific
|
|
|
7711c0 |
+# directory has a file with same name as a less specific directory, then
|
|
|
7711c0 |
+# the file in the more specific directory takes effect. If the more
|
|
|
7711c0 |
+# specific file is zero length, it hides the less specific one.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# For example, if a distro ships
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# - /usr/share/qemu/firmware/50-ovmf.json
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# - /usr/share/qemu/firmware/50-seabios-256k.json
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# then the sysadmin can prevent the default OVMF being used at all with
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# $ touch /etc/qemu/firmware/50-ovmf.json
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# The sysadmin can replace/alter the distro default OVMF with
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# $ vim /etc/qemu/firmware/50-ovmf.json
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# or they can provide a parallel OVMF with higher priority
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# $ vim /etc/qemu/firmware/10-ovmf.json
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# or they can provide a parallel OVMF with lower priority
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# $ vim /etc/qemu/firmware/99-ovmf.json
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @description: Provides a human-readable description of the firmware.
|
|
|
7711c0 |
+# Management software may or may not display @description.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @interface-types: Lists the types of interfaces that the firmware can
|
|
|
7711c0 |
+# expose to the guest OS. This is a non-empty, ordered
|
|
|
7711c0 |
+# list; entries near the beginning of @interface-types
|
|
|
7711c0 |
+# are considered more native to the firmware, and/or
|
|
|
7711c0 |
+# to have a higher quality implementation in the
|
|
|
7711c0 |
+# firmware, than entries near the end of
|
|
|
7711c0 |
+# @interface-types.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @mapping: Describes the loading / mapping properties of the firmware.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @targets: Collects the target architectures (QEMU system emulators)
|
|
|
7711c0 |
+# and their machine types that may execute the firmware.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @features: Lists the features that the firmware supports, and the
|
|
|
7711c0 |
+# platform requirements it presents.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# @tags: A list of auxiliary strings associated with the firmware for
|
|
|
7711c0 |
+# which @description is not appropriate, due to the latter's
|
|
|
7711c0 |
+# possible exposure to the end-user. @tags serves development and
|
|
|
7711c0 |
+# debugging purposes only, and management software shall
|
|
|
7711c0 |
+# explicitly ignore it.
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Since: 3.0
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# Examples:
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "description": "SeaBIOS",
|
|
|
7711c0 |
+# "interface-types": [
|
|
|
7711c0 |
+# "bios"
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "mapping": {
|
|
|
7711c0 |
+# "device": "memory",
|
|
|
7711c0 |
+# "filename": "/usr/share/seabios/bios-256k.bin"
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# "targets": [
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "architecture": "i386",
|
|
|
7711c0 |
+# "machines": [
|
|
|
7711c0 |
+# "pc-i440fx-*",
|
|
|
7711c0 |
+# "pc-q35-*"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "architecture": "x86_64",
|
|
|
7711c0 |
+# "machines": [
|
|
|
7711c0 |
+# "pc-i440fx-*",
|
|
|
7711c0 |
+# "pc-q35-*"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "features": [
|
|
|
7711c0 |
+# "acpi-s3",
|
|
|
7711c0 |
+# "acpi-s4"
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "tags": [
|
|
|
7711c0 |
+# "CONFIG_BOOTSPLASH=n",
|
|
|
7711c0 |
+# "CONFIG_ROM_SIZE=256",
|
|
|
7711c0 |
+# "CONFIG_USE_SMM=n"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "description": "OVMF with SB+SMM, empty varstore",
|
|
|
7711c0 |
+# "interface-types": [
|
|
|
7711c0 |
+# "uefi"
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "mapping": {
|
|
|
7711c0 |
+# "device": "flash",
|
|
|
7711c0 |
+# "executable": {
|
|
|
7711c0 |
+# "filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd",
|
|
|
7711c0 |
+# "format": "raw"
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# "nvram-template": {
|
|
|
7711c0 |
+# "filename": "/usr/share/OVMF/OVMF_VARS.fd",
|
|
|
7711c0 |
+# "format": "raw"
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# "targets": [
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "architecture": "x86_64",
|
|
|
7711c0 |
+# "machines": [
|
|
|
7711c0 |
+# "pc-q35-*"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "features": [
|
|
|
7711c0 |
+# "acpi-s3",
|
|
|
7711c0 |
+# "amd-sev",
|
|
|
7711c0 |
+# "requires-smm",
|
|
|
7711c0 |
+# "secure-boot",
|
|
|
7711c0 |
+# "verbose-dynamic"
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "tags": [
|
|
|
7711c0 |
+# "-a IA32",
|
|
|
7711c0 |
+# "-a X64",
|
|
|
7711c0 |
+# "-p OvmfPkg/OvmfPkgIa32X64.dsc",
|
|
|
7711c0 |
+# "-t GCC48",
|
|
|
7711c0 |
+# "-b DEBUG",
|
|
|
7711c0 |
+# "-D SMM_REQUIRE",
|
|
|
7711c0 |
+# "-D SECURE_BOOT_ENABLE",
|
|
|
7711c0 |
+# "-D FD_SIZE_4MB"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "description": "OVMF with SB+SMM, SB enabled, MS certs enrolled",
|
|
|
7711c0 |
+# "interface-types": [
|
|
|
7711c0 |
+# "uefi"
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "mapping": {
|
|
|
7711c0 |
+# "device": "flash",
|
|
|
7711c0 |
+# "executable": {
|
|
|
7711c0 |
+# "filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd",
|
|
|
7711c0 |
+# "format": "raw"
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# "nvram-template": {
|
|
|
7711c0 |
+# "filename": "/usr/share/OVMF/OVMF_VARS.secboot.fd",
|
|
|
7711c0 |
+# "format": "raw"
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# "targets": [
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "architecture": "x86_64",
|
|
|
7711c0 |
+# "machines": [
|
|
|
7711c0 |
+# "pc-q35-*"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "features": [
|
|
|
7711c0 |
+# "acpi-s3",
|
|
|
7711c0 |
+# "amd-sev",
|
|
|
7711c0 |
+# "enrolled-keys",
|
|
|
7711c0 |
+# "requires-smm",
|
|
|
7711c0 |
+# "secure-boot",
|
|
|
7711c0 |
+# "verbose-dynamic"
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "tags": [
|
|
|
7711c0 |
+# "-a IA32",
|
|
|
7711c0 |
+# "-a X64",
|
|
|
7711c0 |
+# "-p OvmfPkg/OvmfPkgIa32X64.dsc",
|
|
|
7711c0 |
+# "-t GCC48",
|
|
|
7711c0 |
+# "-b DEBUG",
|
|
|
7711c0 |
+# "-D SMM_REQUIRE",
|
|
|
7711c0 |
+# "-D SECURE_BOOT_ENABLE",
|
|
|
7711c0 |
+# "-D FD_SIZE_4MB"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "description": "UEFI firmware for ARM64 virtual machines",
|
|
|
7711c0 |
+# "interface-types": [
|
|
|
7711c0 |
+# "uefi"
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "mapping": {
|
|
|
7711c0 |
+# "device": "flash",
|
|
|
7711c0 |
+# "executable": {
|
|
|
7711c0 |
+# "filename": "/usr/share/AAVMF/AAVMF_CODE.fd",
|
|
|
7711c0 |
+# "format": "raw"
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# "nvram-template": {
|
|
|
7711c0 |
+# "filename": "/usr/share/AAVMF/AAVMF_VARS.fd",
|
|
|
7711c0 |
+# "format": "raw"
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+# },
|
|
|
7711c0 |
+# "targets": [
|
|
|
7711c0 |
+# {
|
|
|
7711c0 |
+# "architecture": "aarch64",
|
|
|
7711c0 |
+# "machines": [
|
|
|
7711c0 |
+# "virt-*"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "features": [
|
|
|
7711c0 |
+#
|
|
|
7711c0 |
+# ],
|
|
|
7711c0 |
+# "tags": [
|
|
|
7711c0 |
+# "-a AARCH64",
|
|
|
7711c0 |
+# "-p ArmVirtPkg/ArmVirtQemu.dsc",
|
|
|
7711c0 |
+# "-t GCC48",
|
|
|
7711c0 |
+# "-b DEBUG",
|
|
|
7711c0 |
+# "-D DEBUG_PRINT_ERROR_LEVEL=0x80000000"
|
|
|
7711c0 |
+# ]
|
|
|
7711c0 |
+# }
|
|
|
7711c0 |
+##
|
|
|
7711c0 |
+{ 'struct' : 'Firmware',
|
|
|
7711c0 |
+ 'data' : { 'description' : 'str',
|
|
|
7711c0 |
+ 'interface-types' : [ 'FirmwareOSInterface' ],
|
|
|
7711c0 |
+ 'mapping' : 'FirmwareMapping',
|
|
|
7711c0 |
+ 'targets' : [ 'FirmwareTarget' ],
|
|
|
7711c0 |
+ 'features' : [ 'FirmwareFeature' ],
|
|
|
7711c0 |
+ 'tags' : [ 'str' ] } }
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|