qemu-e2k/pc-bios
Philippe Mathieu-Daudé f7795e4096 misc: Replace zero-length arrays with flexible array member (automatic)
Description copied from Linux kernel commit from Gustavo A. R. Silva
(see [3]):

--v-- description start --v--

  The current codebase makes use of the zero-length array language
  extension to the C90 standard, but the preferred mechanism to
  declare variable-length types such as these ones is a flexible
  array member [1], introduced in C99:

  struct foo {
      int stuff;
      struct boo array[];
  };

  By making use of the mechanism above, we will get a compiler
  warning in case the flexible array does not occur last in the
  structure, which will help us prevent some kind of undefined
  behavior bugs from being unadvertenly introduced [2] to the
  Linux codebase from now on.

--^-- description end --^--

Do the similar housekeeping in the QEMU codebase (which uses
C99 since commit 7be41675f7).

All these instances of code were found with the help of the
following Coccinelle script:

  @@
  identifier s, m, a;
  type t, T;
  @@
   struct s {
      ...
      t m;
  -   T a[0];
  +   T a[];
  };
  @@
  identifier s, m, a;
  type t, T;
  @@
   struct s {
      ...
      t m;
  -   T a[0];
  +   T a[];
   } QEMU_PACKED;

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76497732932f
[3] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=17642a2fbd2c1

Inspired-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-03-16 22:07:42 +01:00
..
descriptors pc-bios: document the edk2 firmware images; add firmware descriptors 2019-04-17 15:38:35 +02:00
keymaps keymaps: regenerate keymaps 2019-03-18 12:06:04 +01:00
optionrom optionrom/pvh: scan entire RSDP Area 2020-03-16 22:07:42 +01:00
s390-ccw misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
bamboo.dtb
bamboo.dts
bios-256k.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
bios-microvm.bin roms: add microvm-bios (qboot) as binary and git submodule 2019-10-22 09:39:54 +02:00
bios.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
canyonlands.dtb
canyonlands.dts
edk2-aarch64-code.fd.bz2 pc-bios: refresh edk2 build artifacts for edk2-stable201905 2019-06-14 21:47:56 +02:00
edk2-arm-code.fd.bz2 pc-bios: refresh edk2 build artifacts for edk2-stable201905 2019-06-14 21:47:56 +02:00
edk2-arm-vars.fd.bz2 pc-bios: add edk2 firmware binaries and variable store templates 2019-04-17 15:38:35 +02:00
edk2-i386-code.fd.bz2 pc-bios: refresh edk2 build artifacts for edk2-stable201905 2019-06-14 21:47:56 +02:00
edk2-i386-secure-code.fd.bz2 pc-bios: refresh edk2 build artifacts for edk2-stable201905 2019-06-14 21:47:56 +02:00
edk2-i386-vars.fd.bz2 pc-bios: add edk2 firmware binaries and variable store templates 2019-04-17 15:38:35 +02:00
edk2-licenses.txt pc-bios: refresh edk2 build artifacts for edk2-stable201905 2019-06-14 21:47:56 +02:00
edk2-x86_64-code.fd.bz2 pc-bios: refresh edk2 build artifacts for edk2-stable201905 2019-06-14 21:47:56 +02:00
edk2-x86_64-secure-code.fd.bz2 pc-bios: refresh edk2 build artifacts for edk2-stable201905 2019-06-14 21:47:56 +02:00
efi-e1000.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
efi-e1000e.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
efi-eepro100.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
efi-ne2k_pci.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
efi-pcnet.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
efi-rtl8139.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
efi-virtio.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
efi-vmxnet3.rom ipxe: update to latest git master 2019-01-22 07:27:59 +01:00
hppa-firmware.img seabios-hppa: update to latest version 2020-01-27 10:49:51 -08:00
kvmvapic.bin
linuxboot_dma.bin
linuxboot.bin
Makefile
multiboot.bin
openbios-ppc Update OpenBIOS images to 7e5b89e4 built from submodule. 2019-10-28 17:11:50 +00:00
openbios-sparc32 Update OpenBIOS images to 7e5b89e4 built from submodule. 2019-10-28 17:11:50 +00:00
openbios-sparc64 Update OpenBIOS images to 7e5b89e4 built from submodule. 2019-10-28 17:11:50 +00:00
opensbi-riscv32-virt-fw_jump.bin opensbi: Upgrade from v0.4 to v0.5 2019-11-14 09:53:28 -08:00
opensbi-riscv64-sifive_u-fw_jump.bin opensbi: Upgrade from v0.4 to v0.5 2019-11-14 09:53:28 -08:00
opensbi-riscv64-virt-fw_jump.bin opensbi: Upgrade from v0.4 to v0.5 2019-11-14 09:53:28 -08:00
palcode-clipper pc-bios: Update palcode-clipper 2019-03-25 13:37:18 -07:00
petalogix-ml605.dtb
petalogix-s3adsp1800.dtb
pvh.bin optionrom/pvh: load initrd from fw_cfg 2019-02-05 16:50:17 +01:00
pxe-e1000.rom
pxe-eepro100.rom
pxe-ne2k_pci.rom
pxe-pcnet.rom
pxe-rtl8139.rom
pxe-virtio.rom
qemu_logo.svg
qemu_vga.ndrv QemuMacDrivers: update qemu_vga.ndrv to 90c488d built from submodule 2019-02-04 18:44:19 +11:00
qemu-nsis.bmp
qemu-nsis.ico
QEMU,cgthree.bin
QEMU,tcx.bin
qemu.rsrc
README hw/ppc/prep: Remove the deprecated "prep" machine and the OpenHackware BIOS 2020-02-02 14:07:57 +11:00
s390-ccw.img s390x/bios: rebuild s390-ccw.img 2020-03-10 10:18:13 +01:00
s390-netboot.img pc-bios/s390: Update firmware images 2019-12-18 15:54:24 +01:00
sgabios.bin
skiboot.lid ppc/pnv: update skiboot to v6.4 2019-08-29 09:45:18 +10:00
slof.bin pseries: Update SLOF firmware image 2019-12-17 11:40:23 +11:00
u-boot-sam460-20100605.bin
u-boot.e500 PPC: E500: Update u-boot to v2019.01 2019-03-12 14:33:04 +11:00
vgabios-ati.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios-bochs-display.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios-cirrus.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios-qxl.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios-ramfb.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios-stdvga.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios-virtio.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios-vmware.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00
vgabios.bin seabios: update to 1.13.0 final 2019-12-20 07:06:39 +01:00

- SeaBIOS (bios.bin) is the successor of pc bios.
  See http://www.seabios.org/ for more information.

- The VGA BIOS and the Cirrus VGA BIOS come from the LGPL VGA bios
  project (http://www.nongnu.org/vgabios/).

- OpenBIOS (http://www.openbios.org/) is a free (GPL v2) portable
  firmware implementation. The goal is to implement a 100% IEEE
  1275-1994 (referred to as Open Firmware) compliant firmware.
  The included images for PowerPC (for 32 and 64 bit PPC CPUs),
  Sparc32 (including QEMU,tcx.bin and QEMU,cgthree.bin) and Sparc64 are built
  from OpenBIOS SVN revision 1280.

- SLOF (Slimline Open Firmware) is a free IEEE 1275 Open Firmware
  implementation for certain IBM POWER hardware.  The sources are at
  https://github.com/aik/SLOF, and the image currently in qemu is
  built from git tag qemu-slof-20191217.

- sgabios (the Serial Graphics Adapter option ROM) provides a means for
  legacy x86 software to communicate with an attached serial console as
  if a video card were attached.  The master sources reside in a subversion
  repository at http://sgabios.googlecode.com/svn/trunk.  A git mirror is
  available at https://git.qemu.org/git/sgabios.git.

- The PXE roms come from the iPXE project. Built with BANNER_TIME 0.
  Sources available at http://ipxe.org.  Vendor:Device ID -> ROM mapping:

	8086:100e -> pxe-e1000.rom
	8086:1209 -> pxe-eepro100.rom
	1050:0940 -> pxe-ne2k_pci.rom
	1022:2000 -> pxe-pcnet.rom
	10ec:8139 -> pxe-rtl8139.rom
	1af4:1000 -> pxe-virtio.rom

- The sources for the Alpha palcode image is available from:
  https://github.com/rth7680/qemu-palcode.git

- The u-boot binary for e500 comes from the upstream denx u-boot project where
  it was compiled using the qemu-ppce500 target.
  A git mirror is available at: https://git.qemu.org/git/u-boot.git
  The hash used to compile the current version is: 2072e72

- Skiboot (https://github.com/open-power/skiboot/) is an OPAL
  (OpenPower Abstraction Layer) firmware for OpenPOWER systems. It can
  run an hypervisor OS or simply a host OS on the "baremetal"
  platform, also known as the PowerNV (Non-Virtualized) platform.

- QemuMacDrivers (https://github.com/ozbenh/QemuMacDrivers) is a project to
  provide virtualised drivers for PPC MacOS guests.

- The "edk2-*.fd.bz2" images are platform firmware binaries and matching UEFI
  variable store templates built from the TianoCore community's EFI Development
  Kit II project
  <https://github.com/tianocore/tianocore.github.io/wiki/EDK-II>. The images
  were built at git tag "edk2-stable201905". The firmware binaries bundle parts
  of the OpenSSL project, at git tag "OpenSSL_1_1_1b" (the OpenSSL tag is a
  function of the edk2 tag). Parts of the Berkeley SoftFloat library are
  bundled as well, at Release 3e plus a subsequent typo fix (commit
  b64af41c3276f97f0e181920400ee056b9c88037), as an OpenSSL dependency on 32-bit
  ARM. Licensing information is given in "edk2-licenses.txt". The image files
  are described by the JSON documents in the "pc-bios/descriptors" directory,
  which conform to the "docs/interop/firmware.json" schema.

- OpenSBI (https://github.com/riscv/opensbi) aims to provide an open-source
  reference implementation of the RISC-V Supervisor Binary Interface (SBI)
  specifications for platform-specific firmwares executing in M-mode. For all
  supported platforms, OpenSBI provides several runtime firmware examples.
  These example firmwares can be used to replace the legacy riscv-pk bootloader
  and enable the use of well-known bootloaders such as U-Boot.
  OpenSBI is distributed under the terms of the BSD 2-clause license
  ("Simplified BSD License" or "FreeBSD License", SPDX: BSD-2-Clause). OpenSBI
  source code also contains code reused from other projects desribed here:
  https://github.com/riscv/opensbi/blob/master/ThirdPartyNotices.md.