arch/arm64: Support FEAT_CCIDX
[coreboot2.git] / util / qemu / Makefile.mk
blob7b9b636baf8f425e923a70977b5a6e696cf9b329
1 # SPDX-License-Identifier: BSD-3-Clause
3 # This automatically adds a `qemu` make target if a compatible
4 # configuration is selected. There are some notable variables
5 # that can be set or adapted in `Makefile.mk` files, the make
6 # command line or the environment:
8 # Primarily for `Makefile.mk` use:
9 # QEMU-y the QEMU executable
10 # QEMU_CFG-y a QEMU config that sets the available default devices,
11 # used to run more comprehensive tests by default,
12 # e.g. many more PCI devices
14 # For general use:
15 # QEMU_ARGS additional command line arguments (default: -serial stdio)
16 # QEMU_EXTRA_CFGS additional config files that can add devices
18 # QEMU_CFG_ARGS gathers config file related arguments,
19 # can be used to override a default config (QEMU_CFG-y)
21 # Examples:
23 # $ # Run coreboot's default config with additional command line args
24 # $ make qemu QEMU_ARGS="-cdrom site-local/grml64-small_2018.12.iso"
26 # $ # Force QEMU's built-in config
27 # $ make qemu QEMU_CFG_ARGS=
29 QEMU-$(CONFIG_BOARD_EMULATION_QEMU_AARCH64) ?= qemu-system-aarch64 \
30 -M virt,secure=on,virtualization=on -cpu cortex-a53 -m 1G
32 QEMU-$(CONFIG_BOARD_EMULATION_QEMU_RISCV_RV64) ?= qemu-system-riscv64 -M virt -m 1G -drive \
33 if=pflash,file=build/coreboot.rom,format=raw
35 QEMU-$(CONFIG_BOARD_EMULATION_QEMU_RISCV_RV32) ?= qemu-system-riscv32 -M virt -m 1G -drive \
36 if=pflash,file=build/coreboot.rom,format=raw
38 QEMU-$(CONFIG_BOARD_EMULATION_QEMU_X86_I440FX) ?= qemu-system-x86_64 -M pc
40 QEMU-$(CONFIG_BOARD_EMULATION_QEMU_X86_Q35) ?= qemu-system-x86_64 -M q35
41 QEMU_CFG-$(CONFIG_BOARD_EMULATION_QEMU_X86_Q35) ?= util/qemu/q35-base.cfg
43 ifneq ($(QEMU-y),)
45 QEMU_ARGS ?= -serial stdio
46 QEMU_EXTRA_CFGS ?=
48 QEMU_CFG_ARGS ?= \
49 $(if $(QEMU_CFG-y),-nodefaults) \
50 $(addprefix -readconfig ,$(QEMU_CFG-y) $(QEMU_EXTRA_CFGS))
52 qemu: $(obj)/coreboot.rom
53 $(QEMU-y) $(QEMU_CFG_ARGS) $(QEMU_ARGS) -bios $<
55 .PHONY: qemu
57 endif