Name of user not set #1002873 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
tests: Add build subsystem and example for unit tests
This commit's purpose is to show basic example of how unit testing may be applied for coreboot project. Description of what unit testing means (for the author) and how unit testing framework evaluation was performed may be found in Documentation/technotes/2020-03-unit-testing-coreboot.md
In order to run this example, one need to install (beside general coreboot dependencies) cmocka package: sudo apt-get install -y libcmocka-dev sudo emerge dev-util/cmocka yum install libcmocka-devel
After invoking: make unit-tests report from unit test will be created and shown on the screen (showing one failure due to strlen(NULL) call).
This test harness definitely isn't complete, as it only checks for one function within module. Purpose of this code is only an example and a starting point for a discussion about implementation.
Signed-off-by: Jan Dabros jsd@semihalf.com Change-Id: I9b0220b84b9a6e448476ca3eb3ccccc5fb829ad1 --- A tests/Makefile.inc A tests/include/config.h A tests/lib/string-test.c M util/testing/Makefile.inc 4 files changed, 2,272 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39894/1
diff --git a/tests/Makefile.inc b/tests/Makefile.inc new file mode 100644 index 0000000..61e9c44 --- /dev/null +++ b/tests/Makefile.inc @@ -0,0 +1,66 @@ +## +## This file is part of the coreboot project. +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program 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 General Public License for more details. +## + +TEST_SRC = \ + lib/string-test.c + +SRC_DIR = src/ +TEST_SRC_DIR = tests/ +TEST_BUILD_DIR = build/tests/ + +TEST_NAME = $(basename $(TEST_SRC)) +TEST_OBJS = $(addprefix $(TEST_BUILD_DIR),$(addsuffix .o,$(TEST_NAME))) +TEST_BINS = $(addprefix $(TEST_BUILD_DIR),$(TEST_NAME)) +TEST_RUN = $(addprefix $(TEST_BUILD_DIR),$(addsuffix .run,$(TEST_NAME))) + +# Minimal required set for simplicity sake +TEST_CFLAGS = -include$(src)/include/kconfig.h \ + -include$(src)/commonlib/bsd/include/commonlib/bsd/compiler.h \ + -I$(src)/include -I$(src)/commonlib/include \ + -I$(src)/commonlib/bsd/include -I$(src)/arch/x86/include \ + -D__RAMSTAGE__ -fno-builtin + +# Let's use default x86 qemu .config for unit testing purposes +TEST_CFLAGS += -Itests/include + +# Link against Cmocka +TEST_LDFLAGS = -lcmocka + +# Below target is present in top Makefile, but this Makefile.inc is included +# before it and some versions of GNU Make are not happy with this +.SECONDEXPANSION: + +# ToDo: Emit & include dependencies +$(TEST_OBJS): $(TEST_BUILD_DIR)%.o: $(TEST_SRC_DIR)%.c + mkdir -p $(dir $@) + $(HOSTCC) $(HOSTCFLAGS) $(TEST_CFLAGS) -c $< -o $@ + +# Need to link against unit under test +# ToDo: produce UUT object file as a separate step +$(TEST_BINS): $(TEST_BUILD_DIR)%: $(TEST_BUILD_DIR)%.o $$(addprefix $$(SRC_DIR),$$(subst -test,.c,$$*)) + $(HOSTCC) $^ $(HOSTCFLAGS) $(TEST_CFLAGS) $(TEST_LDFLAGS) -o $@ + +.PHONY: $(TEST_RUN) +$(TEST_RUN): %.run : % $(TEST_BINS) + - ./$* + +.PHONY: unit-tests build-unit-tests run-unit-tests clean-unit-tests + +unit-tests: build-unit-tests run-unit-tests + +build-unit-tests: $(TEST_BINS) + +run-unit-tests: build-unit-tests $(TEST_RUN) + +clean-unit-tests: + rm -rf $(TEST_BUILD_DIR) diff --git a/tests/include/config.h b/tests/include/config.h new file mode 100644 index 0000000..0d8fd50 --- /dev/null +++ b/tests/include/config.h @@ -0,0 +1,2160 @@ +/* + * + * Automatically generated file; DO NOT EDIT. + * coreboot configuration + * + */ +#define CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS 0 +#define CONFIG_SOC_AMD_COMMON 0 +#define CONFIG_POWER_BUTTON_IS_OPTIONAL 0 +#define CONFIG_EC_GOOGLE_WILCO 0 +#define CONFIG_SMM_RESERVED_SIZE 0 +#define CONFIG_MICROCODE_BLOB_NOT_HOOKED_UP 0 +#define CONFIG_VARIANT_SPECIFIC_OPTIONS_NOCTURNE 0 +#define CONFIG_DEPTHCHARGE_REVISION 0 +#define CONFIG_MTC_ADDRESS 0 +#define CONFIG_BOARD_INTEL_WHISKEYLAKE_RVP 0 +#define CONFIG_BOARD_GOOGLE_FALCO 0 +#define CONFIG_BOOTSPLASH 0 +#define CONFIG_BOARD_GOOGLE_BOB 0 +#define CONFIG_FSP_PEIM_TO_PEIM_INTERFACE 0 +#define CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE 0 +#define CONFIG_BOOT_DEVICE_SPI_FLASH 1 +#define CONFIG_BOARD_GIGABYTE_GA_G41M_ES2L 0 +#define CONFIG_SOC_UCB_RISCV 0 +#define CONFIG_EC_PURISM_LIBREM 0 +#define CONFIG_BOARD_GOOGLE_KUKUI 0 +#define CONFIG_BOARD_HP_SNB_IVB_LAPTOPS 0 +#define CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL 0 +#define CONFIG_MAINBOARD_POWER_FAILURE_STATE 0 +#define CONFIG_ENABLE_HSUART 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_SMM 0 +#define CONFIG_ONBOARD_MEM_SAMSUNG 0 +#define CONFIG_PCIE_DEBUG_INFO 0 +#define CONFIG_HWBASE_DEFAULT_MMCONF 0 +#define CONFIG_DRIVERS_I2C_DESIGNWARE_DEBUG 0 +#define CONFIG_SOUTHBRIDGE_INTEL_I82801GX 0 +#define CONFIG_TIANOCORE_DEBUG 0 +#define CONFIG_PAYLOAD_FIT_SUPPORT 0 +#define CONFIG_PCIEXP_COMMON_CLOCK 0 +#define CONFIG_ENABLE_BUILTIN_COM1 0 +#define CONFIG_NYAN_BLAZE_BCT_CFG_EMMC 0 +#define CONFIG_NORTHBRIDGE_SPECIFIC_OPTIONS 0 +#define CONFIG_TTB_SIZE_MB 0 +#define CONFIG_IOAPIC_INTERRUPTS_ON_FSB 1 +#define CONFIG_UART_OVERRIDE_INPUT_CLOCK_DIVIDER 0 +#define CONFIG_DRIVERS_LENOVO_HYBRID_GRAPHICS 0 +#define CONFIG_CAVIUM_BDK 0 +#define CONFIG_DEBUG_PMIC 0 +#define CONFIG_BOARD_GOOGLE_OCTOPUS 0 +#define CONFIG_SOUTHBRIDGE_AMD_PI_AVALON 0 +#define CONFIG_REG_SCRIPT 0 +#define CONFIG_NVRAMCUI_SECONDARY_PAYLOAD 0 +#define CONFIG_GRUB2_MASTER 0 +#define CONFIG_ENABLE_DISPLAY_OVER_EXT_PCIE_GFX 0 +#define CONFIG_DRIVER_TI_TPS65090 0 +#define CONFIG_DRIVERS_UART_8250MEM_32 0 +#define CONFIG_SMM_TSEG 0 +#define CONFIG_EC_KONTRON_IT8516E 0 +#define CONFIG_IPQ_QFN_PART 0 +#define CONFIG_GOOGLE_SMBIOS_MAINBOARD_VERSION 0 +#define CONFIG_COREBOOT_BUILD 1 +#define CONFIG_BOARD_GOOGLE_GNAWTY 0 +#define CONFIG_NYAN_BLAZE_BCT_CFG_SPI 0 +#define CONFIG_MAX_REBOOT_CNT 3 +#define CONFIG_JETWAY_BOARDS_DISABLED 0 +#define CONFIG_BOARD_GOOGLE_SETZER 0 +#define CONFIG_POWER_STATE_OFF_AFTER_FAILURE 0 +#define CONFIG_BOARD_PORTWELL_M107 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_S3 0 +#define CONFIG_MEMTEST_STABLE 0 +#define CONFIG_BOARD_SIEMENS_BASEBOARD_MC_APL1 0 +#define CONFIG_TIANOCORE_RELEASE 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_10A 0 +#define CONFIG_BOARD_GOOGLE_JECHT 0 +#define CONFIG_VARIANT_SPECIFIC_OPTIONS_POPPY 0 +#define CONFIG_NHLT_DMIC_2CH 0 +#define CONFIG_PCIEXP_L1_SUB_STATE 0 +#define CONFIG_BOOTBLOCK_CONSOLE 1 +#define CONFIG_LINUXBOOT_KERNEL_BZIMAGE 0 +#define CONFIG_SA_ENABLE_DPR 0 +#define CONFIG_SUPERIO_ITE_ENV_CTRL_NO_ONOFF 0 +#define CONFIG_EC_BASE_HOST_DATA 0 +#define CONFIG_BOOTBLOCK_CUSTOM 0 +#define CONFIG_VENDOR_FACEBOOK 0 +#define CONFIG_PAYLOAD_UBOOT 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_64MB 0 +#define CONFIG_PSP_APOB_NV_ADDRESS 0 +#define CONFIG_ARCH_ROMSTAGE_ARMV4 0 +#define CONFIG_SUPERIO_NSC_PC87392 0 +#define CONFIG_DRIVERS_USB_ACPI 0 +#define CONFIG_BOARD_AMD_THATCHER 0 +#define CONFIG_POWER_OFF_ON_CR50_UPDATE 0 +#define CONFIG_NO_POST 0 +#define CONFIG_HAVE_MRC 0 +#define CONFIG_NO_FIXED_XIP_ROM_SIZE 0 +#define CONFIG_BAP_BOARDS_DISABLED 0 +#define CONFIG_DEBUG_INTEL_ME 0 +#define CONFIG_EM100 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_BUILTIN 0 +#define CONFIG_SPI_FLASH_DONT_INCLUDE_ALL_DRIVERS 0 +#define CONFIG_EARLY_CBMEM_LIST 0 +#define CONFIG_SUPPORT_CPU_UCODE_IN_CBFS 0 +#define CONFIG_HT_CHAIN_END_UNITID_BASE 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_RESET 1 +#define CONFIG_ACPI_BERT 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_DRAGONEGG 0 +#define CONFIG_ACPI_ENABLE_THERMAL_ZONE 0 +#define CONFIG_INTEL_TXT 0 +#define CONFIG_RELOCATABLE_RAMSTAGE 1 +#define CONFIG_RISCV_USE_ARCH_TIMER 0 +#define CONFIG_BOARD_EMULATION_QEMU_RISCV_RV64 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_256 1 +#define CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY 0 +#define CONFIG_H8_FN_KEY_AS_VBOOT_RECOVERY_SW 0 +#define CONFIG_NORTHBRIDGE_INTEL_X4X 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL 7 +#define CONFIG_SB800_FWM_AT_FFF20000 0 +#define CONFIG_BOARD_FACEBOOK_MONOLITH 0 +#define CONFIG_VPD 0 +#define CONFIG_VENDOR_PURISM 0 +#define CONFIG_GENERATE_MP_TABLE 0 +#define CONFIG_NO_FMAP_CACHE 0 +#define CONFIG_BOARD_GOOGLE_HATCH 0 +#define CONFIG_ARCH_VERSTAGE_RISCV 0 +#define CONFIG_DISABLE_ACPI_HIBERNATE 0 +#define CONFIG_DRAM_SIZE_MB 0 +#define CONFIG_PAYLOAD_OPTIONS "" +#define CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_NONE 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_KAHLEE 0 +#define CONFIG_SOC_INTEL_COMMON_LPSS_UART_CLK_M_VAL 0 +#define CONFIG_ENABLE_MRC_CACHE 0 +#define CONFIG_STORAGE_ERASE 0 +#define CONFIG_ARCH_RAMSTAGE_RISCV 0 +#define CONFIG_BOARD_ASROCK_G41M_VS3_R2_0 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SPI 0 +#define CONFIG_INTEL_INT15 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_SPI_WAKEUP_DELAY_US 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_105 0 +#define CONFIG_SSE 0 +#define CONFIG_DEBUG_TPM 0 +#define CONFIG_MAX_PCIE_CLOCKS 0 +#define CONFIG_SOC_AMD_PICASSO 0 +#define CONFIG_DEBUG_CONSOLE_INIT 0 +#define CONFIG_TIANOCORE_BOOTSPLASH_IMAGE 0 +#define CONFIG_ENABLE_MSATA 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_DSP 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_6 0 +#define CONFIG_VENDOR_ASUS 0 +#define CONFIG_SOC_ESPI 0 +#define CONFIG_MRC_RMT 0 +#define CONFIG_VENDOR_PCENGINES 0 +#define CONFIG_YABEL_VIRTMEM_LOCATION 0 +#define CONFIG_BOARD_COMPULAB_INTENSE_PC 0 +#define CONFIG_VERSTAGE_ADDR 0x2000000 +#define CONFIG_GENERIC_LINEAR_FRAMEBUFFER 0 +#define CONFIG_PADMELON_PRAIRIE_FALCON 0 +#define CONFIG_UNLOCK_FLASH_REGIONS 0 +#define CONFIG_UNKNOWN_TSC_RATE 1 +#define CONFIG_BOARD_HP_2570P 0 +#define CONFIG_DRIVER_MAXIM_MAX77686 0 +#define CONFIG_DRIVER_PARADE_PS8640 0 +#define CONFIG_BOARD_SAPPHIRE_PUREPLATINUMH61 0 +#define CONFIG_COLLECT_TIMESTAMPS 1 +#define CONFIG_BOARD_FACEBOOK_FBG1701 0 +#define CONFIG_SUPERIO_ITE_IT8728F 0 +#define CONFIG_FSP1_1_DISPLAY_LOGO 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_LPSS 0 +#define CONFIG_SOC_INTEL_BAYTRAIL 0 +#define CONFIG_DRIVERS_I2C_CK505 0 +#define CONFIG_BOARD_GOOGLE_VEYRON 0 +#define CONFIG_PCIEXP_PLUGIN_SUPPORT 1 +#define CONFIG_ENABLE_FSP_MEMORY_DOWN 0 +#define CONFIG_SUPERIO_ITE_ENV_CTRL_8BIT_PWM 0 +#define CONFIG_MMX 0 +#define CONFIG_SYSTEM_TYPE_TABLET 0 +#define CONFIG_BOARD_GOOGLE_LULU 0 +#define CONFIG_ALWAYS_RUN_OPROM 0 +#define CONFIG_BOARD_GOOGLE_DRATINI 0 +#define CONFIG_SOUTHBRIDGE_AMD_PI_BOLTON 0 +#define CONFIG_ARM64_USE_SECURE_OS 0 +#define CONFIG_DRAM_PART_NUM_NOT_ALWAYS_IN_CBI 0 +#define CONFIG_SPI_FLASH_SST 0 +#define CONFIG_BOARD_PURISM_LIBREM15_V4 0 +#define CONFIG_BOARD_INTEL_COFFEELAKE_RVP8 0 +#define CONFIG_ARCH_PPC64 0 +#define CONFIG_GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_128MB 0 +#define CONFIG_MMCONF_SUPPORT 0 +#define CONFIG_BOARD_GOOGLE_ARCADA 0 +#define CONFIG_RK3399_SPREAD_SPECTRUM_DDR 0 +#define CONFIG_COMPRESS_PRERAM_STAGES 0 +#define CONFIG_BOARD_ASUS_P5GC_MX 0 +#define CONFIG_LINUXBOOT_KERNEL_LONGTERM 0 +#define CONFIG_SUPERIO_SMSC_KBC1100 0 +#define CONFIG_ARCH_VERSTAGE_ARM 0 +#define CONFIG_CBFS_SIZE 0x00040000 +#define CONFIG_X86EMU_DEBUG_PMM 0 +#define CONFIG_S3_DATA_SIZE 0 +#define CONFIG_LINUXBOOT_UROOT_BB 0 +#define CONFIG_SUPERIO_WINBOND_W83627HF 0 +#define CONFIG_TIANOCORE_UEFIPAYLOAD 0 +#define CONFIG_BOARD_GOOGLE_DAMU 0 +#define CONFIG_BOARD_ASUS_P5G41T_M_LX 0 +#define CONFIG_NHLT_DA7219 0 +#define CONFIG_VERIFY_HOBS 0 +#define CONFIG_X86EMU_DEBUG_JMP 0 +#define CONFIG_BOARD_ASUS_P8Z77_V_LX2 0 +#define CONFIG_DRIVERS_UART 1 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_TCO_ENABLE_THROUGH_SMBUS 0 +#define CONFIG_DISPLAY_VBT 0 +#define CONFIG_SETUP_XIP_CACHE 0 +#define CONFIG_BOARD_GOOGLE_PALKIA 0 +#define CONFIG_BOARD_LENOVO_T430S 0 +#define CONFIG_DRIVERS_UART_PL011 0 +#define CONFIG_BOARD_GOOGLE_VEYRON_JERRY 0 +#define CONFIG_AMD_SB_CIMX 0 +#define CONFIG_CPU_INTEL_MODEL_206AX 0 +#define CONFIG_AMD_APU_PRAIRIEFALCON 0 +#define CONFIG_BAP_E20_DDR3_800 0 +#define CONFIG_ELOG_DEBUG 0 +#define CONFIG_BOARD_GOOGLE_DRAGONEGG 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK 0 +#define CONFIG_SOC_CAVIUM_COMMON 0 +#define CONFIG_ARCH_VERSTAGE_ARMV8_64 0 +#define CONFIG_SEABIOS_SERCON_PORT_ADDR 0 +#define CONFIG_SEABIOS_VGA_COREBOOT 0 +#define CONFIG_GRUB2_STABLE 0 +#define CONFIG_SOUTHBRIDGE_INTEL_I82371EB 1 +#define CONFIG_DISPLAY_FSP_HEADER 0 +#define CONFIG_BOARD_AMD_GARDENIA 0 +#define CONFIG_MICROCODE_BLOB_NOT_IN_BLOB_REPO 0 +#define CONFIG_ARCH_ROMSTAGE_PPC64 0 +#define CONFIG_PI_AGESA_CAR_HEAP_BASE 0 +#define CONFIG_SUPERIO_WINBOND_W83977TF 0 +#define CONFIG_HAVE_PSP_WHITELIST_FILE 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_4096 0 +#define CONFIG_BOARD_EMULATION_QEMU_X86_Q35 0 +#define CONFIG_LINUXBOOT_KERNEL_CUSTOM 0 +#define CONFIG_MULTIPLE_VGA_ADAPTERS 0 +#define CONFIG_BOARD_INTEL_COFFEELAKE_RVP11 0 +#define CONFIG_HUDSON_UART 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_IMC 0 +#define CONFIG_HAVE_DISPLAY_MTRRS 0 +#define CONFIG_FSP_BUILD_TYPE_RELEASE 0 +#define CONFIG_DRIVER_TPM_SPI_BUS 0 +#define CONFIG_BOARD_GOOGLE_PHASER 0 +#define CONFIG_VBOOT_WITH_CRYPTO_SHIELD 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_10B 0 +#define CONFIG_SOC_QC_IPQ40XX 0 +#define CONFIG_PCR_BASE_ADDRESS 0 +#define CONFIG_CONSOLE_CBMEM_DUMP_TO_UART 0 +#define CONFIG_MICROCODE_UPDATE_PRE_RAM 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_110 0 +#define CONFIG_FSP_USES_MP_SERVICES_PPI 0 +#define CONFIG_PXE_NO_PROMT 0 +#define CONFIG_BOARD_PACKARDBELL_MS2290 0 +#define CONFIG_BOARD_SIEMENS_MC_APL3 0 +#define CONFIG_ARCH_RISCV_PMP 0 +#define CONFIG_DCACHE_RAM_SIZE 0x90000 +#define CONFIG_BOARD_OCP_TIOGAPASS 0 +#define CONFIG_BOARD_GOOGLE_NYAN 0 +#define CONFIG_VENDOR_SYSTEM76 0 +#define CONFIG_APU2_PINMUX_OFF_C 0 +#define CONFIG_NO_BOOTBLOCK_CONSOLE 0 +#define CONFIG_LINUXBOOT_KERNEL_UIMAGE 0 +#define CONFIG_HT_CHAIN_UNITID_BASE 0 +#define CONFIG_ARCH_ROMSTAGE_ARMV7 0 +#define CONFIG_STM 0 +#define CONFIG_SOC_INTEL_CANNONLAKE 0 +#define CONFIG_TTYS0_BAUD 115200 +#define CONFIG_SB800_NO_FAN_CONTROL 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_11B 0 +#define CONFIG_ARCH_POSTCAR_X86_32 1 +#define CONFIG_INTEL_DDI 0 +#define CONFIG_SEABIOS_MASTER 0 +#define CONFIG_CAR_CQOS 0 +#define CONFIG_VENDOR_BIOSTAR 0 +#define CONFIG_STONEYRIDGE_LEGACY_FREE 0 +#define CONFIG_BOARD_GOOGLE_STRYKE 0 +#define CONFIG_VENDOR_IBASE 0 +#define CONFIG_SUPERIO_NUVOTON_NCT6776 0 +#define CONFIG_BOARD_LENOVO_X220 0 +#define CONFIG_COLLECT_TIMESTAMPS_TSC 1 +#define CONFIG_BOARD_PROTECTLI_FW4B 0 +#define CONFIG_DRIVERS_XGI_Z9S 0 +#define CONFIG_DEBUG_BOOT_STATE 0 +#define CONFIG_DRAM_PART_IN_CBI_BOARD_ID_MIN 0 +#define CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY14 0 +#define CONFIG_BOARD_LENOVO_T520 0 +#define CONFIG_DENVERTON_NS_CAR_NEM_ENHANCED 0 +#define CONFIG_FSP_T_ADDR 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_XDCI 0 +#define CONFIG_BOARD_GOOGLE_BANJO 0 +#define CONFIG_HAVE_ROMSTAGE 1 +#define CONFIG_BOOT_DEVICE_NOT_SPI_FLASH 0 +#define CONFIG_BOARD_GOOGLE_NAMI 0 +#define CONFIG_SUPERIO_WANTS_14MHZ_CLOCK 0 +#define CONFIG_DRIVERS_I2C_RX6110SA 0 +#define CONFIG_USE_INTEL_FSP_MP_INIT 0 +#define CONFIG_CONSOLE_SERIAL_UART_ADDRESS 0 +#define CONFIG_DRIVERS_GFX_GENERIC 0 +#define CONFIG_HAVE_GBE_BIN 0 +#define CONFIG_BOARD_GOOGLE_CANDY 0 +#define CONFIG_LINUXBOOT_UROOT_V3_0_0 0 +#define CONFIG_POWER_STATE_ON_AFTER_FAILURE 0 +#define CONFIG_BOARD_LENOVO_X60 0 +#define CONFIG_DRIVERS_I2C_MAX98373 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE 0 +#define CONFIG_MAINBOARD_HAS_SPI_TPM_CR50 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_DEDEDE 0 +#define CONFIG_BOARD_GOOGLE_KARMA 0 +#define CONFIG_BOARD_ROMSIZE_KB_1024 0 +#define CONFIG_SDHCI_CONTROLLER 0 +#define CONFIG_ARCH_RAMSTAGE_ARMV8_64 0 +#define CONFIG_INTEL_PCH_UART_CONSOLE_NUMBER 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_64 0 +#define CONFIG_VBOOT_ENABLE_CBFS_FALLBACK 0 +#define CONFIG_ARCH_RISCV_S 0 +#define CONFIG_BOARD_AMD_PERSIMMON 0 +#define CONFIG_VENDORCODE_ELTAN_MBOOT 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_RTC 0 +#define CONFIG_VBOOT_DISABLE_DEV_ON_RECOVERY 0 +#define CONFIG_BOARD_ASUS_F2A85_M 0 +#define CONFIG_REALMODE_DEBUG 0 +#define CONFIG_PXE 0 +#define CONFIG_ARCH_ROMSTAGE_X86_32 1 +#define CONFIG_ARCH_VERSTAGE_X86_32 1 +#define CONFIG_BOARD_LENOVO_X220I 0 +#define CONFIG_COMPILER_LLVM_CLANG 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_106 0 +#define CONFIG_BOARD_ASUS_P5QC 0 +#define CONFIG_BOARD_INTEL_KBLRVP11 0 +#define CONFIG_CHROMEOS_DSM_CALIB 0 +#define CONFIG_SUPERIO_ASPEED_USE_UART_DELAY_WORKAROUND 0 +#define CONFIG_CBMEM_TOP_BACKUP 0 +#define CONFIG_CPU_INTEL_SOCKET_M 0 +#define CONFIG_TIANOCORE_COREBOOTPAYLOAD 0 +#define CONFIG_PMIC_BUS 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_3 0 +#define CONFIG_PAYLOAD_CONFIGFILE "" +#define CONFIG_SOUTHBRIDGE_INTEL_I82801JX 0 +#define CONFIG_SMM_STUB_STACK_SIZE 0 +#define CONFIG_DRIVERS_ASPEED_AST_COMMON 0 +#define CONFIG_SPI_FLASH_SMM 0 +#define CONFIG_NORTHBRIDGE_INTEL_E7505 0 +#define CONFIG_MAINBOARD_USES_FSP2_0 0 +#define CONFIG_DRIVERS_SPI_ACPI 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_10240 0 +#define CONFIG_GRU_BASEBOARD_SCARLET 0 +#define CONFIG_COMPRESS_BOOTBLOCK 0 +#define CONFIG_DISPLAY_UPD_DATA 0 +#define CONFIG_BOARD_LENOVO_T400 0 +#define CONFIG_ENABLE_IDE_COMBINED_MODE 0 +#define CONFIG_BOARD_ASUS_F2A85_M_LE 0 +#define CONFIG_MRC_SETTINGS_PROTECT 0 +#define CONFIG_VENDOR_LIBRETREND 0 +#define CONFIG_PXE_SERIAL_CONSOLE 0 +#define CONFIG_SUBSYSTEM_VENDOR_ID 0x0000 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI 0 +#define CONFIG_CBFS_PREFIX_NORMAL 0 +#define CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_NONE 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_IOMMU 0 +#define CONFIG_SYSTEM_TYPE_DETACHABLE 0 +#define CONFIG_RISCV_OPENSBI 0 +#define CONFIG_LINUXBOOT_KERNEL_MAINLINE 0 +#define CONFIG_SUPERIO_ITE_IT8718F 0 +#define CONFIG_LPC_TPM 0 +#define CONFIG_UART_OVERRIDE_REFCLK 0 +#define CONFIG_BOARD_GOOGLE_CAVE 0 +#define CONFIG_NO_TPM_RESUME 0 +#define CONFIG_HAVE_LINEAR_FRAMEBUFFER 1 +#define CONFIG_VBOOT_KEYBLOCK_VERSION 0 +#define CONFIG_FLATTENED_DEVICE_TREE 0 +#define CONFIG_BOARD_PURISM_LIBREM15_V3 0 +#define CONFIG_LOGICAL_CPUS 1 +#define CONFIG_BOARD_GOOGLE_TREEYA 0 +#define CONFIG_SOC_INTEL_KABYLAKE 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_SPI 0 +#define CONFIG_BOARD_APPLE_MACBOOK11 0 +#define CONFIG_PI_AGESA_TEMP_RAM_BASE 0 +#define CONFIG_BOARD_GOOGLE_VOLTEER 0 +#define CONFIG_MB_HAS_ACTIVE_HIGH_SD_PWR_ENABLE 0 +#define CONFIG_SPI_SDCARD 0 +#define CONFIG_BOARD_INTEL_GALILEO 0 +#define CONFIG_BOOTROM_SDRAM_INIT 0 +#define CONFIG_BOARD_GOOGLE_FLAPJACK 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_USER 0 +#define CONFIG_NO_SMM 0 +#define CONFIG_BOARD_LENOVO_R60 0 +#define CONFIG_CONSOLE_SERIAL_921600 0 +#define CONFIG_GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0 +#define CONFIG_CONSOLE_NE2K 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_5120 0 +#define CONFIG_DRIVERS_I2C_NAU8825 0 +#define CONFIG_SEABIOS_REVISION 0 +#define CONFIG_PAGING_IN_CACHE_AS_RAM 0 +#define CONFIG_DRIVERS_TI_TPS65913 0 +#define CONFIG_VENDORCODE_ELTAN_OEM_MANIFEST_ITEMS 0 +#define CONFIG_TPM_CR50 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_HDA 0 +#define CONFIG_ADD_FSP_BINARIES 0 +#define CONFIG_BOARD_INTEL_LEAFHILL 0 +#define CONFIG_BOARD_INTEL_D510MO 0 +#define CONFIG_BOARD_GOOGLE_ASUKA 0 +#define CONFIG_BOARD_EMULATION_QEMU_ARMV7 0 +#define CONFIG_CPU_QEMU_X86 1 +#define CONFIG_SOC_INTEL_COMMON_NHLT 0 +#define CONFIG_VENDOR_ADLINK 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE 0 +#define CONFIG_DISPLAY_FSP_CALLS_AND_STATUS 0 +#define CONFIG_ALWAYS_LOAD_OPROM 0 +#define CONFIG_SOC_CAVIUM_CN81XX 0 +#define CONFIG_ARCH_X86_64_PGTBL_LOC 0 +#define CONFIG_MAINBOARD_HAS_CRB_TPM 0 +#define CONFIG_VENDOR_RAZER 0 +#define CONFIG_BOARD_GOOGLE_EDGAR 0 +#define CONFIG_DEBUG_COVERAGE 0 +#define CONFIG_BOARD_GOOGLE_CAROLINE 0 +#define CONFIG_BOARD_PCENGINES_APU5 0 +#define CONFIG_FOSTER_BCT_CFG_SPI 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_HDA 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_HECI_DISABLE_IN_SMM 0 +#define CONFIG_DRIVER_TPM_I2C_BUS 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SMM_TCO_ENABLE 0 +#define CONFIG_MEMTEST_SECONDARY_PAYLOAD 0 +#define CONFIG_SUPERIO_NUVOTON_NCT6791D_COM_A 0 +#define CONFIG_BOARD_ASUS_H61M_CS 0 +#define CONFIG_TPM_DEACTIVATE 0 +#define CONFIG_COMPRESS_SECONDARY_PAYLOAD 1 +#define CONFIG_AMD_APU_MERLINFALCON 0 +#define CONFIG_CMOS_POST_OFFSET 0 +#define CONFIG_SOUTHBRIDGE_AMD_AGESA_YANGTZE 0 +#define CONFIG_DISPLAY_FSP_VERSION_INFO 0 +#define CONFIG_CPU_AMD_PI_00630F01 0 +#define CONFIG_DEBUG_RAM_SETUP 0 +#define CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK 0 +#define CONFIG_POWER_BUTTON_FORCE_DISABLE 0 +#define CONFIG_INTEL_DESCRIPTOR_MODE_REQUIRED 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_CSE 0 +#define CONFIG_SOC_INTEL_COMETLAKE 0 +#define CONFIG_VENDOR_AMD 0 +#define CONFIG_BOARD_HP_8770W 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_HATCH 0 +#define CONFIG_BOARD_INTEL_D945GCLF 0 +#define CONFIG_BOARD_AMD_PARMER 0 +#define CONFIG_BOARD_GOOGLE_AURON_PAINE 0 +#define CONFIG_BOARD_GOOGLE_NIGHTFURY 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_CLOCK_MHZ 0 +#define CONFIG_CPU_INTEL_MODEL_67X 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_PD 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_117 0 +#define CONFIG_BASEBOARD_OCTOPUS_LAPTOP 0 +#define CONFIG_SKIP_FSP_CAR 0 +#define CONFIG_FORCE_AM1_SOCKET_SUPPORT 0 +#define CONFIG_HWM_PORT 0 +#define CONFIG_INTEL_CAR_CQOS 0 +#define CONFIG_BOARD_EMULATION_QEMU_RISCV 0 +#define CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE 0 +#define CONFIG_X86_AMD_INIT_SIPI 0 +#define CONFIG_MAX_PIRQ_LINKS 0 +#define CONFIG_BOARD_EMULATION_QEMU_X86_I440FX 1 +#define CONFIG_APU2_PINMUX_OFF_D 0 +#define CONFIG_STORAGE_WRITE 0 +#define CONFIG_EC_SMSC_MEC1308 0 +#define CONFIG_BOARD_ASUS_P8H61_M_PRO 0 +#define CONFIG_BOARD_GOOGLE_SQUAWKS 0 +#define CONFIG_PCIEX_LENGTH_256MB 0 +#define CONFIG_ANY_TOOLCHAIN 0 +#define CONFIG_BOARD_ROMSIZE_KB_10240 0 +#define CONFIG_SDHC_DEBUG 0 +#define CONFIG_SOUTHBRIDGE_INTEL_LYNXPOINT 0 +#define CONFIG_CACHE_QOS_SIZE_PER_BIT 0 +#define CONFIG_INCLUDE_NHLT_BLOBS 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO_DUAL_ROUTE_SUPPORT 0 +#define CONFIG_NO_MMCONF_SUPPORT 1 +#define CONFIG_NORTHBRIDGE_INTEL_SUBTYPE_I945GM 0 +#define CONFIG_ENABLE_DEBUG_LED_SOC_EARLY_INIT_ENTRY 0 +#define CONFIG_BOARD_RODA_RV11 0 +#define CONFIG_BOARD_LENOVO_Z61T 0 +#define CONFIG_COMPRESSED_PAYLOAD_LZ4 0 +#define CONFIG_DRIVERS_I2C_RT5663 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_11A 0 +#define CONFIG_BOARD_PURISM_BASEBOARD_LIBREM_SKL 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_RCBA_PIRQ 0 +#define CONFIG_ARCH_RISCV_RV64 0 +#define CONFIG_RT8168_SET_LED_MODE 0 +#define CONFIG_STONEYRIDGE_SATA_MODE 0 +#define CONFIG_VBOOT_SLOTS_RW_AB 0 +#define CONFIG_BAP_E21_DDR3_1066 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_DRALLION 0 +#define CONFIG_CONSOLE_SERIAL_TEGRA210_UARTD 0 +#define CONFIG_SKYLAKE_SOC_PCH_H 0 +#define CONFIG_BOARD_ASUS_P2B_F 0 +#define CONFIG_EHCI_BAR 0 +#define CONFIG_USE_CPU_MICROCODE_CBFS_BINS 0 +#define CONFIG_BOARD_SPECIFIC_OPTIONS 1 +#define CONFIG_ARCH_X86 1 +#define CONFIG_BOARD_HP_REVOLVE_810_G1 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SMM 0 +#define CONFIG_EC_QUANTA_IT8518 0 +#define CONFIG_BOARD_RAZER_BLADE_STEALTH_KBL 0 +#define CONFIG_USE_OPTION_TABLE 0 +#define CONFIG_SMBIOS_PROVIDED_BY_MOBO 0 +#define CONFIG_VBOOT_SEPARATE_VERSTAGE 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_2048 0 +#define CONFIG_CAVIUM_BDK_VERBOSE_QLM 0 +#define CONFIG_X86EMU_DEBUG_INTERRUPTS 0 +#define CONFIG_DRIVERS_I2C_WW_RING 0 +#define CONFIG_RMU_LOC 0 +#define CONFIG_ACPI_AMD_HARDWARE_SLEEP_VALUES 0 +#define CONFIG_S3_VGA_ROM_RUN 0 +#define CONFIG_ARCH_RAMSTAGE_ARMV4 0 +#define CONFIG_VENDOR_GIGABYTE 0 +#define CONFIG_TEGRA124_MODEL_CD580M 0 +#define CONFIG_SUBSYSTEM_DEVICE_ID 0x0000 +#define CONFIG_UDK_2013_VERSION 0 +#define CONFIG_ARCH_RAMSTAGE_ARMV7_R 0 +#define CONFIG_CPU_QEMU_POWER8 0 +#define CONFIG_VBOOT_VBNV_FLASH 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_UART_LPSS_CLK_M_VAL 0 +#define CONFIG_COMMONLIB_STORAGE_MMC 0 +#define CONFIG_INTEL_CAR_NEM 0 +#define CONFIG_SOC_INTEL_COFFEELAKE 0 +#define CONFIG_SB800_SATA_IDE 0 +#define CONFIG_UBOOT_MASTER 0 +#define CONFIG_BOARD_INTEL_ICELAKE_RVPU 0 +#define CONFIG_BOARD_HP_Z220_SFF_WORKSTATION 0 +#define CONFIG_BOARD_GOOGLE_PEACH_PIT 0 +#define CONFIG_ARCH_POSTCAR_X86_64 0 +#define CONFIG_USE_OEM_BIN 0 +#define CONFIG_SOC_QUALCOMM_SDM845 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_103 0 +#define CONFIG_LINUXBOOT_INITRAMFS_COMPRESSION_XZ 0 +#define CONFIG_DRIVERS_UART_OXPCIE 0 +#define CONFIG_SPI_FLASH_AMIC 0 +#define CONFIG_DO_NOT_TOUCH_DESCRIPTOR_REGION 0 +#define CONFIG_BOARD_LENOVO_T60 0 +#define CONFIG_HUDSON_AHCI_ROM 0 +#define CONFIG_AGESA_USE_1_0_0_4_HEADER 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_WATCHDOG 0 +#define CONFIG_POWER_BUTTON_FORCE_ENABLE 0 +#define CONFIG_PAYLOAD_TIANOCORE 0 +#define CONFIG_CPU_MICROCODE_MULTIPLE_FILES 0 +#define CONFIG_VBOOT_WIPEOUT_SUPPORTED 0 +#define CONFIG_DRIVERS_GENERIC_MAX98357A 0 +#define CONFIG_PCR_COMMON_IOSF_1_0 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_10E 0 +#define CONFIG_APL_SET_MIN_CLOCK_RATIO 0 +#define CONFIG_BOARD_GOOGLE_VEYRON_MICKEY 0 +#define CONFIG_IOAPIC 0 +#define CONFIG_NO_EARLY_BOOTBLOCK_POSTCODES 0 +#define CONFIG_HAVE_INTEL_CHIPSET_LOCKDOWN 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_119 0 +#define CONFIG_BOARD_GOOGLE_TERRA 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_PIRQ_ACPI_GEN 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_16384 0 +#define CONFIG_BOARD_SIEMENS_MC_APL4 0 +#define CONFIG_X86_RESET_VECTOR 0xfffffff0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_FAST_SPI 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_POPPY 0 +#define CONFIG_CAR_NEM 0 +#define CONFIG_CONFIGURABLE_RAMSTAGE 0 +#define CONFIG_BOARD_LENOVO_X301 0 +#define CONFIG_BOARD_ASUS_F2A85_M_DDR3_VOLT_VAL 0 +#define CONFIG_BOARD_LIPPERT_TOUCAN_AF 0 +#define CONFIG_FSP_USES_CB_STACK 0 +#define CONFIG_BOARD_INTEL_SKLSDLBRK 0 +#define CONFIG_BOARD_AMD_PADMELON 0 +#define CONFIG_BOARD_GOOGLE_GARG 0 +#define CONFIG_RISCV_WORKING_HARTID 0 +#define CONFIG_MRC_WRITE_NV_LATE 0 +#define CONFIG_YABITS_STABLE 0 +#define CONFIG_BOARD_ROMSIZE_KB_8192 0 +#define CONFIG_DEBUG_GPIO 0 +#define CONFIG_BOARD_INTEL_STRAGO 0 +#define CONFIG_BOARD_GOOGLE_PUFF 0 +#define CONFIG_DRIVERS_XGI_Z79_COMMON 0 +#define CONFIG_CONSOLE_VGA_MULTI 0 +#define CONFIG_POST_IO_PORT 0x80 +#define CONFIG_SUPERIO_FINTEK_F71869AD 0 +#define CONFIG_HUDSON_IMC_ENABLE 0 +#define CONFIG_ARCH_BOOTBLOCK_ARMV7 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_SARIEN 0 +#define CONFIG_DRIVERS_GENERIC_CBFS_SERIAL 0 +#define CONFIG_MAINBOARD_VENDOR "Emulation" +#define CONFIG_MAINBOARD_HAS_LPC_TPM 0 +#define CONFIG_RT8168_GET_MAC_FROM_VPD 0 +#define CONFIG_NUM_THREADS 0 +#define CONFIG_ARCH_ROMSTAGE_ARM 0 +#define CONFIG_UDK_2017_BINDING 0 +#define CONFIG_H8_HAS_BAT_TRESHOLDS_IMPL 0 +#define CONFIG_USE_APOLLOLAKE_FSP_CAR 0 +#define CONFIG_BOOT_DEVICE_MEMORY_MAPPED 1 +#define CONFIG_BOARD_GOOGLE_KEVIN 0 +#define CONFIG_CPU_SPECIFIC_OPTIONS 0 +#define CONFIG_SEABIOS_PS2_TIMEOUT 0 +#define CONFIG_VENDOR_AOPEN 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_SPI 0 +#define CONFIG_PCIEXP_HOTPLUG 0 +#define CONFIG_IPMI_FRU_SINGLE_RW_SZ 0 +#define CONFIG_AMD_FWM_POSITION_INDEX 0 +#define CONFIG_BOARD_LIBRETREND_LT1000 0 +#define CONFIG_COMPRESS_RAMSTAGE 1 +#define CONFIG_CONSOLE_SERIAL_38400 0 +#define CONFIG_HAVE_DEBUG_CAR 0 +#define CONFIG_COMPILER_GCC 1 +#define CONFIG_DRIVERS_GENERIC_BH720 0 +#define CONFIG_SUPERIO_SMSC_SIO1007 0 +#define CONFIG_NORTHBRIDGE_AMD_PI_00660F01 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_8192 0 +#define CONFIG_BOARD_GOOGLE_QUAWKS 0 +#define CONFIG_YABITS_MASTER 0 +#define CONFIG_DRIVERS_AS3722_RTC_BUS 0 +#define CONFIG_DEBUG_PMIC_WRAP 0 +#define CONFIG_PICASSO_UART 0 +#define CONFIG_SUPERIO_ITE_IT8712F 0 +#define CONFIG_SB800_FWM_AT_FFE20000 0 +#define CONFIG_ENABLE_DEBUG_LED_SOC_EARLY_INIT_EXIT 0 +#define CONFIG_SUPERIO_ASPEED_AST2400 0 +#define CONFIG_BOARD_GOOGLE_BANON 0 +#define CONFIG_SOC_AHCI_PORT_IMPLEMENTED_INVERT 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_109 0 +#define CONFIG_X86EMU_DEBUG_VBE 0 +#define CONFIG_BOARD_LENOVO_X200 0 +#define CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SRAM 0 +#define CONFIG_BOARD_KONTRON_986LCD_M 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_SPI_BUS 0 +#define CONFIG_DEBUG_ADA_CODE 0 +#define CONFIG_BOARD_ASROCK_G41M_S3 0 +#define CONFIG_SEABIOS_ADD_SERCON_PORT_FILE 0 +#define CONFIG_BOARD_RODA_RK886EX 0 +#define CONFIG_ENABLE_VMX 0 +#define CONFIG_SPD_LOC 0 +#define CONFIG_VARIANT_HAS_CAMERA_ACPI 0 +#define CONFIG_TSC_SYNC_LFENCE 0 +#define CONFIG_BOARD_GOOGLE_FIZZ 0 +#define CONFIG_BOARD_51NB_X210 0 +#define CONFIG_POST_DEVICE_LPC 0 +#define CONFIG_MAINBOARD_DIR "emulation/qemu-i440fx" +#define CONFIG_BOARD_GOOGLE_KUKUI_COMMON 0 +#define CONFIG_VENDOR_CAVIUM 0 +#define CONFIG_TIANOCORE_TARGET_X64 0 +#define CONFIG_CPU_AMD_PI 0 +#define CONFIG_ARCH_ARMV8_EXTENSION 0 +#define CONFIG_CAVIUM_BDK_VERBOSE_PCIE_CONFIG 0 +#define CONFIG_VENDOR_APPLE 0 +#define CONFIG_VENDOR_GIZMOSPHERE 0 +#define CONFIG_BOARD_LENOVO_R500 0 +#define CONFIG_HAVE_POWER_STATE_AFTER_FAILURE 0 +#define CONFIG_BOARD_INTEL_BASKING_RIDGE 0 +#define CONFIG_VBOOT_VBNV_EC 0 +#define CONFIG_FSP_M_XIP 0 +#define CONFIG_APU2_PINMUX_GPIO0 0 +#define CONFIG_VENDOR_LIPPERT 0 +#define CONFIG_BOOTBLOCK_SIMPLE 1 +#define CONFIG_SOC_INTEL_COMMON_PCH_LOCKDOWN 0 +#define CONFIG_DRIVERS_RICOH_RCE822 0 +#define CONFIG_DEBUG_SMI 0 +#define CONFIG_EC_BASE_PACKET 0 +#define CONFIG_BOARD_GOOGLE_MUSHU 0 +#define CONFIG_BOARD_GOOGLE_KEFKA 0 +#define CONFIG_BOARD_GIZMOSPHERE_GIZMO 0 +#define CONFIG_SUPERIO_ITE_IT8786E 0 +#define CONFIG_SOC_INTEL_COMMON_BASECODE 0 +#define CONFIG_CONSOLE_CBMEM 1 +#define CONFIG_VBOOT_VBNV_CMOS 0 +#define CONFIG_ENABLE_DEBUG_LED 0 +#define CONFIG_UART_D_RS485 0 +#define CONFIG_SOC_INTEL_CANNONLAKE_ALTERNATE_HEADERS 0 +#define CONFIG_BOARD_INTEL_KBLRVP3 0 +#define CONFIG_SOCKET_SPECIFIC_OPTIONS 0 +#define CONFIG_SOUTHBRIDGE_INTEL_I82870 0 +#define CONFIG_GLK_CHROME_EC 0 +#define CONFIG_BOARD_CAVIUM_CN8100_SFF_EVB 0 +#define CONFIG_CONSOLE_SERIAL_TEGRA210_UARTC 0 +#define CONFIG_USE_PSPSCUREOS 0 +#define CONFIG_DRIVERS_INTEL_ISH 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_TIMER 0 +#define CONFIG_SUPERIO_FINTEK_COMMON_PRE_RAM 0 +#define CONFIG_CONSOLE_USB 0 +#define CONFIG_BOARD_GOOGLE_STOUT 0 +#define CONFIG_CPU_ADDR_BITS 36 +#define CONFIG_HEAP_SIZE 0x4000 +#define CONFIG_BOARD_GOOGLE_MONROE 0 +#define CONFIG_INTEL_GMA_HAVE_VBT 0 +#define CONFIG_BOARD_PURISM_LIBREM13_V1 0 +#define CONFIG_COREBOOT_ROMSIZE_KB 256 +#define CONFIG_DRIVERS_GENERIC_IOAPIC 0 +#define CONFIG_PADMELON_SOC 0 +#define CONFIG_VENDOR_HP 0 +#define CONFIG_EC_BASE_HOST_COMMAND 0 +#define CONFIG_BOARD_GOOGLE_KAPPA 0 +#define CONFIG_BOARD_INTEL_DG43GT 0 +#define CONFIG_BOARD_TI_BEAGLEBONE 0 +#define CONFIG_APU2_PINMUX_UART_D 0 +#define CONFIG_BOARD_LENOVO_BASEBOARD_T520 0 +#define CONFIG_BOARD_GOOGLE_REKS 0 +#define CONFIG_CARDBUS_PLUGIN_SUPPORT 1 +#define CONFIG_SMMSTORE_SIZE 0 +#define CONFIG_BOARD_BIOSTAR_A68N5200 0 +#define CONFIG_MAINBOARD_HAS_CHROMEOS 0 +#define CONFIG_SMM_LAPIC_REMAP_MITIGATION 0 +#define CONFIG_INTEL_EDID 0 +#define CONFIG_CONSOLE_SERIAL_115200 1 +#define CONFIG_FOSTER_BCT_CFG_EMMC 0 +#define CONFIG_BOARD_ASROCK_E350M1 0 +#define CONFIG_SB800_SATA_RAID 0 +#define CONFIG_PICASSO_UART_48MZ 0 +#define CONFIG_ACPI_CONSOLE 0 +#define CONFIG_CONSOLE_SERIAL_230400 0 +#define CONFIG_DRIVERS_TI_TPS65913_RTC 0 +#define CONFIG_TEGRA124_MODEL_CD570M 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX 0 +#define CONFIG_GBB_FLAG_FORCE_DEV_SWITCH_ON 0 +#define CONFIG_HWBASE_DIRECT_PCIDEV 0 +#define CONFIG_STACK_SIZE 0x1000 +#define CONFIG_VBOOT_ALWAYS_ENABLE_DISPLAY 0 +#define CONFIG_FSP_DEBUG_ALL 0 +#define CONFIG_BASEBOARD_DEDEDE_LAPTOP 0 +#define CONFIG_BOARD_GOOGLE_GLADOS 0 +#define CONFIG_SUPERIO_NUVOTON_WPCM450 0 +#define CONFIG_BOARD_GOOGLE_JINLON 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_12288 0 +#define CONFIG_SECURITY_CLEAR_DRAM_ON_REGULAR_BOOT 0 +#define CONFIG_LINUXBOOT_COMPILE_KERNEL 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_10F 0 +#define CONFIG_INCLUDE_NHLT_BLOBS_KARMA 0 +#define CONFIG_ARCH_ROMSTAGE_ARM64 0 +#define CONFIG_BOARD_HP_8460P 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO_IOSTANDBY 0 +#define CONFIG_NO_MONOTONIC_TIMER 0 +#define CONFIG_USBDEBUG_HCD_INDEX 0 +#define CONFIG_MEMTEST_MASTER 0 +#define CONFIG_IPMI_KCS 0 +#define CONFIG_LINUXBOOT_ARM64 0 +#define CONFIG_CPU_MICROCODE_CBFS_LEN 0 +#define CONFIG_BOARD_SAMSUNG_LUMPY 0 +#define CONFIG_BOARD_GOOGLE_TRICKY 0 +#define CONFIG_SYSTEM_TYPE_LAPTOP 0 +#define CONFIG_BOARD_GOOGLE_AKEMI 0 +#define CONFIG_STORAGE_EARLY_ERASE 0 +#define CONFIG_NON_LEGACY_UART_MODE 0 +#define CONFIG_USE_GOOGLE_FSP 0 +#define CONFIG_NO_UART_ON_SUPERIO 0 +#define CONFIG_VENDOR_OPENCELLULAR 0 +#define CONFIG_ARCH_RAMSTAGE_X86_32 1 +#define CONFIG_USBDEBUG_OPTIONAL_HUB_PORT 0 +#define CONFIG_DISPLAY_ESRAM_LAYOUT 0 +#define CONFIG_CHROMEOS_DISABLE_PLATFORM_HIERARCHY_ON_RESUME 0 +#define CONFIG_MMA 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_LPC 0 +#define CONFIG_ARCH_VERSTAGE_PPC64 0 +#define CONFIG_RESUME_PATH_SAME_AS_BOOT 0 +#define CONFIG_SA_ENABLE_IMR 0 +#define CONFIG_VBOOT_KEYBLOCK_PREAMBLE_FLAGS 0 +#define CONFIG_BOARD_ASUS_P2B_DS 0 +#define CONFIG_BOARD_LENOVO_T431S 0 +#define CONFIG_VBOOT_STARTS_IN_BOOTBLOCK 0 +#define CONFIG_BAP_E20_DDR3_1066 0 +#define CONFIG_POST_IO 1 +#define CONFIG_ARCH_BOOTBLOCK_ARMV4 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GRAPHICS 0 +#define CONFIG_DCACHE_RAM_MRC_VAR_SIZE 0 +#define CONFIG_CPU_AMD_PI_00730F01 0 +#define CONFIG_NATIVE_RAMINIT_IGNORE_XMP_MAX_DIMMS 0 +#define CONFIG_BOARD_GOOGLE_SUMO 0 +#define CONFIG_BOARD_ROMSIZE_KB_256 1 +#define CONFIG_BOARD_GOOGLE_KAKADU 0 +#define CONFIG_BOARD_GOOGLE_SWANKY 0 +#define CONFIG_NYAN_BIG_BCT_CFG_SPI 0 +#define CONFIG_USE_INTEL_FSP_TO_CALL_COREBOOT_PUBLISH_MP_PPI 0 +#define CONFIG_BOARD_GOOGLE_LEON 0 +#define CONFIG_BOARD_EMULATION_QEMU_AARCH64 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_CAR 0 +#define CONFIG_BOARD_HP_FOLIO_9470M 0 +#define CONFIG_SUPERIO_SMSC_LPC47N227 0 +#define CONFIG_CONSOLE_NE2K_IO_PORT 0 +#define CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT 0 +#define CONFIG_SOC_INTEL_APOLLOLAKE 0 +#define CONFIG_CPU_INTEL_SOCKET_FCBGA559 0 +#define CONFIG_EXCLUDE_NATIVE_SD_INTERFACE 0 +#define CONFIG_GALILEO_GEN2 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SCS 0 +#define CONFIG_HPET_ADDRESS_OVERRIDE 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_VERSION_2 0 +#define CONFIG_DRIVERS_I2C_W83793 0 +#define CONFIG_VENDOR_ASROCK 0 +#define CONFIG_TIMER_QUEUE 0 +#define CONFIG_SUPERIO_ITE_IT8623E 0 +#define CONFIG_SPI_FLASH_INCLUDE_ALL_DRIVERS 0 +#define CONFIG_DRIVERS_AMD_PI 0 +#define CONFIG_CAVIUM_BDK_DDR_TUNE_HW_OFFSETS 0 +#define CONFIG_SOC_INTEL_JASPERLAKE 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_GPIO 0 +#define CONFIG_PMC_GLOBAL_RESET_ENABLE_LOCK 0 +#define CONFIG_BOARD_PCENGINES_APU3 0 +#define CONFIG_MEMTEST_REVISION 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_SMBUS 1 +#define CONFIG_VENDOR_PROTECTLI 0 +#define CONFIG_FSP2_0_DISPLAY_LOGO 0 +#define CONFIG_VGA_ROM_RUN 0 +#define CONFIG_ARCH_RAMSTAGE_X86_64 0 +#define CONFIG_COMPRESSED_PAYLOAD_LZMA 1 +#define CONFIG_SPI_FLASH_NO_FAST_READ 0 +#define CONFIG_GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0 +#define CONFIG_SUPERIO_ITE_COMMON_PRE_RAM 0 +#define CONFIG_DIMM_MAX 4 +#define CONFIG_SUPERIO_NUVOTON_NCT6779D 0 +#define CONFIG_MT8183_DRAM_EMCP 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_I2C_BUS 0 +#define CONFIG_VENDOR_BAP 0 +#define CONFIG_X86EMU_DEBUG_CHECK_VMEM_ACCESS 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_7 1 +#define CONFIG_MAINBOARD_HAS_TPM2 0 +#define CONFIG_RTC 0 +#define CONFIG_CONSOLE_SERIAL_19200 0 +#define CONFIG_NO_GFX_INIT 0 +#define CONFIG_MMCONF_BUS_NUMBER 0 +#define CONFIG_SPKMODEM 0 +#define CONFIG_MAINBOARD_HAS_I2C_TPM_CR50 0 +#define CONFIG_CRB_TPM_BASE_ADDRESS 0xfed40000 +#define CONFIG_BOARD_GOOGLE_KRANE 0 +#define CONFIG_PAYLOAD_DEPTHCHARGE 0 +#define CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT 0 +#define CONFIG_CONSOLE_SPI_FLASH 0 +#define CONFIG_DRIVERS_I2C_PCF8523 0 +#define CONFIG_DISPLAY_FSP_ENTRY_POINTS 0 +#define CONFIG_CPU_INTEL_COMMON 0 +#define CONFIG_BOARD_GOOGLE_CAREENA 0 +#define CONFIG_C_ENV_BOOTBLOCK_SIZE 0x4000 +#define CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL 0 +#define CONFIG_INTEL_LPSS_UART_FOR_CONSOLE 0 +#define CONFIG_VBOOT_HAS_REC_HASH_SPACE 0 +#define CONFIG_MAINBOARD_SUPPORTS_KABYLAKE_DUAL 0 +#define CONFIG_PAYLOAD_FILE "payloads/external/SeaBIOS/seabios/out/bios.bin.elf" +#define CONFIG_UDK_2015_VERSION 0 +#define CONFIG_RAMTOP 0x1000000 +#define CONFIG_FSP_ESRAM_LOC 0 +#define CONFIG_GIC 0 +#define CONFIG_MAINBOARD_USE_LIBGFXINIT 0 +#define CONFIG_LINUXBOOT_UROOT_V2_0_0 0 +#define CONFIG_SUPERIO_NUVOTON_NCT5539D 0 +#define CONFIG_UEFI_2_4_BINDING 0 +#define CONFIG_PSP_LOAD_MP2_FW 0 +#define CONFIG_UTIL_GENPARSER 0 +#define CONFIG_RUN_FSP_GOP 0 +#define CONFIG_ARCH_BOOTBLOCK_X86_32 1 +#define CONFIG_BOARD_ASUS_AM1I_A 0 +#define CONFIG_ARCH_VERSTAGE_ARMV7_M 0 +#define CONFIG_HUDSON_LEGACY_FREE 0 +#define CONFIG_NORTHBRIDGE_INTEL_SUBTYPE_I945GC 0 +#define CONFIG_MT8183_DRAM_DVFS 0 +#define CONFIG_ONBOARD_SAMSUNG_MEM 0 +#define CONFIG_BOARD_GOOGLE_PARROT 0 +#define CONFIG_HAVE_S3_SUPPORT 0 +#define CONFIG_EC_51NB_NPCE985LA0DX 0 +#define CONFIG_SOC_INTEL_GLK 0 +#define CONFIG_DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ 0 +#define CONFIG_GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK 0 +#define CONFIG_BOARD_GOOGLE_CASTA 0 +#define CONFIG_HUDSON_XHCI_ENABLE 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_CYAN 0 +#define CONFIG_SUPERIO_NSC_PC87382 0 +#define CONFIG_CHROMEOS_RAMOOPS_DYNAMIC 0 +#define CONFIG_STORAGE_EARLY_WRITE 0 +#define CONFIG_INTEL_TXT_BIOSACM_ALIGNMENT 0 +#define CONFIG_ONBOARD_MEM_KINGSTON 0 +#define CONFIG_SUPERIO_FINTEK_F71863FG 0 +#define CONFIG_CPU_INTEL_SOCKET_BGA956 0 +#define CONFIG_DRIVERS_I2C_NCT7802Y 0 +#define CONFIG_VENDOR_51NB 0 +#define CONFIG_APU2_PINMUX_UART_C 0 +#define CONFIG_SDHCI_ADMA_IN_ROMSTAGE 0 +#define CONFIG_H8_HAS_PRIMARY_FN_KEYS 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_PMBASE 0 +#define CONFIG_TPM_TIS_BASE_ADDRESS 0 +#define CONFIG_VENDOR_INTEL 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_BOARDID 0 +#define CONFIG_ARCH_RAMSTAGE_ARM64 0 +#define CONFIG_DRIVERS_DEC_21143 0 +#define CONFIG_TPM_PIRQ 0 +#define CONFIG_NATIVE_RAMINIT_IGNORE_MAX_MEM_FUSES 0 +#define CONFIG_MAX_ROOT_PORTS 0 +#define CONFIG_DRIVERS_PS2_KEYBOARD 0 +#define CONFIG_BOARD_GOOGLE_OAK 0 +#define CONFIG_MAINBOARD_NO_FSP_GOP 0 +#define CONFIG_SUPERIO_ITE_ENV_CTRL 0 +#define CONFIG_HAVE_EM100_SUPPORT 0 +#define CONFIG_CPU_AMD_AGESA_FAMILY15_TN 0 +#define CONFIG_NORTHBRIDGE_INTEL_HASWELL 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO_ITSS_POL_CFG 0 +#define CONFIG_SOC_NVIDIA_TEGRA124 0 +#define CONFIG_VBOOT_EC_EFS 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_32MB 0 +#define CONFIG_BOARD_GOOGLE_JACUZZI 0 +#define CONFIG_SB800_MANUAL_FAN_CONTROL 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_1024 0 +#define CONFIG_INTEL_DESCRIPTOR_MODE_CAPABLE 0 +#define CONFIG_NHLT_NAU88L25 0 +#define CONFIG_SOC_INTEL_CANNONLAKE_BASE 0 +#define CONFIG_MRC_SETTINGS_VARIABLE_DATA 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_REEF 0 +#define CONFIG_BOARD_GOOGLE_MEEP 0 +#define CONFIG_VENDOR_SAPPHIRE 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_10C 0 +#define CONFIG_OAK_HAS_TPM2 0 +#define CONFIG_SB800_FWM_AT_FFFA0000 0 +#define CONFIG_SUPERIO_ITE_IT8783EF 0 +#define CONFIG_DRIVER_PARADE_PS8625 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_113 0 +#define CONFIG_APU1_PINMUX_OFF_D 0 +#define CONFIG_BOARD_SIEMENS_MC_APL2 0 +#define CONFIG_MAXIMUM_SUPPORTED_FREQUENCY 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_THERMAL 0 +#define CONFIG_AMD_APU_PKG_FT4 0 +#define CONFIG_SOC_INTEL_ICELAKE 0 +#define CONFIG_USE_SAR 0 +#define CONFIG_VENDOR_PORTWELL 0 +#define CONFIG_BOARD_MSI_MS7707 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_ACPI 0 +#define CONFIG_BOARD_GOOGLE_CHEZA_COMMON 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SMBUS 0 +#define CONFIG_DRIVERS_INTEL_WIFI 1 +#define CONFIG_BOARD_ASROCK_G41M_GS 0 +#define CONFIG_MEMORY_TEST 0 +#define CONFIG_USBDEBUG_DONGLE_BEAGLEBONE 0 +#define CONFIG_WARNINGS_ARE_ERRORS 1 +#define CONFIG_BOARD_FOXCONN_D41S 0 +#define CONFIG_SUPERIO_ITE_IT8720F 0 +#define CONFIG_BOARD_GOOGLE_RAMMUS 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_LPC 0 +#define CONFIG_DEBUG_I2C 0 +#define CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE 0 +#define CONFIG_POSTCAR_CONSOLE 1 +#define CONFIG_CONFIGURABLE_CBFS_PREFIX 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_AURON 0 +#define CONFIG_FSP_TEMP_RAM_SIZE 0 +#define CONFIG_CPU_INTEL_SOCKET_MPGA604 0 +#define CONFIG_FSP_TYPE_2_0 0 +#define CONFIG_NORTHBRIDGE_AMD_PI_00730F01 0 +#define CONFIG_CONSOLE_SERIAL 1 +#define CONFIG_INCLUDE_NHLT_BLOBS_ATLAS 0 +#define CONFIG_UDELAY_LAPIC 0 +#define CONFIG_LINUXBOOT_UROOT_CUSTOM 0 +#define CONFIG_VENDORCODE_ELTAN_VBOOT_KEY_LOCATION 0 +#define CONFIG_EARLY_PCI_BRIDGE_DEVICE 0 +#define CONFIG_CRB_TPM 0 +#define CONFIG_SOC_INTEL_COMMON_MMC_OVERRIDE 0 +#define CONFIG_DIGITIZER_ABSENT 0 +#define CONFIG_PCIEXP_HOTPLUG_PREFETCH_MEM 0 +#define CONFIG_BOARD_LIPPERT_FRONTRUNNER_AF 0 +#define CONFIG_INTEL_HAS_TOP_SWAP 0 +#define CONFIG_CBFS_PREFIX "fallback" +#define CONFIG_DIMM_SPD_SIZE 256 +#define CONFIG_COVERAGE 0 +#define CONFIG_SPI_FLASH_GIGADEVICE 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_32768 0 +#define CONFIG_PADMELON_MERLIN_FALCON 0 +#define CONFIG_USBDEBUG_DONGLE_FTDI_FT232H_BAUD 0 +#define CONFIG_BOARD_GOOGLE_SMAUG 0 +#define CONFIG_SUPERIO_FINTEK_F81803A 0 +#define CONFIG_MAINBOARD_SMBIOS_MANUFACTURER "Emulation" +#define CONFIG_PLATFORM_USES_FSP2_0 0 +#define CONFIG_SD_MMC_DEBUG 0 +#define CONFIG_OVERRIDE_CLOCK_DISABLE 0 +#define CONFIG_BOARD_LENOVO_L520 0 +#define CONFIG_MAINBOARD_HAS_NATIVE_VGA_INIT 1 +#define CONFIG_BOARD_SUPERMICRO_X11SSH_TF 0 +#define CONFIG_SOUTHBRIDGE_SPECIFIC_OPTIONS 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_6144 0 +#define CONFIG_DRIVERS_ASPEED_AST2050 0 +#define CONFIG_BOARD_VARIANT_AP148 0 +#define CONFIG_BOARD_GOOGLE_NEFARIO 0 +#define CONFIG_S3_DATA_POS 0 +#define CONFIG_SPI_CONSOLE 0 +#define CONFIG_GENERIC_GPIO_LIB 0 +#define CONFIG_SPI_FLASH_STMICRO 0 +#define CONFIG_CPU_INTEL_SOCKET_P 0 +#define CONFIG_RESET_VECTOR_IN_RAM 0 +#define CONFIG_MAINBOARD_USES_IFD_GBE_REGION 0 +#define CONFIG_TPM_TIS_ACPI_INTERRUPT 0 +#define CONFIG_BOARD_GOOGLE_FOOB 0 +#define CONFIG_COOP_MULTITASKING 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_107 0 +#define CONFIG_PAYLOAD_SEABIOS 1 +#define CONFIG_BOARD_GOOGLE_JUNIPER 0 +#define CONFIG_RAMPAYLOAD 0 +#define CONFIG_ON_DEVICE_ROM_LOAD 0 +#define CONFIG_EC_LENOVO_H8 0 +#define CONFIG_USER_TPM1 0 +#define CONFIG_USES_MICROCODE_HEADER_FILES 0 +#define CONFIG_DRIVER_TIS_DEFAULT 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_0 0 +#define CONFIG_VENDORCODE_ELTAN_VBOOT_USE_SHA512 0 +#define CONFIG_MISSING_BOARD_RESET 0 +#define CONFIG_ELOG_CBMEM 0 +#define CONFIG_LINUXBOOT_RISCV 0 +#define CONFIG_CONSOLE_SERIAL_TEGRA210_UART_ADDRESS 0 +#define CONFIG_CR50_IMMEDIATELY_COMMIT_FW_SECDATA 0 +#define CONFIG_RAMBASE 0xe00000 +#define CONFIG_BOARD_LENOVO_THINKPAD_T440P 0 +#define CONFIG_BOARD_GOOGLE_VEYRON_MINNIE 0 +#define CONFIG_SB_SUPERIO_HWM 0 +#define CONFIG_SOUTHBRIDGE_INTEL_C216 0 +#define CONFIG_SDM845_QSPI 0 +#define CONFIG_PRERAM_CBMEM_CONSOLE_SIZE 0xc00 +#define CONFIG_TEGRA124_MODEL_TD570D 0 +#define CONFIG_GENERATE_SMBIOS_TABLES 1 +#define CONFIG_BOARD_GOOGLE_GALE 0 +#define CONFIG_FSP_TYPE_2_0_PEI 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_ACPI_MADT 0 +#define CONFIG_DRIVERS_GENERIC_GPIO_KEYS 0 +#define CONFIG_INCLUDE_NHLT_BLOBS_NOCTURNE 0 +#define CONFIG_AMDFW_OUTSIDE_CBFS 0 +#define CONFIG_SUPERIO_NUVOTON_NCT5539D_COM_A 0 +#define CONFIG_XIP_ROM_SIZE 0x10000 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO_PADCFG_PADTOL 0 +#define CONFIG_BOARD_ROMSIZE_KB_64 0 +#define CONFIG_GBB_FLAG_DISABLE_FWMP 0 +#define CONFIG_SIPI_VECTOR_IN_ROM 0 +#define CONFIG_VENDOR_OCP 0 +#define CONFIG_EC_KONTRON_KEMPLD 0 +#define CONFIG_VALIDATE_INTEL_DESCRIPTOR 0 +#define CONFIG_OPENSBI_TEXT_START 0 +#define CONFIG_UART_C_RS485 0 +#define CONFIG_SOC_QC_IPQ806X 0 +#define CONFIG_DEBUG_SPI_FLASH 0 +#define CONFIG_TIANOCORE_USE_8254_TIMER 0 +#define CONFIG_SB800_SATA_MODE 0 +#define CONFIG_AGESA_BINARY_PI_LOCATION 0 +#define CONFIG_VENDOR_TI 0 +#define CONFIG_BOARD_PURISM_LIBREM15_V2 0 +#define CONFIG_SOC_INTEL_CANNONLAKE_PCH_H 0 +#define CONFIG_WIFI_SAR_CBFS 0 +#define CONFIG_X86_AMD_FIXED_MTRRS 0 +#define CONFIG_NHLT_DMIC_2CH_16B 0 +#define CONFIG_PCI 1 +#define CONFIG_BOARD_GOOGLE_ALEENA 0 +#define CONFIG_VARIANT_SPECIFIC_OPTIONS_ATLAS 0 +#define CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS 0 +#define CONFIG_BOARD_LENOVO_T500 0 +#define CONFIG_CPU_AMD_AGESA_FAMILY16_KB 0 +#define CONFIG_BOARD_GOOGLE_STORM 0 +#define CONFIG_CPU_MICROCODE_CBFS_DEFAULT_BINS 0 +#define CONFIG_PAYLOAD_LINUXBOOT 0 +#define CONFIG_BOARD_ROMSIZE_KB_32768 0 +#define CONFIG_GFXUMA 0 +#define CONFIG_ARCH_RISCV 0 +#define CONFIG_BOARD_GOOGLE_SCARLET 0 +#define CONFIG_NYAN_BCT_CFG_EMMC 0 +#define CONFIG_BOARD_ASUS_P5QL_EM 0 +#define CONFIG_ARCH_ROMSTAGE_ARMV7_R 0 +#define CONFIG_DRAGONEGG_USE_SPI_TPM 0 +#define CONFIG_VENDOR_SIEMENS 0 +#define CONFIG_VENDOR_JETWAY 0 +#define CONFIG_BOARD_GOOGLE_SENTRY 0 +#define CONFIG_CPU_INTEL_COMMON_SMM 0 +#define CONFIG_BOARD_GOOGLE_OAK_COMMON 0 +#define CONFIG_VENDOR_FOXCONN 0 +#define CONFIG_UDELAY_TSC 1 +#define CONFIG_SOC_INTEL_COMMON_SKYLAKE_BASE 0 +#define CONFIG_BOARD_LENOVO_W530 0 +#define CONFIG_GLK_INTEL_EC 0 +#define CONFIG_MMCONF_BASE_ADDRESS 0 +#define CONFIG_BOARD_PCENGINES_APU4 0 +#define CONFIG_BOARD_INTEL_DCP847SKE 0 +#define CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC 0 +#define CONFIG_PCIEXP_CLK_PM 0 +#define CONFIG_GFX_GMA_PANEL_1_ON_LVDS 0 +#define CONFIG_DRIVERS_GENERIC_GENERIC 0 +#define CONFIG_EC_BASE_ACPI_DATA 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SMM_IO_TRAP 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_SMBUS 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_LOCK_MEMORY 0 +#define CONFIG_BOARD_GOOGLE_POPPY 0 +#define CONFIG_CAVIUM_BDK_VERBOSE_DRAM 0 +#define CONFIG_BOARD_GOOGLE_KOHAKU 0 +#define CONFIG_NUM_IPI_STARTS 2 +#define CONFIG_HAS_RECOVERY_MRC_CACHE 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_VOLTEER 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_MEC 0 +#define CONFIG_VARIANT_SPECIFIC_OPTIONS_RAMMUS 0 +#define CONFIG_BOARD_GOOGLE_CORAL 0 +#define CONFIG_BOARD_RAZER_BLADE_STEALTH_KBL_16GB 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP 0 +#define CONFIG_BOARD_ASUS_F2A85_M_DDR3_VOLT_150 0 +#define CONFIG_ARCH_BOOTBLOCK_ARMV7_R 0 +#define CONFIG_UART_OVERRIDE_BAUDRATE 0 +#define CONFIG_ARCH_ROMSTAGE_RISCV 0 +#define CONFIG_SPI_FLASH 0 +#define CONFIG_ARCH_RISCV_M_DISABLED 0 +#define CONFIG_BOARD_GOOGLE_BLOOG 0 +#define CONFIG_HASWELL_VBOOT_IN_BOOTBLOCK 0 +#define CONFIG_ENABLE_BUILTIN_HSUART0 0 +#define CONFIG_SLOT_SPECIFIC_OPTIONS 0 +#define CONFIG_BOARD_LENOVO_T420 0 +#define CONFIG_CPU_INTEL_HASWELL 0 +#define CONFIG_BOARD_GOOGLE_SAMUS 0 +#define CONFIG_GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0 +#define CONFIG_AGESA_SPLIT_MEMORY_FILES 0 +#define CONFIG_VENDORCODE_ELTAN_VBOOT 0 +#define CONFIG_SOC_AMD_PSP_SELECTABLE_SMU_FW 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_116 0 +#define CONFIG_PAYLOAD_SPECIFIC_OPTIONS 0 +#define CONFIG_SOUTHBRIDGE_TI_PCIXX12 0 +#define CONFIG_PAYLOAD_YABITS 0 +#define CONFIG_CONSOLE_SPI_FLASH_BUFFER_SIZE 0 +#define CONFIG_GBB_FLAG_ENTER_TRIGGERS_TONORM 0 +#define CONFIG_ENABLE_POWER_BUTTON 0 +#define CONFIG_CPU_INTEL_MODEL_F2X 0 +#define CONFIG_BOARD_LENOVO_R400 0 +#define CONFIG_INCLUDE_NHLT_BLOBS_NAMI 0 +#define CONFIG_DRIVERS_MC146818 1 +#define CONFIG_DEPTHCHARGE_STABLE 0 +#define CONFIG_TPM_RDRESP_NEED_DELAY 0 +#define CONFIG_NORTHBRIDGE_AMD_AGESA 0 +#define CONFIG_COMMONLIB_STORAGE 0 +#define CONFIG_BOARD_PURISM_LIBREM13_V2 0 +#define CONFIG_DRIVERS_GENERIC_GPIO_REGULATOR 0 +#define CONFIG_HWBASE_DEBUG_CB 1 +#define CONFIG_VBOOT_NO_BOARD_SUPPORT 0 +#define CONFIG_CPU_MICROCODE_CBFS_NONE 0 +#define CONFIG_PICASSO_ACPI_IO_BASE 0 +#define CONFIG_USE_CANNONLAKE_CAR_NEM_ENHANCED 0 +#define CONFIG_SUPERIO_ITE_IT8721F 0 +#define CONFIG_BOARD_INTEL_KBLRVP7 0 +#define CONFIG_BOARD_GIGABYTE_GA_B75_D3V 0 +#define CONFIG_HAVE_VBE_LINEAR_FRAMEBUFFER 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE 0 +#define CONFIG_UART_FOR_CONSOLE 0 +#define CONFIG_CPU_INTEL_MODEL_1067X 0 +#define CONFIG_YABEL_PCI_FAKE_WRITING_OTHER_DEVICES_CONFIG 0 +#define CONFIG_X86EMU_DEBUG_IO 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_SPI_CHIP 0 +#define CONFIG_DRAM_RESET_GATE_GPIO 0 +#define CONFIG_STONEYRIDGE_UART 0 +#define CONFIG_VBE_LINEAR_FRAMEBUFFER 0 +#define CONFIG_USE_WATCHDOG_ON_BOOT 0 +#define CONFIG_USE_GENERIC_FSP_CAR_INC 0 +#define CONFIG_BOARD_ODE_E20XX 0 +#define CONFIG_DEBUG_CBFS 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_BUILTIN 0 +#define CONFIG_BOARD_AMD_OLIVEHILL 0 +#define CONFIG_BOARD_GOOGLE_HELI 0 +#define CONFIG_DEVICETREE "devicetree.cb" +#define CONFIG_USBDEBUG_IN_PRE_RAM 0 +#define CONFIG_CMOS_POST_EXTRA 0 +#define CONFIG_MSEG_SIZE 0 +#define CONFIG_X86EMU_DEBUG_MEM 0 +#define CONFIG_STONEYRIDGE_XHCI_ENABLE 0 +#define CONFIG_VBOOT_LIB 0 +#define CONFIG_USE_BLOBS 0 +#define CONFIG_BOARD_GOOGLE_VEYRON_SPEEDY 0 +#define CONFIG_NO_STAGE_CACHE 1 +#define CONFIG_INTEL_GMA_ADD_VBT 0 +#define CONFIG_CONSOLE_QEMU_DEBUGCON 1 +#define CONFIG_UART_USE_REFCLK_AS_INPUT_CLOCK 0 +#define CONFIG_BOARD_GOOGLE_CYAN 0 +#define CONFIG_VGA_BIOS_DGPU 0 +#define CONFIG_ARCH_RAMSTAGE_ARMV7 0 +#define CONFIG_DRIVERS_I2C_PCA9538 0 +#define CONFIG_ACPI_NO_PCAT_8259 0 +#define CONFIG_BOARD_PROTECTLI_FW6 0 +#define CONFIG_ADD_RMU_FILE 0 +#define CONFIG_ARCH_RAMSTAGE_PPC64 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_PI 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_PCR 0 +#define CONFIG_BOARD_GOOGLE_NINJA 0 +#define CONFIG_BOARD_GOOGLE_HELIOS_DISKSWAP 0 +#define CONFIG_LP_DEFCONFIG_OVERRIDE 0 +#define CONFIG_BOARD_INTEL_GLKRVP 0 +#define CONFIG_HAVE_FSP_BIN 0 +#define CONFIG_NHLT_DMIC_4CH 0 +#define CONFIG_BOARD_GOOGLE_ELM 0 +#define CONFIG_ARCH_VERSTAGE_ARMV7 0 +#define CONFIG_SANDYBRIDGE_VBOOT_IN_ROMSTAGE 0 +#define CONFIG_BOARD_BIOSTAR_AM1ML 0 +#define CONFIG_CONSOLE_POST 0 +#define CONFIG_DRIVER_TPM_DISPLAY_TIS_BYTES 0 +#define CONFIG_NEED_IFWI 0 +#define CONFIG_BUILD_IPXE 0 +#define CONFIG_PICASSO_UART_CLOCK_SOURCE 0 +#define CONFIG_ARCH_RISCV_U 0 +#define CONFIG_VENDOR_SUPERMICRO 0 +#define CONFIG_BOARD_GOOGLE_FLEEX 0 +#define CONFIG_BOARD_SYSTEM76_LEMP9 0 +#define CONFIG_MAX_CPUS 1 +#define CONFIG_BOOT_DEVICE_SPI_FLASH_BUS 0 +#define CONFIG_ARCH_RAMSTAGE_ARM 0 +#define CONFIG_CONSOLE_SERIAL_9600 0 +#define CONFIG_COMMONLIB_STORAGE_SD 0 +#define CONFIG_USBDEBUG_DEFAULT_PORT 0 +#define CONFIG_CAVIUM_BDK_VERBOSE_DRAM_TEST 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_100 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_I2C 0 +#define CONFIG_CPU_INTEL_MODEL_6BX 0 +#define CONFIG_COMPRESSED_PAYLOAD_NONE 0 +#define CONFIG_SOC_INTEL_COMMON 0 +#define CONFIG_USER_TPM2 0 +#define CONFIG_PCIEX_LENGTH_64MB 0 +#define CONFIG_PAYLOAD_FIT 0 +#define CONFIG_HUDSON_GEC_FWM 0 +#define CONFIG_ATHEROS_ATL1E_SETMAC 0 +#define CONFIG_BOARD_GOOGLE_GLIMMER 0 +#define CONFIG_SUPERIO_NUVOTON_NCT6776_COM_A 0 +#define CONFIG_PCI_OPTION_ROM_RUN_YABEL 0 +#define CONFIG_BOARD_INTEL_JASPERLAKE_RVP 0 +#define CONFIG_SUPERIO_SMSC_SIO10N268 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_118 0 +#define CONFIG_SMAUG_BCT_CFG_EMMC 0 +#define CONFIG_BOARD_GOOGLE_CELES 0 +#define CONFIG_DEBUG_PIRQ 0 +#define CONFIG_STONEYRIDGE_XHCI_FWM 0 +#define CONFIG_COMMON_CBFS_SPI_WRAPPER 0 +#define CONFIG_GBB_FLAG_RUNNING_FAFT 0 +#define CONFIG_HPET_ADDRESS 0xfed00000 +#define CONFIG_BOARD_GOOGLE_NOCTURNE 0 +#define CONFIG_NHLT_SSM4567 0 +#define CONFIG_CPU_INTEL_NUM_FIT_ENTRIES 0 +#define CONFIG_ARCH_VERSTAGE_ARMV7_R 0 +#define CONFIG_MAINBOARD_SUPPORTS_KABYLAKE_CPU 0 +#define CONFIG_BOARD_GOOGLE_ULTIMA 0 +#define CONFIG_TPM_INIT 0 +#define CONFIG_PAYLOAD_FILO 0 +#define CONFIG_CONSOLE_SERIAL_57600 0 +#define CONFIG_BOARD_LENOVO_X230T 0 +#define CONFIG_GEO_SAR_ENABLE 0 +#define CONFIG_BOARD_GIGABYTE_GA_B75M_D3V 0 +#define CONFIG_LINUXBOOT_UROOT_V1_0_0 0 +#define CONFIG_VBOOT_MOCK_SECDATA 0 +#define CONFIG_PMC_INVALID_READ_AFTER_WRITE 0 +#define CONFIG_PC80_SYSTEM 1 +#define CONFIG_EC_GOOGLE_CHROMEEC_RTC 0 +#define CONFIG_SUPERIO_FINTEK_F81216H 0 +#define CONFIG_BOARD_LENOVO_T530 0 +#define CONFIG_MAINBOARD_SUPPORTS_KABYLAKE_QUAD 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_PSP 0 +#define CONFIG_DRIVERS_EMULATION_QEMU_BOCHS 1 +#define CONFIG_SUPERIO_RENESAS_M3885X 0 +#define CONFIG_IS_GLK_RVP_1 0 +#define CONFIG_BOARD_GOOGLE_RELM 0 +#define CONFIG_ENABLE_DEBUG_LED_ESRAM 0 +#define CONFIG_HAVE_CONFIGURABLE_RAMSTAGE 0 +#define CONFIG_BOARD_GOOGLE_BUDDY 0 +#define CONFIG_DRIVERS_AS3722_RTC 0 +#define CONFIG_SMMSTORE 0 +#define CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER 1 +#define CONFIG_SOC_AMD_COMMON_BLOCK_ACPIMMIO 0 +#define CONFIG_INTEL_GMA_ACPI 0 +#define CONFIG_ENABLE_SD_TESTING 0 +#define CONFIG_SD_MMC_TRACE 0 +#define CONFIG_INTEL_CAR_NEM_ENHANCED 0 +#define CONFIG_INCLUDE_NHLT_BLOBS_NAUTILUS 0 +#define CONFIG_GFX_GMA_ANALOG_I2C_HDMI_B 0 +#define CONFIG_FILO_STABLE 0 +#define CONFIG_HWBASE_DYNAMIC_MMIO 0 +#define CONFIG_BOARD_RODA_RW11 0 +#define CONFIG_NORTHBRIDGE_INTEL_I440BX 0 +#define CONFIG_SMBIOS_ENCLOSURE_TYPE 0x03 +#define CONFIG_VBOOT_ALWAYS_ALLOW_UDC 0 +#define CONFIG_VBOOT_LID_SWITCH 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SMM_S5_DELAY_MS 0 +#define CONFIG_CPU_INTEL_MODEL_6XX 0 +#define CONFIG_GFX_GMA_PANEL_1_ON_EDP 0 +#define CONFIG_RISCV_HAS_OPENSBI 0 +#define CONFIG_NHLT_RT5514 0 +#define CONFIG_BOARD_HP_ABM 0 +#define CONFIG_IPXE_MASTER 0 +#define CONFIG_HAVE_MTC 0 +#define CONFIG_X86EMU_DEBUG_INT10 0 +#define CONFIG_PAYLOAD_NONE 0 +#define CONFIG_BOARD_LENOVO_T420S 0 +#define CONFIG_BOARD_GOOGLE_PYRO 0 +#define CONFIG_BOARD_LENOVO_X201 0 +#define CONFIG_SOC_MEDIATEK_MT8183 0 +#define CONFIG_ELOG_GSMI 0 +#define CONFIG_BOARD_GOOGLE_DOOD 0 +#define CONFIG_BOARD_INTEL_ICELAKE_RVPY 0 +#define CONFIG_TSEG_STAGE_CACHE 0 +#define CONFIG_DRIVERS_TI_TPS65913_RTC_BUS 0 +#define CONFIG_CPU_AMD_AGESA 0 +#define CONFIG_BOARD_SUPERMICRO_BASEBOARD_X11_LGA1151_SERIES 0 +#define CONFIG_DRIVERS_I2C_ADT7463 0 +#define CONFIG_DRIVER_INTEL_I210 0 +#define CONFIG_USE_ME_CLEANER 0 +#define CONFIG_CONSOLE_SERIAL_460800 0 +#define CONFIG_ARCH_BOOTBLOCK_ARM64 0 +#define CONFIG_ENABLE_DEBUG_LED_BOOTBLOCK_ENTRY 0 +#define CONFIG_CPU_INTEL_MODEL_65X 0 +#define CONFIG_RAMSTAGE_LIBHWBASE 0 +#define CONFIG_BOARD_VARIANT_DK01 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SMM_ESPI_DISABLE 0 +#define CONFIG_SOUTHBRIDGE_RICOH_RL5C476 0 +#define CONFIG_HAVE_RAMSTAGE 1 +#define CONFIG_COREBOOT_ROMSIZE_KB_65536 0 +#define CONFIG_BOARD_ROMSIZE_KB_4096 0 +#define CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN 0 +#define CONFIG_LINUXBOOT_UROOT_SOURCE 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_CAR 0 +#define CONFIG_HAVE_REGULATORY_DOMAIN 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_115 0 +#define CONFIG_BOARD_GOOGLE_HELIOS 0 +#define CONFIG_PI_AGESA_HEAP_SIZE 0 +#define CONFIG_PICASSO_UART_LEGACY 0 +#define CONFIG_IQAT_MEMORY_REGION_SIZE 0 +#define CONFIG_MAINBOARD_PART_NUMBER "QEMU x86 i440fx/piix4" +#define CONFIG_STORAGE_TEST 0 +#define CONFIG_BOARD_GOOGLE_TROGDOR 0 +#define CONFIG_HAVE_CF9_RESET_PREPARE 0 +#define CONFIG_SMP 1 +#define CONFIG_NC_FPGA_NOTIFY_CB_READY 0 +#define CONFIG_BAP_E21_DDR3_1333 0 +#define CONFIG_DRIVERS_UART_8250IO_SKIP_INIT 0 +#define CONFIG_BOARD_UP_SQUARED 0 +#define CONFIG_INTEL_LYNXPOINT_LP 0 +#define CONFIG_EC_LENOVO_PMH7 0 +#define CONFIG_VENDOR_SIFIVE 0 +#define CONFIG_CBFS_AUTOGEN_ATTRIBUTES 0 +#define CONFIG_SUPERIO_NUVOTON_NCT5104D 0 +#define CONFIG_SOC_INTEL_CANNONLAKE_DEBUG_CONSENT 0 +#define CONFIG_CONSOLE_UART_BASE_ADDRESS 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_DISABLED 0 +#define CONFIG_HECI_DISABLE_USING_SMM 0 +#define CONFIG_DRIVER_TPM_SPI_CHIP 0 +#define CONFIG_SUPERIO_SMSC_FDC37N972 0 +#define CONFIG_ELOG_BOOT_COUNT_CMOS_OFFSET 0 +#define CONFIG_SUPERIO_SMSC_LPC47N217 0 +#define CONFIG_HAVE_USBDEBUG_OPTIONS 0 +#define CONFIG_BOARD_PURISM_BASEBOARD_LIBREM_BDW 0 +#define CONFIG_BOARD_GOOGLE_WIZPIG 0 +#define CONFIG_CONSOLE_SERIAL_TEGRA210_UARTB 0 +#define CONFIG_BOARD_ASUS_P2B_D 0 +#define CONFIG_PRE_GRAPHICS_DELAY 0 +#define CONFIG_CPU_AMD_AGESA_FAMILY14 0 +#define CONFIG_NO_XIP_EARLY_STAGES 0 +#define CONFIG_SOUTHBRIDGE_AMD_AGESA_HUDSON 0 +#define CONFIG_CPU_ARMLTD_CORTEX_A9 0 +#define CONFIG_BOARD_GOOGLE_LIARA 0 +#define CONFIG_GDB_WAIT 0 +#define CONFIG_PCI_OPTION_ROM_RUN_REALMODE 0 +#define CONFIG_FSP_BUILD_TYPE_DEBUG 0 +#define CONFIG_BOARD_GOOGLE_NAUTILUS 0 +#define CONFIG_BOARD_GOOGLE_SAND 0 +#define CONFIG_NORTHBRIDGE_INTEL_I945 0 +#define CONFIG_BOARD_LENOVO_S230U 0 +#define CONFIG_CHECK_ME 0 +#define CONFIG_MAINBOARD_DO_SOR_INIT 0 +#define CONFIG_BOARD_LENOVO_X1_CARBON_GEN1 0 +#define CONFIG_ACPI_NHLT 0 +#define CONFIG_SYSTEM_TYPE_CONVERTIBLE 0 +#define CONFIG_SOC_INTEL_BROADWELL 0 +#define CONFIG_FSP_T_XIP 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_FINALIZE 0 +#define CONFIG_SOC_INTEL_COMMON_LPSS_UART_CLK_N_VAL 0 +#define CONFIG_DSAR_ENABLE 0 +#define CONFIG_CONSOLE_OVERRIDE_LOGLEVEL 0 +#define CONFIG_ARCH_VERSTAGE_ARMV4 0 +#define CONFIG_VEYRON_FORCE_BINARY_RAM_CODE 0 +#define CONFIG_PCIEXP_AER 0 +#define CONFIG_USER_NO_TPM 1 +#define CONFIG_USBDEBUG_DONGLE_FTDI_FT232H 0 +#define CONFIG_PARALLEL_MP_AP_WORK 0 +#define CONFIG_BOARD_LENOVO_G505S 0 +#define CONFIG_LOCALVERSION "" +#define CONFIG_ARCH_BOOTBLOCK_X86_64 0 +#define CONFIG_SDHCI_BOUNCE_BUFFER 0 +#define CONFIG_SUPERIO_FINTEK_F71859 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI_ICH7 0 +#define CONFIG_HAVE_CF9_RESET 1 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO_MULTI_ACPI_DEVICES 0 +#define CONFIG_TPM1 0 +#define CONFIG_H8_FLASH_LEDS_ON_DEATH 0 +#define CONFIG_POWER_BUTTON_DEFAULT_DISABLE 0 +#define CONFIG_DIGITIZER_PRESENT 0 +#define CONFIG_GBB_FLAG_DISABLE_LID_SHUTDOWN 0 +#define CONFIG_PCI_IO_CFG_EXT 0 +#define CONFIG_USE_SIEMENS_HWILIB 0 +#define CONFIG_GBB_FLAG_ENABLE_ALTERNATE_OS 0 +#define CONFIG_BOARD_GOOGLE_GANDOF 0 +#define CONFIG_BOARD_LENOVO_X1 0 +#define CONFIG_VBOOT_RETURN_FROM_VERSTAGE 0 +#define CONFIG_SOFTWARE_I2C 0 +#define CONFIG_ARCH_BOOTBLOCK_ARM 0 +#define CONFIG_BAP_E21_DDR3_800 0 +#define CONFIG_BOARD_SIEMENS_MC_APL6 0 +#define CONFIG_VBOOT_STARTS_IN_ROMSTAGE 0 +#define CONFIG_NHLT_RT5682 0 +#define CONFIG_SMM_MODULE_STACK_SIZE 0 +#define CONFIG_USE_NATIVE_RAMINIT 0 +#define CONFIG_BOARD_GOOGLE_BOBBA 0 +#define CONFIG_GENERATE_PIRQ_TABLE 1 +#define CONFIG_PAYLOAD_LINUX 0 +#define CONFIG_USE_MARCH_586 0 +#define CONFIG_IDT_IN_EVERY_STAGE 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_RTC 1 +#define CONFIG_NHLT_DMIC_1CH_16B 0 +#define CONFIG_DEFAULT_POST_ON_LPC 0 +#define CONFIG_AP_IN_SIPI_WAIT 0 +#define CONFIG_CPU_INTEL_COMMON_HYPERTHREADING 0 +#define CONFIG_CPU_INTEL_SLOT_1 0 +#define CONFIG_BOARD_GIGABYTE_GA_H61MA_D3V 0 +#define CONFIG_BOARD_GOOGLE_EVE 0 +#define CONFIG_BOARD_GOOGLE_GRUNT 0 +#define CONFIG_ROMSTAGE_DEBUG_SPINLOOP 0 +#define CONFIG_CPU_AMD_AGESA_OPENSOURCE 0 +#define CONFIG_DEPTHCHARGE_MASTER 0 +#define CONFIG_PLATFORM_USES_FSP1_1 0 +#define CONFIG_EC_ACPI 0 +#define CONFIG_AMD_APU_STONEYRIDGE 0 +#define CONFIG_BOARD_GOOGLE_AMPTON 0 +#define CONFIG_NHLT_DMIC_4CH_16B 0 +#define CONFIG_BOARD_GOOGLE_DRALLION 0 +#define CONFIG_X86_TOP4G_BOOTMEDIA_MAP 1 +#define CONFIG_ACPI_SATA_GENERATOR 0 +#define CONFIG_SB800_AHCI_ROM 0 +#define CONFIG_TPM_ON_FAST_SPI 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER 0 +#define CONFIG_SOC_AMD_PI 0 +#define CONFIG_BOARD_ROMSIZE_KB_12288 0 +#define CONFIG_ACPI_CPU_STRING "\_PR.CP%02d" +#define CONFIG_APU1_PINMUX_GPIO0 0 +#define CONFIG_SUPERIO_FINTEK_FAN_API_CALL 0 +#define CONFIG_STONEYRIDGE_GEC_FWM 0 +#define CONFIG_GFX_GMA_DYN_CPU 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_SKUID 0 +#define CONFIG_DEBUG_CAR 0 +#define CONFIG_SOC_INTEL_SKYLAKE 0 +#define CONFIG_DISABLE_HPET 0 +#define CONFIG_VBOOT_SLOTS_RW_A 0 +#define CONFIG_ELOG_PRERAM 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_GLADOS 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_TCO 0 +#define CONFIG_X86EMU_DEBUG_TRACE 0 +#define CONFIG_IPXE_STABLE 0 +#define CONFIG_I2C_DEBUG 0 +#define CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME "QEMU x86 i440fx/piix4" +#define CONFIG_EC_GOOGLE_CHROMEEC_I2C 0 +#define CONFIG_DEBUG_SOC_DRIVER 0 +#define CONFIG_EC_51NB_NPCE985LA0DX_FIRMWARE 0 +#define CONFIG_BASEBOARD_REEF_LAPTOP 0 +#define CONFIG_BOARD_LENOVO_T410 0 +#define CONFIG_CBFS_PREFIX_DIY 0 +#define CONFIG_BOARD_ELMEX_PCM205401 0 +#define CONFIG_HAVE_OPTION_TABLE 1 +#define CONFIG_HAVE_MP_TABLE 0 +#define CONFIG_CPU_AMD_PI_00660F01 0 +#define CONFIG_PADMELON_SOC_IN_USE 0 +#define CONFIG_H8_BEEP_ON_DEATH 0 +#define CONFIG_SPI_FLASH_ATMEL 0 +#define CONFIG_SUPERIO_FINTEK_FAN_CONTROL 0 +#define CONFIG_SUPERIO_NUVOTON_COMMON_PRE_RAM 0 +#define CONFIG_BOARD_GOOGLE_WOLF 0 +#define CONFIG_HAVE_INTEL_FIRMWARE 0 +#define CONFIG_ACPI_INTEL_HARDWARE_SLEEP_VALUES 1 +#define CONFIG_LINUXBOOT_X86_64 0 +#define CONFIG_BOARD_PCENGINES_APU2 0 +#define CONFIG_SUPERIO_ITE_IT8772F 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_LPC 0 +#define CONFIG_SPI_FLASH_HAS_VOLATILE_GROUP 0 +#define CONFIG_BOARD_HP_PAVILION_M6_1035DX 0 +#define CONFIG_SUPERIO_NUVOTON_NPCD378 0 +#define CONFIG_SMM_ASEG 1 +#define CONFIG_BOARD_GOOGLE_CLAPPER 0 +#define CONFIG_STONEYRIDGE_ACPI_IO_BASE 0 +#define CONFIG_HAVE_BOOTBLOCK 1 +#define CONFIG_BOARD_INTEL_HARCUVAR 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_4 0 +#define CONFIG_MAINBOARD_HAS_TPM1 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_CPU_MPINIT 0 +#define CONFIG_TSC_SYNC_MFENCE 0 +#define CONFIG_BOARD_GOOGLE_MCCLOUD 0 +#define CONFIG_FSP_LOC 0 +#define CONFIG_HAVE_ME_BIN 0 +#define CONFIG_BOARD_GOOGLE_REEF 0 +#define CONFIG_BOARD_GOOGLE_DAISY 0 +#define CONFIG_UDK_VERSION 0 +#define CONFIG_SERIALIZED_SMM_INITIALIZATION 0 +#define CONFIG_ARCH_RISCV_RV32 0 +#define CONFIG_SDHC_TRACE 0 +#define CONFIG_SPI_FLASH_ADESTO 0 +#define CONFIG_VENDOR_COMPULAB 0 +#define CONFIG_H8_SUPPORT_BT_ON_WIFI 0 +#define CONFIG_BOARD_ROMSIZE_KB_5120 0 +#define CONFIG_HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE 0 +#define CONFIG_LIPPERT_BOARDS_DISABLED 0 +#define CONFIG_BOARD_GIGABYTE_GA_B75M_D3H 0 +#define CONFIG_PCIEX_LENGTH_128MB 0 +#define CONFIG_PCH_SPECIFIC_OPTIONS 0 +#define CONFIG_VENDOR_LENOVO 0 +#define CONFIG_ARM_LPAE 0 +#define CONFIG_DRIVER_LENOVO_SERIALS 0 +#define CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES 0 +#define CONFIG_LBP2_FROM_IFWI 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX 0 +#define CONFIG_CHROMEOS 0 +#define CONFIG_VENDORCODE_ELTAN_VBOOT_KEY_SIZE 0 +#define CONFIG_UDELAY_LAPIC_FIXED_FSB 0 +#define CONFIG_NEED_LBP2 0 +#define CONFIG_CPU_SAMSUNG_EXYNOS5420 0 +#define CONFIG_DRIVERS_I2C_PTN3460 0 +#define CONFIG_BOARD_GIGABYTE_GA_945GCM_S2C 0 +#define CONFIG_CPU_INTEL_MODEL_2065X 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO 0 +#define CONFIG_SOUTHBRIDGE_AMD_PI_KERN 0 +#define CONFIG_CBMEM_STAGE_CACHE 0 +#define CONFIG_ARM64_A53_ERRATUM_843419 0 +#define CONFIG_DRIVERS_I2C_MAX98927 0 +#define CONFIG_BOARD_GOOGLE_MISTRAL_COMMON 0 +#define CONFIG_USBDEBUG_DONGLE_STD 0 +#define CONFIG_DISPLAY_SPD_DATA 0 +#define CONFIG_INTEL_GMA_SSC_ALTERNATE_REF 0 +#define CONFIG_HAVE_SPI_CONSOLE_SUPPORT 0 +#define CONFIG_DISABLE_UART_ON_TESTPADS 0 +#define CONFIG_X86EMU_DEBUG_DISK 0 +#define CONFIG_SEC_COMPONENT_SIZE_MB 0 +#define CONFIG_OTHERS_HAVE_TPM1 0 +#define CONFIG_MAINBOARD_VERSION "1.0" +#define CONFIG_SOUTHBRIDGE_TI_PCI7420 0 +#define CONFIG_GFX_GMA 0 +#define CONFIG_CONSOLE_SERIAL_TEGRA210_UARTA 0 +#define CONFIG_AZALIA_PLUGIN_SUPPORT 0 +#define CONFIG_BOTTOMIO_POSITION 0 +#define CONFIG_CAVIUM_BDK_DDR_TUNE_ECC_ENABLE 0 +#define CONFIG_HAVE_DEBUG_SMBUS 1 +#define CONFIG_CHROMEOS_USE_EC_WATCHDOG_FLAG 0 +#define CONFIG_ELOG_BOOT_COUNT 0 +#define CONFIG_HUDSON_IMC_FWM 0 +#define CONFIG_RELOCATABLE_MODULES 1 +#define CONFIG_MAX_SOCKET 0 +#define CONFIG_BOARD_GOOGLE_LICK 0 +#define CONFIG_BOARD_ROMSIZE_KB_512 0 +#define CONFIG_SA_PCIEX_LENGTH 0 +#define CONFIG_BOARD_ASROCK_G41C_GS 0 +#define CONFIG_SSE2 0 +#define CONFIG_REALTEK_8168_RESET 0 +#define CONFIG_BOARD_LENOVO_X230 0 +#define CONFIG_SOC_INTEL_COMMON_RESET 0 +#define CONFIG_SUPERIO_FINTEK_F81866D 0 +#define CONFIG_SUPERIO_WINBOND_W83627DHG 0 +#define CONFIG_DRIVERS_ASMEDIA_ASPM_BLACKLIST 0 +#define CONFIG_APU1_PINMUX_UART_C 0 +#define CONFIG_I2C_TPM 0 +#define CONFIG_BOARD_ASROCK_H81M_HDS 0 +#define CONFIG_HSUART_DEV 0 +#define CONFIG_VBOOT_MEASURED_BOOT 0 +#define CONFIG_UNCOMPRESSED_RAMSTAGE 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_128 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_UART 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_PCIE 0 +#define CONFIG_USE_LEGACY_8254_TIMER 0 +#define CONFIG_HAVE_CMOS_DEFAULT 1 +#define CONFIG_FIXED_UART_FOR_CONSOLE 0 +#define CONFIG_SB800_FWM_AT_FFC20000 0 +#define CONFIG_BOARD_ROMSIZE_KB_16384 0 +#define CONFIG_NORTHBRIDGE_AMD_PI_00630F01 0 +#define CONFIG_DEBUG_SMBUS 0 +#define CONFIG_POWER_STATE_DEFAULT_ON_AFTER_FAILURE 0 +#define CONFIG_LINUXBOOT_X86 0 +#define CONFIG_DRIVERS_I2C_DESIGNWARE 0 +#define CONFIG_FMDFILE "" +#define CONFIG_BOARD_HP_8470P 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_CPU 0 +#define CONFIG_TSC_MONOTONIC_TIMER 1 +#define CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES 0 +#define CONFIG_VENDOR_MSI 0 +#define CONFIG_SDHCI_ADMA_IN_BOOTBLOCK 0 +#define CONFIG_SUPERIO_WINBOND_W83627UHG 0 +#define CONFIG_DRIVERS_TI_TPS65913_RTC_ADDR 0 +#define CONFIG_LINUXBOOT_UROOT 0 +#define CONFIG_BOARD_GIGABYTE_GA_H61M_DS2V 0 +#define CONFIG_BOARD_GOOGLE_NASHER 0 +#define CONFIG_SUPERIO_FINTEK_F81865F 0 +#define CONFIG_DRIVERS_UART_SIFIVE 0 +#define CONFIG_HAVE_MONOTONIC_TIMER 1 +#define CONFIG_BOARD_GOOGLE_YORP 0 +#define CONFIG_SUPERIO_FINTEK_F71808A 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_112 0 +#define CONFIG_APU1_PINMUX_OFF_C 0 +#define CONFIG_SOC_NVIDIA_TEGRA210 0 +#define CONFIG_BOARD_SIEMENS_MC_APL1 0 +#define CONFIG_USBDEBUG 0 +#define CONFIG_HAVE_ACPI_TABLES 1 +#define CONFIG_NORTHBRIDGE_AMD_PI 0 +#define CONFIG_PCIEXP_HOTPLUG_BUSES 0 +#define CONFIG_POST_DEVICE_PCI_PCIE 0 +#define CONFIG_LOCK_SPI_FLASH_RO 0 +#define CONFIG_SOC_INTEL_COMMON_EARLY_MMC_WAKE 0 +#define CONFIG_MRC_SETTINGS_CACHE_SIZE 0 +#define CONFIG_ARCH_BOOTBLOCK_RISCV 0 +#define CONFIG_FSP_USE_REPO 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_CHIP_CONFIG 0 +#define CONFIG_DEBUG_MALLOC 0 +#define CONFIG_FRAMEBUFFER_SET_VESA_MODE 0 +#define CONFIG_BOARD_GOOGLE_NYAN_BLAZE 0 +#define CONFIG_HUDSON_SATA_MODE 0 +#define CONFIG_ARCH_ARM 0 +#define CONFIG_BOARD_APPLE_MACBOOKAIR4_2 0 +#define CONFIG_CAVIUM_BDK_DDR_TUNE_WRITE_OFFSETS 0 +#define CONFIG_PICASSO_UART_1_8MZ 0 +#define CONFIG_HAVE_REFCODE_BLOB 0 +#define CONFIG_VENDORCODE_ELTAN_VBOOT_SIGNED_MANIFEST 0 +#define CONFIG_DRIVER_I2C_TPM_ACPI 0 +#define CONFIG_ONBOARD_MEM_MICRON 0 +#define CONFIG_SOC_SETS_MSRS 0 +#define CONFIG_BOARD_LENOVO_BASEBOARD_T530 0 +#define CONFIG_SUPERIO_SMSC_MEC1308 0 +#define CONFIG_INTEL_TOP_SWAP_BOOTBLOCK_SIZE 0 +#define CONFIG_CPU_MICROCODE_CBFS_LOC 0 +#define CONFIG_LOCK_SPI_FLASH_NONE 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_RAMBI 0 +#define CONFIG_SUPERIO_SERVERENGINES_PILOT 0 +#define CONFIG_IPMI_KCS_REGISTER_SPACING 0 +#define CONFIG_DRIVERS_I2C_RT1011 0 +#define CONFIG_PCIEXP_HOTPLUG_MEM 0 +#define CONFIG_BOARD_GETAC_P470 0 +#define CONFIG_CPU_INTEL_MODEL_68X 0 +#define CONFIG_HPET_MIN_TICKS 0 +#define CONFIG_SPI_FLASH_SPANSION 0 +#define CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY16_KB 0 +#define CONFIG_MICROCODE_BLOB_UNDISCLOSED 0 +#define CONFIG_NORTHBRIDGE_INTEL_IRONLAKE 0 +#define CONFIG_BOARD_GOOGLE_NUWANI 0 +#define CONFIG_BOARD_ASROCK_IMB_A180 0 +#define CONFIG_BOARD_GOOGLE_WINKY 0 +#define CONFIG_SOC_AMD_SMU_FANNED 0 +#define CONFIG_SUPERIO_ITE_ENV_CTRL_7BIT_SLOPE_REG 0 +#define CONFIG_NHLT_MAX98927 0 +#define CONFIG_HAVE_DEBUG_GPIO 0 +#define CONFIG_IDE_COMBINED_MODE 0 +#define CONFIG_GBB_FLAG_FORCE_MANUAL_RECOVERY 0 +#define CONFIG_BOARD_GOOGLE_RIKKU 0 +#define CONFIG_BOARD_GOOGLE_GRU_COMMON 0 +#define CONFIG_PLATFORM_HAS_DRAM_CLEAR 1 +#define CONFIG_BOARD_ROMSIZE_KB_65536 0 +#define CONFIG_PLATFORM_USES_FSP2_1 0 +#define CONFIG_BOARD_ASUS_F2A85_M_PRO 0 +#define CONFIG_EC_QUANTA_ENE_KB3940Q 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_1MB 0 +#define CONFIG_BOARD_KONTRON_KTQM77 0 +#define CONFIG_BOARD_GOOGLE_AURON_YUNA 0 +#define CONFIG_INTEL_GMA_SWSMISCI 0 +#define CONFIG_TTYS0_BASE 0x3f8 +#define CONFIG_IQAT_ENABLE 0 +#define CONFIG_INTEL_CHIPSET_LOCKDOWN 0 +#define CONFIG_DEBUG_SMM_RELOCATION 0 +#define CONFIG_CAVIUM_BDK_VERBOSE_PCIE 0 +#define CONFIG_USE_FSP2_0_DRIVER 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_ESPI 0 +#define CONFIG_BOARD_GOOGLE_PANTHER 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_PMC 0 +#define CONFIG_BOARD_ASROCK_B75PRO3_M 0 +#define CONFIG_VARIANT_SPECIFIC_OPTIONS_SORAKA 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_104 0 +#define CONFIG_EC_COMPAL_ENE932 0 +#define CONFIG_BOARD_INTEL_WTM2 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_BANKED_GPIOS 0 +#define CONFIG_BOARD_GOOGLE_TROGDOR_COMMON 0 +#define CONFIG_SUPERIO_ASPEED_HAS_UART_DELAY_WORKAROUND 0 +#define CONFIG_EC_GOOGLE_COMMON_MEC 0 +#define CONFIG_AZ_PIN 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_1 0 +#define CONFIG_MAINBOARD_USES_IFD_EC_REGION 0 +#define CONFIG_ARCH_BOOTBLOCK_ARMV7_M 0 +#define CONFIG_TTYS0_LCS 3 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_HDA_VERB 0 +#define CONFIG_SPI_TPM 0 +#define CONFIG_LINUXBOOT_UROOT_MASTER 0 +#define CONFIG_BOARD_GOOGLE_CHEZA 0 +#define CONFIG_SOC_INTEL_I2C_DEV_MAX 0 +#define CONFIG_FILO_MASTER 0 +#define CONFIG_DRIVERS_LENOVO_WACOM 0 +#define CONFIG_AMD_APU_PKG_FP4 0 +#define CONFIG_BOARD_SUPERMICRO_X11SSM_F 0 +#define CONFIG_SC7180_QSPI 0 +#define CONFIG_BOARD_GOOGLE_VEYRON_JAQ 0 +#define CONFIG_BOARD_GOOGLE_NYAN_BIG 0 +#define CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB 0 +#define CONFIG_BOARD_INTEL_COMETLAKE_RVPU 0 +#define CONFIG_HAVE_EC_BIN 0 +#define CONFIG_L2_CACHE_SIZE 0 +#define CONFIG_CPU_INTEL_MODEL_6FX 0 +#define CONFIG_BOARD_SCALEWAY_TAGADA 0 +#define CONFIG_NO_EDID_FILL_FB 0 +#define CONFIG_GENERIC_SPD_BIN 0 +#define CONFIG_TGL_INTEL_EC 0 +#define CONFIG_SUPERIO_SMSC_SMSCSUPERIO 0 +#define CONFIG_DRIVERS_I2C_SX9310 0 +#define CONFIG_X86EMU_DEBUG_PNP 0 +#define CONFIG_BOARD_ASUS_MAXIMUS_IV_GENE_Z 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_SATA 0 +#define CONFIG_BOARD_GOOGLE_CHELL 0 +#define CONFIG_SOC_INTEL_TIGERLAKE_DEBUG_CONSENT 0 +#define CONFIG_BOARD_ID_ADJUSTMENT 0 +#define CONFIG_BOARD_INTEL_DG41WV 0 +#define CONFIG_PSP_APOB_NV_SIZE 0 +#define CONFIG_SB800_IMC_FAN_CONTROL 0 +#define CONFIG_BOARD_INTEL_COFFEELAKE_RVPU 0 +#define CONFIG_PXE_ADD_SCRIPT 0 +#define CONFIG_SDRAMPWR_4DIMM 0 +#define CONFIG_TIMESTAMPS_ON_CONSOLE 0 +#define CONFIG_SUPERIO_ASPEED_COMMON_PRE_RAM 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_ACPI 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_ENABLE 0 +#define CONFIG_SEABIOS_THREAD_OPTIONROMS 0 +#define CONFIG_BOARD_ODE_E21XX 0 +#define CONFIG_NORTHBRIDGE_INTEL_GM45 0 +#define CONFIG_GRU_HAS_TPM2 0 +#define CONFIG_HAVE_INTEL_PTT 0 +#define CONFIG_BOARD_GOOGLE_ATLAS 0 +#define CONFIG_BOARD_GOOGLE_FOSTER 0 +#define CONFIG_VBOOT_VBNV_OFFSET 0x2c +#define CONFIG_SUPERIO_NSC_PC87384 0 +#define CONFIG_INCLUDE_CONFIG_FILE 1 +#define CONFIG_LAPIC_MONOTONIC_TIMER 0 +#define CONFIG_GRUB2_REVISION 0 +#define CONFIG_FMD_GENPARSER 0 +#define CONFIG_BOARD_GOOGLE_GRU 0 +#define CONFIG_BOOTSPLASH_IMAGE 0 +#define CONFIG_USE_VENDORCODE_ELTAN 0 +#define CONFIG_UPDATE_IMAGE 0 +#define CONFIG_BOARD_ROMSIZE_KB_6144 0 +#define CONFIG_VENDOR_GETAC 0 +#define CONFIG_SOUTHBRIDGE_TI_PCI1X2X 0 +#define CONFIG_BOARD_ASUS_P5QL_PRO 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SA 0 +#define CONFIG_DRIVERS_AS3722_RTC_ADDR 0 +#define CONFIG_LINUXBOOT_KERNEL_ARCH_DEFAULT_CONFIG 0 +#define CONFIG_ONBOARD_VGA_IS_PRIMARY 0 +#define CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI_SILVERMONT 0 +#define CONFIG_APU1_PINMUX_UART_D 0 +#define CONFIG_INCLUDE_SND_MAX98357_DA7219_NHLT 0 +#define CONFIG_SOUTHBRIDGE_INTEL_BD82X6X 0 +#define CONFIG_SUPERIO_NSC_PC87417 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_256MB 0 +#define CONFIG_COLLECT_TIMESTAMPS_NO_TSC 0 +#define CONFIG_USE_PSPSECUREOS 0 +#define CONFIG_SOC_INTEL_DEBUG_CONSENT 0 +#define CONFIG_ROMSTAGE_SPD_CBFS 0 +#define CONFIG_HUDSON_XHCI_FWM 0 +#define CONFIG_SUPERIO_SMSC_LPC47M10X 0 +#define CONFIG_BOARD_INTEL_BASEBOARD_GLKRVP 0 +#define CONFIG_BMC_INFO_LOC 0 +#define CONFIG_CPU_INTEL_SOCKET_441 0 +#define CONFIG_FSP_HYPERTHREADING 0 +#define CONFIG_LINUXBOOT_BUILD_INITRAMFS 0 +#define CONFIG_TGL_EC 0 +#define CONFIG_BOARD_INTEL_CANNONLAKE_RVPU 0 +#define CONFIG_BOARD_GOOGLE_ENGUARDE 0 +#define CONFIG_EC_HP_KBC1126 0 +#define CONFIG_VENDOR_EMULATION 1 +#define CONFIG_CAVIUM_BDK_VERBOSE_INIT 0 +#define CONFIG_BOARD_HP_COMPAQ_8200_ELITE_SFF_PC 0 +#define CONFIG_SB800_SATA_AHCI 0 +#define CONFIG_SOC_AMD_STONEYRIDGE 0 +#define CONFIG_TINT_SECONDARY_PAYLOAD 0 +#define CONFIG_BOARD_RODA_RK9 0 +#define CONFIG_SOC_INTEL_XEON_SP 0 +#define CONFIG_HAVE_FSP_GOP 0 +#define CONFIG_ENABLE_BUILTIN_HSUART1 0 +#define CONFIG_SUPERIO_NUVOTON_NCT5572D 0 +#define CONFIG_AGESA_EXTRA_TIMESTAMPS 0 +#define CONFIG_SET_IA32_FC_LOCK_BIT 0 +#define CONFIG_INTEL_GMA_LIBGFXINIT_EDID 0 +#define CONFIG_RAMSTAGE_ADA 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_111 0 +#define CONFIG_SUPERIO_NSC_COMMON_PRE_RAM 0 +#define CONFIG_DEBUG_DRAM 0 +#define CONFIG_GBB_FLAG_FORCE_DEV_BOOT_USB 0 +#define CONFIG_NHLT_RT5663 0 +#define CONFIG_SOUTHBRIDGE_AMD_CIMX_SB800 0 +#define CONFIG_NUM_OF_IOAPICS 0 +#define CONFIG_HAVE_DEBUG_RAM_SETUP 0 +#define CONFIG_COREINFO_SECONDARY_PAYLOAD 0 +#define CONFIG_BOARD_GOOGLE_HANA 0 +#define CONFIG_BOARD_GIGABYTE_GA_H61M_S2PV 0 +#define CONFIG_BOARD_ASUS_P5QPL_AM 0 +#define CONFIG_SUPERIO_SMSC_LPC47M15X 0 +#define CONFIG_NUM_CAR_PAGE_TABLE_PAGES 0 +#define CONFIG_VENDOR_SCALEWAY 0 +#define CONFIG_BOARD_GIGABYTE_GA_945GCM_S2L 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_PRMRR_SIZE_MAX 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_I2C_CHIP 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_I2C_PROTO3 0 +#define CONFIG_BOARD_GOOGLE_MISTRAL 0 +#define CONFIG_UBOOT_STABLE 0 +#define CONFIG_SOC_INTEL_BRASWELL 0 +#define CONFIG_SPI_FLASH_MACRONIX 0 +#define CONFIG_DRIVER_SIEMENS_NC_FPGA 0 +#define CONFIG_PCIEXP_ASPM 0 +#define CONFIG_SOC_INTEL_QUARK 0 +#define CONFIG_BOARD_PURISM_LIBREM13_V4 0 +#define CONFIG_LOCK_SPI_FLASH_NO_ACCESS 0 +#define CONFIG_PSP_APOB_DESTINATION 0 +#define CONFIG_VBOOT_VBNV_CMOS_BACKUP_TO_FLASH 0 +#define CONFIG_BOARD_GOOGLE_SNAPPY 0 +#define CONFIG_BOARD_GOOGLE_PEPPY 0 +#define CONFIG_BOARD_GOOGLE_RIPTO 0 +#define CONFIG_HUDSON_ACPI_IO_BASE 0 +#define CONFIG_MAINBOARD_SERIAL_NUMBER "123456789" +#define CONFIG_BOARD_GOOGLE_SORAKA 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_XHCI_ELOG 0 +#define CONFIG_CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED 0 +#define CONFIG_BOARD_INTEL_TGLRVP_UP4 0 +#define CONFIG_STORAGE_LOG 0 +#define CONFIG_CAVIUM_BDK_VERBOSE_PHY 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_JECHT 0 +#define CONFIG_SOC_INTEL_COMMON_ACPI 0 +#define CONFIG_BOARD_AMD_SOUTHSTATION 0 +#define CONFIG_SUPERIO_WINBOND_COMMON_PRE_RAM 0 +#define CONFIG_VGA_BIOS 0 +#define CONFIG_FSP_S_ADDR 0 +#define CONFIG_BOARD_GOOGLE_WADDLEDEE 0 +#define CONFIG_DRIVERS_UART_8250MEM 0 +#define CONFIG_BOARD_GOOGLE_SARIEN 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_ALINK 0 +#define CONFIG_GRU_HAS_CENTERLOG_PWM 0 +#define CONFIG_X86EMU_DEBUG 0 +#define CONFIG_FATAL_ASSERTS 0 +#define CONFIG_ARCH_VERSTAGE_X86_64 0 +#define CONFIG_AGESA_BINARY_PI_AS_STAGE 0 +#define CONFIG_BOARD_LENOVO_W500 0 +#define CONFIG_BOARD_LENOVO_THINKCENTRE_A58 0 +#define CONFIG_BOARD_GOOGLE_TIDUS 0 +#define CONFIG_CPU_INTEL_MODEL_106CX 0 +#define CONFIG_MAINBOARD_FORCE_NATIVE_VGA_INIT 1 +#define CONFIG_MAINBOARD_POWER_RESTORE 0 +#define CONFIG_CPU_INTEL_MODEL_F4X 0 +#define CONFIG_GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0 +#define CONFIG_EC_BASE_ADDRESS 0 +#define CONFIG_BOARD_EMULATION_SPIKE_RISCV 0 +#define CONFIG_YABEL_PCI_ACCESS_OTHER_DEVICES 0 +#define CONFIG_EC_SUPPORTS_DPTF_TEVT 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_101 0 +#define CONFIG_BOOTBLOCK_NORMAL 0 +#define CONFIG_FAST_SPI_DISABLE_WRITE_STATUS 0 +#define CONFIG_FSP_M_ADDR 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_LPC_COMB_ENABLE 0 +#define CONFIG_UART_PCI_ADDR 0x0 +#define CONFIG_FINALIZE_USB_ROUTE_XHCI 0 +#define CONFIG_DRIVERS_I2C_DA7219 0 +#define CONFIG_ARCH_VERSTAGE_ARM64 0 +#define CONFIG_BOARD_INTEL_APOLLOLAKE_RVP1 0 +#define CONFIG_HAVE_SMI_HANDLER 0 +#define CONFIG_ARCH_BOOTBLOCK_PPC64 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_PCI 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_2 0 +#define CONFIG_BOARD_AMD_UNIONSTATION 0 +#define CONFIG_VENDOR_KONTRON 0 +#define CONFIG_HWBASE_DEBUG_NULL 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_USB_DEBUG 0 +#define CONFIG_SEABIOS_BOOTORDER_FILE "" +#define CONFIG_CCACHE 0 +#define CONFIG_VENDORCODE_ELTAN_OEM_MANIFEST_ITEM_SIZE 0 +#define CONFIG_ROM_SIZE 0x00040000 +#define CONFIG_DRIVER_TPM_I2C_ADDR 0 +#define CONFIG_BOARD_LENOVO_THINKPAD_T430 0 +#define CONFIG_BOARD_GOOGLE_GUADO 0 +#define CONFIG_PCIEXP_HOTPLUG_IO 0 +#define CONFIG_BOARD_GIZMOSPHERE_GIZMO2 0 +#define CONFIG_DCACHE_BSP_STACK_SIZE 0x4000 +#define CONFIG_SUPERIO_SMSC_LPC47N207 0 +#define CONFIG_BOARD_ASUS_P8H61_M_LX 0 +#define CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE 0 +#define CONFIG_BOARD_SIFIVE_HIFIVE_UNLEASHED 0 +#define CONFIG_INCLUDE_SND_MAX98373_NHLT 0 +#define CONFIG_INCLUDE_NHLT_BLOBS_RAMMUS 0 +#define CONFIG_MINIMAL_PCI_SCANNING 0 +#define CONFIG_GBB_FLAG_LOAD_OPTION_ROMS 0 +#define CONFIG_CPU_BCLK_MHZ 0 +#define CONFIG_PICASSO_LPC_IOMUX 0 +#define CONFIG_SOC_INTEL_COMMON_PCH_BASE 0 +#define CONFIG_ROMSTAGE_ADDR 0x2000000 +#define CONFIG_BOARD_ASUS_P2B_LS 0 +#define CONFIG_FSP2_0_USES_TPM_MRC_HASH 0 +#define CONFIG_BOARD_ASUS_P8Z77_M_PRO 0 +#define CONFIG_APL_SKIP_SET_POWER_LIMITS 0 +#define CONFIG_SPI_FLASH_EON 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_UART_LPSS_CLK_N_VAL 0 +#define CONFIG_SEABIOS_STABLE 1 +#define CONFIG_VGA 1 +#define CONFIG_HAVE_VERSTAGE 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI 0 +#define CONFIG_NO_DEFAULT_PAYLOAD 0 +#define CONFIG_ELOG 0 +#define CONFIG_DCACHE_RAM_BASE 0x10000 +#define CONFIG_BASEBOARD_GLKRVP_LAPTOP 0 +#define CONFIG_SOC_AMD_SMU_NOTFANLESS 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_FIZZ 0 +#define CONFIG_BIOS_RESOURCE_LIST_SIZE 0 +#define CONFIG_PIRQ_ROUTE 0 +#define CONFIG_CMOS_DEFAULT_FILE "src/mainboard/$(MAINBOARDDIR)/cmos.default" +#define CONFIG_ME_MBP_CLEAR_LATE 0 +#define CONFIG_SUPERIO_ITE_IT8528E 0 +#define CONFIG_POSTCAR_STAGE 1 +#define CONFIG_SOC_MEDIATEK_MT8173 0 +#define CONFIG_SMAUG_BCT_CFG_SPI 0 +#define CONFIG_MAINBOARD_SUPPORTS_SKYLAKE_CPU 0 +#define CONFIG_SPD_READ_BY_WORD 0 +#define CONFIG_SAR_ENABLE 0 +#define CONFIG_X86EMU_DEBUG_TIMINGS 0 +#define CONFIG_GFX_GMA_ANALOG_I2C_HDMI_C 0 +#define CONFIG_CHROMEOS_RAMOOPS 0 +#define CONFIG_LOCK_MANAGEMENT_ENGINE 0 +#define CONFIG_VENDOR_RODA 0 +#define CONFIG_CONSOLE_QEMU_DEBUGCON_PORT 0x402 +#define CONFIG_SOC_INTEL_DENVERTON_NS 0 +#define CONFIG_VGA_TEXT_FRAMEBUFFER 1 +#define CONFIG_SKIP_MAX_REBOOT_CNT_CLEAR 0 +#define CONFIG_VENDOR_PACKARDBELL 0 +#define CONFIG_VERSTAGE_DEBUG_SPINLOOP 0 +#define CONFIG_BOARD_GOOGLE_KODAMA 0 +#define CONFIG_SOC_AMD_COMMON_BLOCK_SPI_DEBUG 0 +#define CONFIG_FSP_PLATFORM_MEMORY_SETTINGS_VERSIONS 0 +#define CONFIG_BOARD_GOOGLE_VEYRON_RIALTO 0 +#define CONFIG_PLLX_KHZ 0 +#define CONFIG_BOOTBLOCK_DEBUG_SPINLOOP 0 +#define CONFIG_BOARD_GOOGLE_LINK 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_SPI_ICH9 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_P2SB 0 +#define CONFIG_PARALLEL_MP 0 +#define CONFIG_GDB_STUB 0 +#define CONFIG_SUPERIO_SMSC_SIO1036 0 +#define CONFIG_HAVE_ACPI_RESUME 0 +#define CONFIG_BOARD_GOOGLE_KIP 0 +#define CONFIG_SMM_MODULE_HEAP_SIZE 0 +#define CONFIG_UDK_2015_BINDING 0 +#define CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER 0 +#define CONFIG_BOARD_PROTECTLI_FW2B 0 +#define CONFIG_SOUTHBRIDGE_INTEL_IBEXPEAK 0 +#define CONFIG_QC_SDI_ENABLE 0 +#define CONFIG_STATIC_OPTION_TABLE 0 +#define CONFIG_CBFS_PREFIX_FALLBACK 0 +#define CONFIG_NO_FADT_8042 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8 0 +#define CONFIG_SOC_QUALCOMM_QCS405 0 +#define CONFIG_BOARD_GOOGLE_RAMBI 0 +#define CONFIG_BOARD_INTEL_MINNOW3 0 +#define CONFIG_EARLY_PCI_MMIO_BASE 0 +#define CONFIG_LINUXBOOT_KERNEL_STABLE 0 +#define CONFIG_SMM_TSEG_SIZE 0 +#define CONFIG_KBC1126_FIRMWARE 0 +#define CONFIG_SDHCI_ADMA_IN_VERSTAGE 0 +#define CONFIG_ARCH_ROMSTAGE_X86_64 0 +#define CONFIG_BOARD_AOPEN_DXPLPLUSU 0 +#define CONFIG_BOARD_ROMSIZE_KB_2048 0 +#define CONFIG_BOOT_DEVICE_SUPPORTS_WRITES 0 +#define CONFIG_CPU_TI_AM335X 0 +#define CONFIG_BOARD_AMD_INAGUA 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_114 0 +#define CONFIG_LINEAR_FRAMEBUFFER 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_OCTOPUS 0 +#define CONFIG_SOUTHBRIDGE_INTEL_I82801DX 0 +#define CONFIG_ARCH_ARM64 0 +#define CONFIG_DRIVERS_UART_8250IO 1 +#define CONFIG_SKIP_GRAPHICS_ENABLING 0 +#define CONFIG_ARCH_BOOTBLOCK_ARMV8_64 0 +#define CONFIG_DRIVER_ANALOGIX_ANX7625 0 +#define CONFIG_TPM_STARTUP_IGNORE_POSTINIT 0 +#define CONFIG_BOARD_GOOGLE_WADDLEDOO 0 +#define CONFIG_ARM64_USE_ARCH_TIMER 0 +#define CONFIG_BOARD_ASUS_P3B_F 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_BELTINO 0 +#define CONFIG_SOC_AMD_SMU_FANLESS 0 +#define CONFIG_SUPERIO_NUVOTON_COMMON_HWM 0 +#define CONFIG_SUPERIO_ITE_ENV_CTRL_PWM_FREQ2 0 +#define CONFIG_SOC_ROCKCHIP_RK3288 0 +#define CONFIG_BOARD_GOOGLE_ZAKO 0 +#define CONFIG_VENDOR_UP 0 +#define CONFIG_LINUXBOOT_KERNEL_CUSTOM_CONFIG 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO_LEGACY_MACROS 0 +#define CONFIG_BOARD_ROMSIZE_KB_128 0 +#define CONFIG_CPU_INTEL_MODEL_6EX 0 +#define CONFIG_BOARD_ASROCK_H110M_DVS 0 +#define CONFIG_BOARD_ASUS_P5Q_PRO 0 +#define CONFIG_CONSOLE_SERIAL_TEGRA210_UARTE 0 +#define CONFIG_HUDSON_PSP 0 +#define CONFIG_SEABIOS_DEBUG_LEVEL -1 +#define CONFIG_YABEL_DIRECTHW 0 +#define CONFIG_BOARD_ASUS_F2A85_M_DDR3_VOLT_165 0 +#define CONFIG_DRIVERS_SIL_3114 0 +#define CONFIG_FSP_CAR 0 +#define CONFIG_BOARD_HP_2760P 0 +#define CONFIG_BOARD_LENOVO_W520 0 +#define CONFIG_HAVE_FSP_LOGO_SUPPORT 0 +#define CONFIG_VENDOR_GOOGLE 0 +#define CONFIG_MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN 0 +#define CONFIG_BOARD_IBASE_MB899 0 +#define CONFIG_DRIVERS_I2C_HID 0 +#define CONFIG_PAYLOAD_IS_FLAT_BINARY 0 +#define CONFIG_SB800_FWM_AT_FF820000 0 +#define CONFIG_BOARD_INTEL_EMERALDLAKE2 0 +#define CONFIG_VARIANT_SPECIFIC_OPTIONS_NAMI 0 +#define CONFIG_NORTHBRIDGE_INTEL_PINEVIEW 0 +#define CONFIG_SOC_INTEL_WHISKEYLAKE 0 +#define CONFIG_RAID_MISC_ROM_POSITION 0 +#define CONFIG_PXE_ROM 0 +#define CONFIG_HAVE_UART_SPECIAL 0 +#define CONFIG_BOARD_LENOVO_X131E 0 +#define CONFIG_BOARD_GOOGLE_KINDRED 0 +#define CONFIG_ID_SECTION_OFFSET 0x80 +#define CONFIG_CPU_INTEL_SOCKET_LGA775 0 +#define CONFIG_SUPERIO_ITE_ENV_CTRL_FAN16_CONFIG 0 +#define CONFIG_BOARD_INTEL_JASPERLAKE_RVP_EXT_EC 0 +#define CONFIG_CPU_HAS_L2_ENABLE_MSR 0 +#define CONFIG_COMMON_FADT 0 +#define CONFIG_BOARD_SUPERMICRO_X10SLM_PLUS_F 0 +#define CONFIG_TRACE 0 +#define CONFIG_BOARD_ASUS_P2B 0 +#define CONFIG_HAVE_USBDEBUG 0 +#define CONFIG_DRIVERS_I2C_RTD2132 0 +#define CONFIG_CPU_INTEL_COMMON_TIMEBASE 0 +#define CONFIG_BOARD_GOOGLE_VEYRON_MIGHTY 0 +#define CONFIG_POST_DEVICE 1 +#define CONFIG_BOARD_EMULATION_QEMU_POWER8 0 +#define CONFIG_SUPERIO_WINBOND_W83667HG_A 0 +#define CONFIG_SOC_INTEL_UART_DEV_MAX 0 +#define CONFIG_ROMSTAGE_SPD_SMBUS 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_102 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_ITSS 0 +#define CONFIG_TPM2 0 +#define CONFIG_CHROMEOS_WIFI_SAR 0 +#define CONFIG_EC_BASE_ACPI_COMMAND 0 +#define CONFIG_EC_GOOGLE_CHROMEEC_SWITCHES 0 +#define CONFIG_BOARD_EMULATION_QEMU_RISCV_RV32 0 +#define CONFIG_CPU_INTEL_MODEL_F3X 0 +#define CONFIG_SUPERIO_ITE_IT8613E 0 +#define CONFIG_SB800_FWM_POSITION 0 +#define CONFIG_BOARD_INTEL_APOLLOLAKE_RVP2 0 +#define CONFIG_GRUB2_INCLUDE_RUNTIME_CONFIG_FILE 0 +#define CONFIG_VENDORCODE_ELTAN_OEM_MANIFEST_LOC 0 +#define CONFIG_BOARD_JETWAY_NF81_T56N_LF 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_10D 0 +#define CONFIG_VARIANT_SPECIFIC_OPTIONS_NAUTILUS 0 +#define CONFIG_SOC_SIFIVE_FU540 0 +#define CONFIG_DRIVERS_GENERIC_WIFI 1 +#define CONFIG_VBOOT_MUST_REQUEST_DISPLAY 0 +#define CONFIG_LEGACY_UART_MODE 0 +#define CONFIG_DRIVERS_INTEL_MIPI_CAMERA 0 +#define CONFIG_SB800_IMC_FWM 0 +#define CONFIG_BOARD_SIEMENS_MC_APL5 0 +#define CONFIG_BOARD_GOOGLE_BASEBOARD_SLIPPY 0 +#define CONFIG_HAVE_IFD_BIN 0 +#define CONFIG_HW_MEM_HOLE_SIZEK 0 +#define CONFIG_SOC_INTEL_ICELAKE_DEBUG_CONSENT 0 +#define CONFIG_BOARD_GOOGLE_BUTTERFLY 0 +#define CONFIG_YABITS_REVISION 0 +#define CONFIG_CACHE_MRC_SETTINGS 0 +#define CONFIG_BOARD_INTEL_CANNONLAKE_RVPY 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_XHCI 0 +#define CONFIG_DIGITIZER_AUTODETECT 0 +#define CONFIG_ELMEX_BOARDS_DISABLED 0 +#define CONFIG_HAVE_PIRQ_TABLE 1 +#define CONFIG_BOARD_FOXCONN_G41S_K 0 +#define CONFIG_SQUELCH_EARLY_SMP 1 +#define CONFIG_SOC_INTEL_COMMON_BLOCK_SATA 0 +#define CONFIG_GRU_HAS_WLAN_RESET 0 +#define CONFIG_SOC_INTEL_TIGERLAKE 0 +#define CONFIG_POWER_BUTTON_DEFAULT_ENABLE 0 +#define CONFIG_SOUTH_BRIDGE_OPTIONS 0 +#define CONFIG_PAYLOAD_GRUB2 0 +#define CONFIG_PSP_LOAD_S0I3_FW 0 +#define CONFIG_NYAN_BIG_BCT_CFG_EMMC 0 +#define CONFIG_SOC_QUALCOMM_SC7180 0 +#define CONFIG_BOARD_ASROCK_B85M_PRO4 0 +#define CONFIG_DISPLAY_MTRRS 0 +#define CONFIG_MAINBOARD_DO_DSI_INIT 0 +#define CONFIG_SOUTHBRIDGE_INTEL_I82801IX 0 +#define CONFIG_SERIRQ_CONTINUOUS_MODE 0 +#define CONFIG_TEGRA124_MODEL_TD580D 0 +#define CONFIG_BOARD_INTEL_KBLRVP8 0 +#define CONFIG_IED_REGION_SIZE 0 +#define CONFIG_PAYLOAD_ELF 0 +#define CONFIG_APU1_PINMUX_GPIO1 0 +#define CONFIG_BROADWELL_VBOOT_IN_BOOTBLOCK 0 +#define CONFIG_MAINBOARD_HAS_LIBGFXINIT 0 +#define CONFIG_SOC_QUALCOMM_COMMON 0 +#define CONFIG_ARCH_ROMSTAGE_ARMV8_64 0 +#define CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP 0 +#define CONFIG_SOC_INTEL_COMMON_BLOCK 0 +#define CONFIG_I945_LVDS 0 +#define CONFIG_USE_CANNONLAKE_FSP_CAR 0 +#define CONFIG_CPU_SAMSUNG_EXYNOS5250 0 +#define CONFIG_SOUTHBRIDGE_INTEL_COMMON_PMCLIB 0 +#define CONFIG_EARLY_PCI_BRIDGE_FUNCTION 0 +#define CONFIG_BOARD_ASUS_F2A85_M_DDR3_VOLT_135 0 +#define CONFIG_BOARD_INTEL_TGLRVP_UP3 0 +#define CONFIG_SANDYBRIDGE_VBOOT_IN_BOOTBLOCK 0 +#define CONFIG_CHROMEOS_RAMOOPS_RAM_SIZE 0 +#define CONFIG_GFX_GMA_ANALOG_I2C_HDMI_D 0 +#define CONFIG_MRC_BIN_ADDRESS 0 +#define CONFIG_BOARD_GOOGLE_ENDEAVOUR 0 +#define CONFIG_HAVE_RAMPAYLOAD 0 +#define CONFIG_BOARD_ELMEX_PCM205400 0 +#define CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT 1 +#define CONFIG_SUPERIO_WINBOND_W83627THG 0 +#define CONFIG_UBSAN 0 +#define CONFIG_VENDOR_ELMEX 0 +#define CONFIG_IRQ_SLOT_COUNT 6 +#define CONFIG_CMOS_POST 0 +#define CONFIG_TGL_CHROME_EC 0 +#define CONFIG_CHECK_SLFRCS_ON_RESUME 0 +#define CONFIG_ARCH_RISCV_M 0 +#define CONFIG_BOARD_PCENGINES_APU1 0 +#define CONFIG_BOARD_APPLE_MACBOOK21 0 +#define CONFIG_EC_RODA_IT8518 0 +#define CONFIG_PARALLEL_CPU_INIT 0 +#define CONFIG_ENABLE_DEBUG_LED_SOC_INIT_ENTRY 0 +#define CONFIG_CPU_AMD_AGESA_BINARY_PI 0 +#define CONFIG_BOARD_GOOGLE_ORCO 0 +#define CONFIG_FRAMEBUFFER_VESA_MODE_108 0 +#define CONFIG_BOARD_GOOGLE_LARS 0 +#define CONFIG_VENDOR_SAMSUNG 0 +#define CONFIG_BOARD_ASROCK_G41C_GS_R2_0 0 +#define CONFIG_ACPI_HAVE_PCAT_8259 1 +#define CONFIG_DSAR_SET_NUM 0 +#define CONFIG_EARLY_PCI_BRIDGE 0 +#define CONFIG_IOAPIC_INTERRUPTS_ON_APIC_SERIAL_BUS 0 +#define CONFIG_BOARD_GOOGLE_DEDEDE 0 +#define CONFIG_SMMSTORE_IN_CBFS 0 +#define CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5 0 +#define CONFIG_NYAN_BCT_CFG_SPI 0 +#define CONFIG_GENERIC_UDELAY 0 +#define CONFIG_TIANOCORE_TARGET_IA32 0 +#define CONFIG_DRIVERS_I2C_LM96000 0 +#define CONFIG_INTEL_PCH_UART_CONSOLE 0 +#define CONFIG_BOARD_MSI_MS7721 0 +#define CONFIG_UDK_2017_VERSION 0 +#define CONFIG_SOC_ROCKCHIP_RK3399 0 +#define CONFIG_BOARD_ASUS_P5Q 0 +#define CONFIG_DRIVERS_GENERIC_ADAU7002 0 +#define CONFIG_NHLT_MAX98373 0 +#define CONFIG_DRIVERS_I2C_GENERIC 0 +#define CONFIG_BOARD_GOOGLE_RAINIER 0 +#define CONFIG_NHLT_MAX98357 0 +#define CONFIG_DISPLAY_HOBS 0 +#define CONFIG_COREBOOT_ROMSIZE_KB_512 0 +#define CONFIG_VBOOT_EARLY_EC_SYNC 0 +#define CONFIG_SOC_INTEL_TIGERLAKE_BASE 0 +#define CONFIG_POST_DEVICE_NONE 1 +#define CONFIG_APU2_PINMUX_GPIO1 0 +#define CONFIG_USE_AMD_BLOBS 0 +#define CONFIG_BOARD_APPLE_IMAC52 0 +#define CONFIG_CHROMEOS_RAMOOPS_RAM_START 0 +#define CONFIG_SUPERIO_NUVOTON_NCT6791D 0 +#define CONFIG_CHROMEOS_RAMOOPS_NON_ACPI 0 +#define CONFIG_BOARD_SAMSUNG_STUMPY 0 +#define CONFIG_EC_GOOGLE_CHROMEEC 0 +#define CONFIG_VBOOT 0 +#define CONFIG_OVERRIDE_DEVICETREE "" +#define CONFIG_SPI_FLASH_WINBOND 0 +#define CONFIG_CONSOLE_CBMEM_BUFFER_SIZE 0x20000 +#define CONFIG_BOARD_OPENCELLULAR_ELGON 0 +#define CONFIG_BOARD_INTEL_KUNIMITSU 0 +#define CONFIG_BOARD_FOXCONN_G41M 0 +#define CONFIG_POWER_STATE_PREVIOUS_AFTER_FAILURE 0 +#define CONFIG_PCIX_PLUGIN_SUPPORT 1 +#define CONFIG_SUPERIO_WINBOND_W83627EHG 0 diff --git a/tests/lib/string-test.c b/tests/lib/string-test.c new file mode 100644 index 0000000..ebcead4 --- /dev/null +++ b/tests/lib/string-test.c @@ -0,0 +1,43 @@ +#include <stdarg.h> +#include <stddef.h> +#include <setjmp.h> +#include <cmocka.h> + +#include <string.h> + +struct strings_t { + char *str; + size_t size; +} strings[] = { + {"coreboot", 8}, + {"is\0very", 2}, + {"nice\n", 5} +}; + +static void test_strlen_null(void **state) +{ + size_t size; + + /* Below will fail the test */ + size = strlen(NULL); + + assert_int_equal(0, size); +} + +static void test_strlen_strings(void **state) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(strings); i++) + assert_int_equal(strings[i].size, strlen(strings[i].str)); +} + +int main(void) +{ + const struct CMUnitTest tests[] = { + cmocka_unit_test(test_strlen_null), + cmocka_unit_test(test_strlen_strings), + }; + + return cmocka_run_group_tests(tests, NULL, NULL); +} diff --git a/util/testing/Makefile.inc b/util/testing/Makefile.inc index bf096d3..124f5de 100644 --- a/util/testing/Makefile.inc +++ b/util/testing/Makefile.inc @@ -21,6 +21,9 @@ @echo ' test-abuild - basic: Builds all platforms' @echo ' test-payloads - basic: Builds internal payloads' @echo ' test-cleanup - basic: Cleans coreboot directories' + @echo ' unit-tests - Build and run unit tests' + +include $(TOPLEVEL)/tests/Makefile.inc
# junit.xml is a helper target to wrap builds that don't create junit.xml output # BLD = The name of the build
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h@100 PS1, Line 100: #define CONFIG_SPI_FLASH_DONT_INCLUDE_ALL_DRIVERS 0 'DONT' may be misspelled - perhaps 'DON'T'?
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h@255 PS1, Line 255: #define CONFIG_PXE_NO_PROMT 0 'PROMT' may be misspelled - perhaps 'PROMPT'?
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h@7 PS1, Line 7: CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS we'd need to extend util/lint/lint-stable-008-kconfig to not care about this file for this commit to pass the build tester.
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@19 PS1, Line 19: build $(obj) probably?
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@26 PS1, Line 26: # Minimal required set for simplicity sake We'll likely need to reuse the normal coreboot CFLAGS because some of them modify behavior (e.g. certain code won't work without -O2 or -Wl,--gc-sections).
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@50 PS1, Line 50: $$(addprefix $$(SRC_DIR),$$(subst -test,.c,$$*)) This is an interesting approach but I don't think it will be flexible enough to support everything we'll want to do. I guess strict "unit testing" would only cover one function but I think ultimately we'll want to be able to cover larger components consisting of multiple files as well. Otherwise, we'll just force weird constraints on ourselves about what needs to be put in the same file in the main sources (and may create big headaches about how to port the tests whenever some refactoring splits a function in two).
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1: What's our overall plan with Kconfig for the unit tests? Do we have one yet? I assume for most tests we can use a common base config (e.g. qemu-x86) but there will always be cases where a test needs some special config, or we even want to test the same function with multiple different values for a certain config. We should have a common way to implement tests for those kinds of situations.
Also, configs should get auto-generated and not checked in like this so they don't have to be fixed manually when the underlying Kconfig files change.
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(5 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@19 PS1, Line 19: build
$(obj) probably?
Sure.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@26 PS1, Line 26: # Minimal required set for simplicity sake
We'll likely need to reuse the normal coreboot CFLAGS because some of them modify behavior (e.g. […]
Understand. This CFLAGS variable is simply exported to lower-level Makefiles? I wonder if we may see some issues when applying this CFLAGS to HOSTCC.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@50 PS1, Line 50: $$(addprefix $$(SRC_DIR),$$(subst -test,.c,$$*))
This is an interesting approach but I don't think it will be flexible enough to support everything we'll want to do.
This problem, which you mentioned here, is very important. Namely - what we are defining as a unit test. I hope my document is addressing this to some extent. Thanks for bringing this here!
I guess strict "unit testing" would only cover one function
I don't think that (even strict) unit testing should cover only one function. Using static functions and all functions within module is perfectly fine for testing the interface, which that module is exposing.
but I think ultimately we'll want to be able to cover larger components consisting of multiple files as well. Otherwise, we'll just force weird constraints on ourselves about what needs to be put in the same file in the main sources
If we want to be strict, then I would say there should be _no more than the two_ obj files linked against each other - code module and unit test module. If this constraint cannot be met, it means that code is not well designed (or cannot be tested). Of course, we can adjust tests so that they will pass, but in my opinion this should go another way around - code should be modified to be testable and to pass all the tests. I know that probably it's sounds a little bit like a unreal and theory-only approach, but this should be our goal and this still may be very useful.
Can you think of and point me to the example, where we would need to incorporate multiple files in the unit test binary? Sounds rather like an integration testing, not unit testing. I mean - maybe such a big framework isn't meant to be covered by unit tests? (I have no illusions that we can cover whole coreboot codebase with them.) Maybe we should mock-out some external dependencies? Or finally, maybe we should adjust code itself?
(and may create big headaches about how to port the tests whenever some refactoring splits a function in two).
When talking about splitting a function in two - does this happen frequently for functions available externally?
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1:
What's our overall plan with Kconfig for the unit tests? Do we have one yet? I assume for most tests […]
?Good question. I'm proposing to use qemu-x86 .config for running unit tests and I believe this should work for 90% cases.. At the same time, I would like to hear community opinion about what are the needs. While the examples you are pointing should be addressed simply by allowing user to adjust .config (right?), the thing is what to do with test automation (that is Jenkins running all unit tests). Should we do this with every known-good config? Or even some extra combinations? Definitely configs should be auto-generated - in this example I just wanted to keep change as simple as possible.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h@7 PS1, Line 7: CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS
we'd need to extend util/lint/lint-stable-008-kconfig to not care about this file for this commit to […]
I simply disabled util/lint/lint-stable-008-kconfig when committing this. Eventually (see comment above),we should autogenerate this file, when running unit test target.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(4 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@26 PS1, Line 26: # Minimal required set for simplicity sake
Understand. […]
If this is included as part of coreboot's toplevel Makefile then yes, you should be able to just reference CFLAGS_common and CPPFLAGS_common (from $(top)/Makefile.inc).
Getting the full flags is actually somewhat complicated... CFLAGS_common is added to CFLAGS_<stage> in toolchain.inc, together with stage-specific flags. There's also generic-c-ccopts and <stage>-c-ccopts which get added to the final build flags as well. (There's no good reason why we have two ways of defining stage-specific flags, I think, IIRC that was just two people trying to implement the same thing at the same time. Could also be a good opportunity for cleanup.) Maybe we can get away with only using CFLAGS_common, since the stage-specific stuff should rarely affect compilation. There is of course code that behaves differently for different stages, but we may want to find a separate solution to mock that out anyway (to give individual tests the ability to change the values of ENV_BOOTBLOCK, ENV_RAMSTAGE, etc.).
Maybe it would be better to keep fully separate test flags after all and just manually copy what the tests need. I think -std=gnu11, -Os, -ffunction-sections, -fdata-sections and -Wl,--gc-sections are definitely important. All the warning options are probably unimportant. For things like -nostdlib, -nostdinc or -ffreestanding, you'll have to figure out how to best make it work (because you do want to generate a normal userspace program with a main() function, but the coreboot code still needs to be able to work the way it was designed to).
At lot of issues we're probably only really going to see when we try adding more complicated tests.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@37 PS1, Line 37: TEST_LDFLAGS = -lcmocka You're not using any of the actual function mocking features of cmocka in your example, btw. Once you do, you'll need more linker flags here to allow the __wrap_ stuff to work.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@50 PS1, Line 50: $$(addprefix $$(SRC_DIR),$$(subst -test,.c,$$*))
If this constraint cannot be met, it means that code is not well designed (or cannot be tested). Of course, we can adjust tests so that they will pass, but in my opinion this should go another way around - code should be modified to be testable and to pass all the tests.
Well, I would be careful with this mindset. We have to remember that we are dealing with firmware code and not any odd userspace tool. In userspace it may often be acceptable to design for testability first and performance/size/whatever later, and it's no big deal to add another function call boundary here and there or artificially overcomplicate an interface to make it easier to mock. But for firmware code, restrictions may be more serious. I think we all want to add tests, but we do not want to make coreboot any worse for it.
If there's really no way to test something without changes to coreboot we can evaluate whether those changes are acceptable, but needing to link more than one file doesn't really sound complicated enough to warrant that. It just sounds like a pretty arbitrary restriction to me.
Can you think of and point me to the example, where we would need to incorporate multiple files in the unit test binary? Sounds rather like an integration testing, not unit testing.
Well... hmmm... I guess I'm mostly worried about common helper stuff that's used everywhere. Say you want to test fmap_locate_area() in src/lib/fmap.c. A reasonable unit test would be that you have a hardcoded FMAP blob in the test and you try to check that you can find all areas in there. That basically only involves functions from that file, so it should work... except that it's also using the rdev API (src/commonlib/region.c) which is a an API used all over coreboot to interface with data sources (like SPI flash in actual firmware, or a mock buffer in memory in this case). The rdev API already supports in-memory buffers with mem_region_device so it would be very easy to just use that to mock out boot_device_ro() in my test and return a device representing my mocked FMAP buffer. But in order to do that, we have to be able to link src/commonlib/region.c somehow. (Of course there'd be another unit test covering the rdev API itself, so that when we use it to test fmap.c we can already be sure it is internally correct.)
When talking about splitting a function in two - does this happen frequently for functions available externally?
Yes, I think changing underlying interfaces while keeping the API the same is a common thing. We refactor and modernize stuff in coreboot all the time. I'm trying to come up with a good example... hmm... let's say the difference between these two patch sets that I recently reviewed: https://review.coreboot.org/c/coreboot/+/39002/6..7/src/lib/edid_fill_fb.c . Patrick originally just wrote this with a implicit linked list hardcoded in the structure. Then I mentioned we have src/lib/list.c instead which can be used for that. In this case this change already happened during review, but let's say patch set 6 got committed as is (including unit tests) and then some time later we decided to switch to a common list framework throughout coreboot. Suddenly all the unit tests for files that used their own list structures like this before would become invalid because of this otherwise transparent change. Does this mean the test that still tests the same thing suddenly became an integration test, just because the list framework got factored out? Regardless of the ideological answer to that question, I think it is nonsensical from a practical standpoint to throw away or rewrite all those tests in such a situation. They would still be perfectly fine tests -- in fact, you *want* to run them after that refactoring change to make sure it behaves with the new list implementation exactly the same as before, that's the main point of having tests! What we don't want is create a barrier to helpful refactoring and cleanup by creating an artificial requirement to rewrite a disproportionate amount of tests from a small, otherwise transparent change.
I think the most practical solution here would be to have a Makefile.inc in every test subdirectory (same as we do for the normal source tree) and then allow every test to specify which files it needs to link. With the right Makefile magic you should be able to make that look decent enough... for example you could have a test/lib/Makefile.inc with something like:
fmap-test += src/commonlib/region.c fmap-test += test/helpers/rdev_mock_helper.c # whether test/lib/fmap-test.c and src/lib/fmap.c need to be added explicitly or get deduced automatically is something we can decide
# could also do something like this for the header mocking I mentioned in the other patch fmap-test-includes += test/include/mocks/arch/cache_mocks
# would be extensible to provide other stuff we may find we need later, too... fmap-test-stage = verstage fmap-test-config += CONFIG_NO_FMAP_CACHE=y
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1:
?Good question. I'm proposing to use qemu-x86 . […]
No, I definitely didn't mean that users should manually adjust .config when running certain tests. I meant that certain tests may need to specify extra configs they want to be built with that deviate from the normal qemu-x86 base config. So we'll need some way in the Makefile to specify that when it happens (see my suggestion in the other comment). Often we'll probably even want to test the same file with two different Kconfigs -- one where the option that changes that file's behavior is enabled and one where it's disabled. Since Kconfigs are compile-time constant (and that's probably not something we'd want to try to change, even for tests, it would probably break too many things) that would probably mean we want two test files for a single source file under test. (Or maybe just a single test file with #ifdefs that is built and run twice? Would have to see what works better in practice.)
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@37 PS1, Line 37: TEST_LDFLAGS = -lcmocka
You're not using any of the actual function mocking features of cmocka in your example, btw. […]
You should definitely add at least one mock function to the example code.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c File tests/lib/string-test.c:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c@13 PS1, Line 13: {"is\0very", 2}, Maybe add a comment that strlen is only 2 because of the embedded \0 character?
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c@21 PS1, Line 21: /* Below will fail the test */ : size = strlen(NULL); In general, taking strlen of NULL (or str-anything of NULL) is a bad idea. Please explain how it fails the test. Does it return a non-zero value? Does it coredump? If it coredumps, what does Cmocka do? Can you have Cmocka catch the coredump as an expected result (like GoogleTest's DEATH tests)?
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(4 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@37 PS1, Line 37: TEST_LDFLAGS = -lcmocka
You should definitely add at least one mock function to the example code.
Yes, I need to do this.
Regarding linker flags - I wonder it will be better to keep list of mocks in a Makefile or to have some metadata file (probably per-test), or even header at the top of test code .c module, which will list all functions which should be mocked. This will be parsed inside Makefile and proper flags should be added then.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@50 PS1, Line 50: $$(addprefix $$(SRC_DIR),$$(subst -test,.c,$$*))
If this constraint cannot be met, it means that code is not well designed (or cannot be tested). Of course, we can adjust tests so that they will pass, but in my opinion this should go another way around - code should be modified to be testable and to pass all the tests.
Well, I would be careful with this mindset. We have to remember that we are dealing with firmware code and not any odd userspace tool. In userspace it may often be acceptable to design for testability first and performance/size/whatever later, and it's no big deal to add another function call boundary here and there or artificially overcomplicate an interface to make it easier to mock. But for firmware code, restrictions may be more serious. I think we all want to add tests, but we do not want to make coreboot any worse for it.
If there's really no way to test something without changes to coreboot we can evaluate whether those changes are acceptable, but needing to link more than one file doesn't really sound complicated enough to warrant that. It just sounds like a pretty arbitrary restriction to me.
I see your point. Definitely, we cannot change the coreboot, to be worse because of tests. My opinion was rather to _not_ add tests (which are not unit test) in such case. In the same time, let's prepare a flexible framework and then we can decide on case by case basis. After all we need something practical, so that people will use it.
Can you think of and point me to the example, where we would need to incorporate multiple files in the unit test binary? Sounds rather like an integration testing, not unit testing.
Well... hmmm... I guess I'm mostly worried about common helper stuff that's used everywhere. Say you want to test fmap_locate_area() in src/lib/fmap.c. A reasonable unit test would be that you have a hardcoded FMAP blob in the test and you try to check that you can find all areas in there. That basically only involves functions from that file, so it should work... except that it's also using the rdev API (src/commonlib/region.c) which is a an API used all over coreboot to interface with data sources (like SPI flash in actual firmware, or a mock buffer in memory in this case). The rdev API already supports in-memory buffers with mem_region_device so it would be very easy to just use that to mock out boot_device_ro() in my test and return a device representing my mocked FMAP buffer. But in order to do that, we have to be able to link src/commonlib/region.c somehow. (Of course there'd be another unit test covering the rdev API itself, so that when we use it to test fmap.c we can already be sure it is internally correct.)
Thanks for the example. This definitely doesn't follow a strict definition of a unit test, since you are testing the interface between rdev and FMAP. But as above - let's focus on unit tests being practical. And used by devs.
When talking about splitting a function in two - does this happen frequently for functions available externally?
Yes, I think changing underlying interfaces while keeping the API the same is a common thing. We refactor and modernize stuff in coreboot all the time. I'm trying to come up with a good example... hmm... let's say the difference between these two patch sets that I recently reviewed: https://review.coreboot.org/c/coreboot/+/39002/6..7/src/lib/edid_fill_fb.c . Patrick originally just wrote this with a implicit linked list hardcoded in the structure. Then I mentioned we have src/lib/list.c instead which can be used for that. In this case this change already happened during review, but let's say patch set 6 got committed as is (including unit tests) and then some time later we decided to switch to a common list framework throughout coreboot. Suddenly all the unit tests for files that used their own list structures like this before would become invalid because of this otherwise transparent change. Does this mean the test that still tests the same thing suddenly became an integration test, just because the list framework got factored out? Regardless of the ideological answer to that question, I think it is nonsensical from a practical standpoint to throw away or rewrite all those tests in such a situation. They would still be perfectly fine tests -- in fact, you *want* to run them after that refactoring change to make sure it behaves with the new list implementation exactly the same as before, that's the main point of having tests! What we don't want is create a barrier to helpful refactoring and cleanup by creating an artificial requirement to rewrite a disproportionate amount of tests from a small, otherwise transparent change.
Thanks, it makes sense. Examples which you provided have slightly changed my view on this.. :)
I think the most practical solution here would be to have a Makefile.inc in every test subdirectory (same as we do for the normal source tree) and then allow every test to specify which files it needs to link. With the right Makefile magic you should be able to make that look decent enough... for example you could have a test/lib/Makefile.inc with something like:
fmap-test += src/commonlib/region.c fmap-test += test/helpers/rdev_mock_helper.c # whether test/lib/fmap-test.c and src/lib/fmap.c need to be added explicitly or get deduced automatically is something we can decide
# could also do something like this for the header mocking I mentioned in the other patch fmap-test-includes += test/include/mocks/arch/cache_mocks
# would be extensible to provide other stuff we may find we need later, too... fmap-test-stage = verstage fmap-test-config += CONFIG_NO_FMAP_CACHE=y
We can also think of adding mock list (for linker flags) here. Let me prepare a more complex example and try to refactor Makefiles, so that the framework will be more flexible. In general considering discussion above, we will switch a definition of unit from module (.c) to functionality (like fmap). Or to be more precise mix of them (since I expect commonlib functions to not be as complicated as fmap).
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c File tests/lib/string-test.c:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c@13 PS1, Line 13: {"is\0very", 2},
Maybe add a comment that strlen is only 2 because of the embedded \0 character?
Initially, I planned that this commit won't be merged into the tree, and be only an example (actually too simple example, will work on this) for community. However, after all it may be worth to have something like this for devs (with proper description in the doc), who would like to start writing test for their code.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c@21 PS1, Line 21: /* Below will fail the test */ : size = strlen(NULL);
In general, taking strlen of NULL (or str-anything of NULL) is a bad idea. […]
The only purpose was to have test failing, showing that Cmocka can catch such a failure. Below is the output from running this test: [==========] Running 2 test(s). [ RUN ] test_strlen_null Test failed with exception: Segmentation fault
[ FAILED ] test_strlen_null [ RUN ] test_strlen_strings [ OK ] test_strlen_strings [==========] 2 test(s) run. [ PASSED ] 1 test(s). [ FAILED ] 1 test(s), listed below: [ FAILED ] test_strlen_null
1 FAILED TEST(S)
Cmocka has exception handling for signals, so it is able to recover. However, I cannot find a macro like Gtests' "EXPECT_DEATH" in Cmocka. Do you find this as a major issue?
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@37 PS1, Line 37: TEST_LDFLAGS = -lcmocka
Yes, I need to do this. […]
Some syntactic sugar to handle this would definitely be nice... whether we keep it in the source file or the Makefile (the latter is probably easier). Having a separate file just for that seems a bit overkill. (We generally use that concept of doing '<sourcefile>-<attribute> += <value>' in the subdirectory Makefile.inc to declare special build metadata related to a file a lot in coreboot, so I think it would make sense to use it for the tests as well.)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@50 PS1, Line 50: $$(addprefix $$(SRC_DIR),$$(subst -test,.c,$$*))
If this constraint cannot be met, it means that code is not well designed (or cannot be tested). […]
Yes, I agree on using this to declare the mock functions too, that would probably work well.
I think for the most part we can probably stick to the one test file per source file approach, that's definitely a sane default. But keeping the flexibility open to occasionally have multiple test files for the same source file sounds like a good idea. (So for my example Makefile.inc that probably means test/lib/fmap-test.c and src/lib/fmap.c should be added explicitly to the list of test sources. Which also means we probably need something like
tests += fmap-test ...
at the top of each Makefile.inc.)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c File tests/lib/string-test.c:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c@21 PS1, Line 21: /* Below will fail the test */ : size = strlen(NULL);
The only purpose was to have test failing, showing that Cmocka can catch such a failure. […]
I think that's probably okay. It's good that it catches segfaults cleanly, but we probably don't need to test that a certain function causes a null pointer access in certain cases... if we actually expected those cases to happen we'd probably change the function to have a more defined result instead.
A related thing that *is* important, I think, is to make sure that expect_assert_failure() works right for things like assert(), BUG(), die() and halt(). That should probably be easy enough to do once we figure out that header mocking.
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem and example for unit tests ......................................................................
Patch Set 1:
(10 comments)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@19 PS1, Line 19: build
Sure.
Done
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@26 PS1, Line 26: # Minimal required set for simplicity sake
If this is included as part of coreboot's toplevel Makefile then yes, you should be able to just ref […]
Yes, I agree that going forward, we will need to adjust these flags. Considering this, I've added a support for defining per-test cflags. This should be flexible enough for our needs. In the same time in v2, I've added flags which you mentioned here.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@37 PS1, Line 37: TEST_LDFLAGS = -lcmocka
Some syntactic sugar to handle this would definitely be nice... […]
In v2 I've added completely new unit test for src/device/i2c.c. It is showing how the __wrap feature works. From the dev point of view, it is enough to add test-file-mocks += in Makefile.inc, generic Makefile is handling this.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/Makefile.inc@50 PS1, Line 50: $$(addprefix $$(SRC_DIR),$$(subst -test,.c,$$*))
Yes, I agree on using this to declare the mock functions too, that would probably work well. […]
This thread is actually a basis for whole v2 rework. Solution is much more flexible than initial one. Hopefully I've included all good proposals from you. In the same time, new approach is easily extensible, so adding new attributes should be straightforward. Resolving this thread for now.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1:
No, I definitely didn't mean that users should manually adjust .config when running certain tests. […]
In v2 I've added automatic generation of config for all tests. By default, qemu-x86 .config is used. None of the tests' examples I've wrote, has support for the feature which we are discussing here. Let's keep this for future enhancements - hopefully this is acceptable. That being said, I don't think that embedding support for building different configs via Makefile targets will be easy to do. Even with some extra logic to handle this, we will face issues with parallel execution of MAKE - Kconfig targets are invoked by recursion to SUB-MAKE. If you have any thoughts how this may work (multiple targets each building its own config), I will be glad to try. In my opinion, we should try adding an extra header to the include path, right after kconfig.h (which in turn includes config.h). Inside this header, one should #undef particular config and add define with new required value. This may be done inside Makefile, with some echo's, so that dev will only need to define ```test-configs+= CONFIG_SOME_FEATURE=value``` This design will assume, that there will be a separate test created per-config. However one test file will be used - I believe this will be cleaner solution.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h@7 PS1, Line 7: CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS
I simply disabled util/lint/lint-stable-008-kconfig when committing this. […]
This is no longer an issue in v2 - config is autogenerated there.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h@100 PS1, Line 100: #define CONFIG_SPI_FLASH_DONT_INCLUDE_ALL_DRIVERS 0
'DONT' may be misspelled - perhaps 'DON'T'?
This is no longer an issue in v2 - config is autogenerated there.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h@255 PS1, Line 255: #define CONFIG_PXE_NO_PROMT 0
'PROMT' may be misspelled - perhaps 'PROMPT'?
This is no longer an issue in v2 - config is autogenerated there.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c File tests/lib/string-test.c:
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c@13 PS1, Line 13: {"is\0very", 2},
Initially, I planned that this commit won't be merged into the tree, and be only an example (actuall […]
I kept this test file in v2, however added special comment as you proposed.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/lib/string-test.c@21 PS1, Line 21: /* Below will fail the test */ : size = strlen(NULL);
I think that's probably okay. […]
I've added an example of handling dead_code() using mock_assert() in mocked assert.h header. This is working good, Cmocka is passing such test with expect_assert_failure(). I also tried assert() - it is also working correctly. In my example (v2), I removed test_strlen_null, since this is actually not acceptable for merging to upstream.
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39894
to look at the new patch set (#2).
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
tests: Add build subsystem for unit testing coreboot
Add a subsystem which will be used for writing, building and running unit tests for different coreboot's modules. This work is based on Cmocka unit testing framework. Description of what unit testing means (for the author) and how unit testing framework evaluation was performed may be found in Documentation/technotes/2020-03-unit-testing-coreboot.md
Makefiles structure is very similar to this used for building coreboot images. Every directory has its own Makefile.inc were tests' names, sources, subdirs and multiple other test-related attributes are defined in form of variables.
Signed-off-by: Jan Dabros jsd@semihalf.com Change-Id: I9b0220b84b9a6e448476ca3eb3ccccc5fb829ad1 --- M Makefile A tests/Makefile.inc M util/testing/Makefile.inc 3 files changed, 156 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39894/2
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@128 PS2, Line 128: cp $(DEFAULT_CONFIG) $(TEST_DOTCONFIG) I cherry-picked the set of changes to my local tree, followed the instructions in the next CL, and got this error: cp: missing destination file operand after 'tests/.config' I think you may need $(TEST_DEFAULT_CONFIG) here.
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 2:
(5 comments)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@4 PS2, Line 4: ## This program is free software; you can redistribute it and/or modify : ## it under the terms of the GNU General Public License as published by : ## the Free Software Foundation; version 2 of the License. : ## : ## This program 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 General Public License for more details. We're dropping these blocks now, so replace it with # SPDX-License-Identifier: GPL-2.0-only
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@18 PS2, Line 18: tests $(testobj) since we try to keep the source tree clean.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@27 PS2, Line 27: TEST_KCONFIG_FLAGS:= DOTCONFIG=$(TEST_DOTCONFIG) \ it's possible to override variables per-target. This seems to be used only in line 132, could you add these variable overrides to line 130 then? That makes it clear that there's a variable override going on for that target only.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@35 PS2, Line 35: tab for consistency
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@52 PS2, Line 52: # Include Makefile.inc, clean test-specific variables; : # Add directory prefix to all test-specific variables and test name : # itself in order to allow the same test name in different directories : includemakefiles= \ : $(foreach value,tests test-subdirs, \ : $(eval $(value):=)) \ : $(eval -include $(1)) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(addprefix $(dir $(1)), $(test)-$(attribute)):= \ : $($(test)-$(attribute))))) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(test)-$(attribute):=))) \ : $(eval alltests+=$(addprefix $(dir $(1)), $(tests))) \ : $(eval subdirs+=$(subst $(CURDIR)/,, \ : $(abspath $(addprefix $(dir $(1)),$(test-subdirs))))) : : # Traverse through the unit-tests tree and invoke includemakefiles : evaluate_subdirs= \ : $(eval cursubdirs:=$(subdirs)) \ : $(eval subdirs:=) \ : $(foreach dir,$(cursubdirs), \ : $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ : $(if $(subdirs),$(eval $(call evaluate_subdirs))) this is copied from the toplevel Makefile. Isn't this always called in the context of that one, so we don't need the duplication?
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 2:
(13 comments)
Thanks, I think this looks a *lot* better already! I'm excited about all the things we'll be able to do with this!
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@52 PS2, Line 52: # Include Makefile.inc, clean test-specific variables; : # Add directory prefix to all test-specific variables and test name : # itself in order to allow the same test name in different directories : includemakefiles= \ : $(foreach value,tests test-subdirs, \ : $(eval $(value):=)) \ : $(eval -include $(1)) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(addprefix $(dir $(1)), $(test)-$(attribute)):= \ : $($(test)-$(attribute))))) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(test)-$(attribute):=))) \ : $(eval alltests+=$(addprefix $(dir $(1)), $(tests))) \ : $(eval subdirs+=$(subst $(CURDIR)/,, \ : $(abspath $(addprefix $(dir $(1)),$(test-subdirs))))) : : # Traverse through the unit-tests tree and invoke includemakefiles : evaluate_subdirs= \ : $(eval cursubdirs:=$(subdirs)) \ : $(eval subdirs:=) \ : $(foreach dir,$(cursubdirs), \ : $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ : $(if $(subdirs),$(eval $(call evaluate_subdirs)))
this is copied from the toplevel Makefile. […]
Well, this is a different includemakefiles specific for tests. However, I think it might be possible to use the default version by making 'tests' a special class. Then you'd basically have this in Makefile.inc:
tests-y += i2c-test # can auto-detect that i2c-test.c is the runner source file, see below i2c-test-srcs += src/device/i2c.c i2c-test-mocks += platform_i2c_transfer
...and then you need to define a handler roughly like this:
define tests-handler alltests += $(1)/$(2) $(2)-runner := $(if $($(2)-runner)),$($(2)-runner),$(2).c) $(2)-srcs += $(1)/$($(2)-runner)) $(foreach attribute,$(attributes),$(eval $(1)/$(2)-$(attribute) += $(2)-$(attribute))) $(foreach attribute,$(attributes),$(eval $(2)-$(attribute):=)) endef
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@86 PS2, Line 86: $(eval $(call evaluate_subdirs)) Does this actually need the eval here?
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@88 PS2, Line 88: .SECONDEXPANSION: IIRC you only need this once per 'make' invocation, so if this file is always included from toplevel you shouldn't need it here.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@93 PS2, Line 93: $(eval WRAP_LD_FLAGS:= $(foreach mock,$($(1)-mocks),-Wl,--wrap=$(mock))) Does this need to use eval?
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@96 PS2, Line 96: $$$$(filter tests/$$$$*.c, $($(1)-srcs)) $(TEST_KCONFIG_AUTOHEADER) If you didn't cut the 'tests/' out of the name (see below) this could also just be way simpler as '$$$$*.c' instead of all the filtering.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@98 PS2, Line 98: $(HOSTCC) $(HOSTCFLAGS) $(TEST_CFLAGS) $($(1)-cflags) -MMD \ Shouldn't there be an
-include $(TEST_KCONFIG_AUTOHEADER)
somewhere (either here or in $(TEST_CFLAGS))?
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@99 PS2, Line 99: $$(@) nit: Let's try to be consistent about using $@ or $(@) (though I know other parts of coreboot aren't either). I think $@ is more common for automatic variables.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@102 PS2, Line 102: $(HOSTCFLAGS) $(TEST_CFLAGS) I think usually we don't pass CFLAGS for linking (or is there a good reason to here?).
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@103 PS2, Line 103: $(TEST_LDFLAGS) $(WRAP_LD_FLAGS) -o $$@ Please always add an extra indent for wrapped lines.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@107 PS2, Line 107: # tests/ dir Somewhat confused why you cut the "tests/" out, since you're not cutting the "src/" in supporting files out either. I feel like keeping them both would be more consistent.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@112 PS2, Line 112: %-test.o So is this the main reason you want to suffix all tests with '-test'? I think you could have this much easier by just calling the binary
$(eval $(test)-bin:=build/$(test)/run)
or something. There's no reason why the binary name needs to match the test file if you've sequestered it in its own directory already, after all (but if you want that you could have that too with $(notdir (test)) or whatever).
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@119 PS2, Line 119: $(patsubst %.c,%.o, $(subst tests/,,$($(test)-srcs)))))) Why not just use $($(test)-objs)?
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1:
In v2 I've added automatic generation of config for all tests. By default, qemu-x86 .config is used. […]
I'm not really sure I understand the dependency problem you're describing? You just need to make the rule to build the test dependent on the test-specific config.h (which could be stored under build/test/..path../file-test.config.h or something like that), and then you write a recipe to create that config.h file by creating a minimal .config with the desired options and running the equivalent of $(MAKE) oldconfig on it (or just running the 'conf' utility directly if that's easier).
But anyway, if that's too hard I think the poor-man's Kconfig by hacking up a header with #undefs as you describe would probably be good enough as well. I think it would be okay to start with that and see how far it gets us.
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 2:
(13 comments)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@18 PS2, Line 18: tests
$(testobj) since we try to keep the source tree clean.
Yes, this is correct. Actually putting this autoheader mixed with source code lead to error, where I was not removing it with "clean-unit-tests" target. Location of this autoheader will be adjusted to new Kconfig-handling approach.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@27 PS2, Line 27: TEST_KCONFIG_FLAGS:= DOTCONFIG=$(TEST_DOTCONFIG) \
it's possible to override variables per-target. […]
Makes sense.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@52 PS2, Line 52: # Include Makefile.inc, clean test-specific variables; : # Add directory prefix to all test-specific variables and test name : # itself in order to allow the same test name in different directories : includemakefiles= \ : $(foreach value,tests test-subdirs, \ : $(eval $(value):=)) \ : $(eval -include $(1)) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(addprefix $(dir $(1)), $(test)-$(attribute)):= \ : $($(test)-$(attribute))))) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(test)-$(attribute):=))) \ : $(eval alltests+=$(addprefix $(dir $(1)), $(tests))) \ : $(eval subdirs+=$(subst $(CURDIR)/,, \ : $(abspath $(addprefix $(dir $(1)),$(test-subdirs))))) : : # Traverse through the unit-tests tree and invoke includemakefiles : evaluate_subdirs= \ : $(eval cursubdirs:=$(subdirs)) \ : $(eval subdirs:=) \ : $(foreach dir,$(cursubdirs), \ : $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ : $(if $(subdirs),$(eval $(call evaluate_subdirs)))
Well, this is a different includemakefiles specific for tests. […]
Yes, as Julius pointed this is not the copy from top Makefile - however indeed I was using this as a reference.
I was evaluating concept of using classes, since this is used throughout coreboot build system. While usual classes will be hard to use, this special classes is something which suits better - as you have shown in your example.
The reason why I finally decided to create my own implementation is that I wanted to avoid extra changes to the top Makefile, which will be necessary in this case. Furthermore, there is Makefile.inc under payloads which is also defining its own, so I replicate this approach.
That being said, since usage of special-class will be a nice "link" between my work and coreboot build system, I will make such change in v3. But please take a look at top Makefile changes whether you like them.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@86 PS2, Line 86: $(eval $(call evaluate_subdirs))
Does this actually need the eval here?
No - I mean, at least functionality isn't altered by simply invoking $call. That being said, for couple of $(eval)'s in this file, I was using the same syntax as top Makefile. Wasn't quite sure why they need to be there, however wanted to be on the safe side. I assume this may be a possibility to fix also code which is already in the tree.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@88 PS2, Line 88: .SECONDEXPANSION:
IIRC you only need this once per 'make' invocation, so if this file is always included from toplevel […]
This needs to be declared _before_ the first target which uses this feature. Since this Makefile is included before this target in top Makefile, Make wasn't happy. However with my change for top Makefile in v3, this will be no longer necessary.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@93 PS2, Line 93: $(eval WRAP_LD_FLAGS:= $(foreach mock,$($(1)-mocks),-Wl,--wrap=$(mock)))
Does this need to use eval?
You got me there - this is something tricky, which I must admit I'm not fully understand. Actually after removing this $(eval), I'm facing strange issue, that is $(WRAP_LD_FLAGS) is "visible" only for the consecutive iteration of foreach, not the intended one. Looks like eval creates a Makefile constructs not in the order I'm expecting them. For example, consider that first foreach iteration is for i2c-test and second string-test. Mock should be registered only for the first one. In the recipe for *-bin targets I left only one step: echo "inside $$@ $(WRAP_LD_FLAGS). I can see following output inside build/tests/device/i2c-test/i2c-test-run #note that $(WRAP_LD_FLAGS) is empty here inside build/tests/lib/string-test/string-test-run -Wl,--wrap=platform_i2c_transfer #This should be already empty here
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@96 PS2, Line 96: $$$$(filter tests/$$$$*.c, $($(1)-srcs)) $(TEST_KCONFIG_AUTOHEADER)
If you didn't cut the 'tests/' out of the name (see below) this could also just be way simpler as '$ […]
Indeed. I was so proud of creating such a complicated syntax.. (yes, I know Keep It Simply Stupid) :) I will not remove tests/ from the path and prereq list much simpler.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@98 PS2, Line 98: $(HOSTCC) $(HOSTCFLAGS) $(TEST_CFLAGS) $($(1)-cflags) -MMD \
Shouldn't there be an […]
I've added a "-Ibuild/tests" to TEST_CFLAGS earlier, with a comment that it is for config.h. However it will be much better to use TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER)).
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@102 PS2, Line 102: $(HOSTCFLAGS) $(TEST_CFLAGS)
I think usually we don't pass CFLAGS for linking (or is there a good reason to here?).
Yes, this doesn't make much sense, I will separate linker and compiler flags anyway by putting do different variables. However I will keep $($(1)-cflags), since don't want to introduce another attribute for devs.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@107 PS2, Line 107: # tests/ dir
Somewhat confused why you cut the "tests/" out, since you're not cutting the "src/" in supporting fi […]
Frankly, at this point in time, I'm no longer sure what was my reasoning behind removing tests/ from obj path within particular test directory. Let's not overcomplicate things and keep both tests/ and srcs/.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@112 PS2, Line 112: %-test.o
So is this the main reason you want to suffix all tests with '-test'?
No, as I said I want to differentiate name of uut and test module. This code is just making use of it :)
I think you could have this much easier by just calling the binary
$(eval $(test)-bin:=build/$(test)/run)
or something. There's no reason why the binary name needs to match the test file if you've sequestered it in its own directory already, after all (but if you want that you could have that too with $(notdir (test)) or whatever).
Thanks, this is much simpler solution - will use it. Initially I was thinking that different name of binary may be useful, when we will (for some reason) copy them all to one common dir. However one thing I missed - test names may be the same across project, so the only thing to differentiate is the whole path to binary. So after all - I will keep naming test binaries "run". One more point which you has shown, though not explicitly - it makes sense to put binary right under /build/test/ directory instead of putting it in the same dir as main test module.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@119 PS2, Line 119: $(patsubst %.c,%.o, $(subst tests/,,$($(test)-srcs))))))
Why not just use $($(test)-objs)?
Good point.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@128 PS2, Line 128: cp $(DEFAULT_CONFIG) $(TEST_DOTCONFIG)
I cherry-picked the set of changes to my local tree, followed the instructions in the next CL, and g […]
Indeed, there is an issue with wrong cp argument - will fix in v3. I made this as a last minute change - however still perform a test of cleaning and building once again. The problem is that my clean isn't removing .config.. so this target was not run again. I need to fix this too.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 2:
(6 comments)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@52 PS2, Line 52: # Include Makefile.inc, clean test-specific variables; : # Add directory prefix to all test-specific variables and test name : # itself in order to allow the same test name in different directories : includemakefiles= \ : $(foreach value,tests test-subdirs, \ : $(eval $(value):=)) \ : $(eval -include $(1)) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(addprefix $(dir $(1)), $(test)-$(attribute)):= \ : $($(test)-$(attribute))))) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(test)-$(attribute):=))) \ : $(eval alltests+=$(addprefix $(dir $(1)), $(tests))) \ : $(eval subdirs+=$(subst $(CURDIR)/,, \ : $(abspath $(addprefix $(dir $(1)),$(test-subdirs))))) : : # Traverse through the unit-tests tree and invoke includemakefiles : evaluate_subdirs= \ : $(eval cursubdirs:=$(subdirs)) \ : $(eval subdirs:=) \ : $(foreach dir,$(cursubdirs), \ : $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ : $(if $(subdirs),$(eval $(call evaluate_subdirs)))
Yes, as Julius pointed this is not the copy from top Makefile - however indeed I was using this as a […]
I don't really see why you would need to change the top Makefile, can you explain? Or I guess I can wait for your next update and see...
(That libpayload is separate is somewhat intentional since it's using a separate license and should be possible to be built standalone. That doesn't apply to these tests.)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@86 PS2, Line 86: $(eval $(call evaluate_subdirs))
No - I mean, at least functionality isn't altered by simply invoking $call. […]
Yeah, I know the top Makefile isn't perfect in some cases, a lot of stuff in there is pretty ancient and has grown warts over time. Let's just make sure things that get newly added make sense for now. (If you want, of course, you're welcome to submit cleanups for the top Makefile as well...)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@88 PS2, Line 88: .SECONDEXPANSION:
This needs to be declared _before_ the first target which uses this feature. […]
Yeah, let's just move it up in the top Makefile if that's an issue.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@93 PS2, Line 93: $(eval WRAP_LD_FLAGS:= $(foreach mock,$($(1)-mocks),-Wl,--wrap=$(mock)))
You got me there - this is something tricky, which I must admit I'm not fully understand. […]
Oh... uhh... yes, I think that may be because you are using the variable inside a recipe. IIRC variables inside recipes only get resolved when that recipe runs (not when it is defined).
So I think you need to have a separate variable per target to make this work (e.g. WRAP_LD_FLAGS-$(1)).
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@98 PS2, Line 98: $(HOSTCC) $(HOSTCFLAGS) $(TEST_CFLAGS) $($(1)-cflags) -MMD \
I've added a "-Ibuild/tests" to TEST_CFLAGS earlier, with a comment that it is for config.h. […]
No, you need an -include, not just -I. That's what the main Makefile does too, and coreboot source files are written with the assumption that they don't need to include <config.h> explicitly. (Actually, the same is true for <rules.h> and <commonlib/bsd/compiler.h> so I think you'll need those too... see CPPFLAGS_common in the toplevel Makefile.inc.)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@102 PS2, Line 102: $(HOSTCFLAGS) $(TEST_CFLAGS)
Yes, this doesn't make much sense, I will separate linker and compiler flags anyway by putting do di […]
Sounds reasonable.
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@52 PS2, Line 52: # Include Makefile.inc, clean test-specific variables; : # Add directory prefix to all test-specific variables and test name : # itself in order to allow the same test name in different directories : includemakefiles= \ : $(foreach value,tests test-subdirs, \ : $(eval $(value):=)) \ : $(eval -include $(1)) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(addprefix $(dir $(1)), $(test)-$(attribute)):= \ : $($(test)-$(attribute))))) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(test)-$(attribute):=))) \ : $(eval alltests+=$(addprefix $(dir $(1)), $(tests))) \ : $(eval subdirs+=$(subst $(CURDIR)/,, \ : $(abspath $(addprefix $(dir $(1)),$(test-subdirs))))) : : # Traverse through the unit-tests tree and invoke includemakefiles : evaluate_subdirs= \ : $(eval cursubdirs:=$(subdirs)) \ : $(eval subdirs:=) \ : $(foreach dir,$(cursubdirs), \ : $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ : $(if $(subdirs),$(eval $(call evaluate_subdirs)))
I don't really see why you would need to change the top Makefile, can you explain? Or I guess I can wait for your next update and see...
First of all, I need to have these macros defined at the time of including tests/Makefile.inc: evaluate_subdir, includemakefiles and add-special-class.
Moreover, I want to be isolated from .DOTCONFIG presence (one used for building source) - I would like to run unit-tests even if the .config is not configured (I suppose it will be rather rare, but still someone may start TDD and build final coreboot image only after all tests passes). This brings another implication - I cannot include toolchain.inc when there is no .DOTCONFIG.
Last, there is no need to traverse through Makefile.incs under src/ when I'm building unit-tests.
(That libpayload is separate is somewhat intentional since it's using a separate license and should be possible to be built standalone. That doesn't apply to these tests.)
OK, I see.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@93 PS2, Line 93: $(eval WRAP_LD_FLAGS:= $(foreach mock,$($(1)-mocks),-Wl,--wrap=$(mock)))
Oh... uhh... yes, I think that may be because you are using the variable inside a recipe. […]
Yes, this was exactly an issue with time of expand and time of use. However why $(eval) helped here? I thought output of $(eval) produces make construct which is parsed the same way (in the same Make phase) as the usual syntax.
Putting this aside - I come up with another solution, which looks better for me - let's change TEST_LDFLAGS per target. This way, I don't need any extra variables - I think it is cleaner. Below is the snippet (with extra CFLAGS for stage-related define).
$($(1)-objs): TEST_CFLAGS+= $$(if $$($(1)-stage), \ -D__$$(shell echo $$($(1)-stage) | tr '[:lower:]' '[:upper:]')__, \ -D__RAMSTAGE__) $($(1)-objs): build/$(1)/%.o: $$$$*.c $(TEST_KCONFIG_AUTOHEADER) mkdir -p $$(dir $$@) $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $($(1)-cflags) -MMD \ -MT $$@ -c $$< -o $$@
$($(1)-bin): TEST_LDFLAGS+= $$(foreach mock,$$($(1)-mocks),-Wl,--wrap=$$(mock)) $($(1)-bin): $($(1)-objs) $(HOSTCC) $$^ $($(1)-cflags) $$(TEST_LDFLAGS) -o $$
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@98 PS2, Line 98: $(HOSTCC) $(HOSTCFLAGS) $(TEST_CFLAGS) $($(1)-cflags) -MMD \
No, you need an -include, not just -I. […]
I already have -include for kconfig.h and commonlib/bsd/compiler.h. Thought that if kconfig.h is globally visible and it includes config.h I should be ok. But let me add these, so that to be compliant with top Makefile.
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39894
to look at the new patch set (#3).
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
tests: Add build subsystem for unit testing coreboot
Add a subsystem which will be used for writing, building and running unit tests for different coreboot's modules. This work is based on Cmocka unit testing framework. Description of what unit testing means (for the author) and how unit testing framework evaluation was performed may be found in Documentation/technotes/2020-03-unit-testing-coreboot.md
Makefiles structure is very similar to this used for building coreboot images. Every directory has its own Makefile.inc were tests' names, sources, subdirs and multiple other test-related attributes are defined in form of variables.
Signed-off-by: Jan Dabros jsd@semihalf.com Change-Id: I9b0220b84b9a6e448476ca3eb3ccccc5fb829ad1 --- M Makefile A tests/Makefile.inc 2 files changed, 146 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39894/3
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 3:
(17 comments)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@4 PS2, Line 4: ## This program is free software; you can redistribute it and/or modify : ## it under the terms of the GNU General Public License as published by : ## the Free Software Foundation; version 2 of the License. : ## : ## This program 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 General Public License for more details.
We're dropping these blocks now, so replace it with […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@18 PS2, Line 18: tests
Yes, this is correct. […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@27 PS2, Line 27: TEST_KCONFIG_FLAGS:= DOTCONFIG=$(TEST_DOTCONFIG) \
Makes sense.
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@35 PS2, Line 35:
tab for consistency
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@52 PS2, Line 52: # Include Makefile.inc, clean test-specific variables; : # Add directory prefix to all test-specific variables and test name : # itself in order to allow the same test name in different directories : includemakefiles= \ : $(foreach value,tests test-subdirs, \ : $(eval $(value):=)) \ : $(eval -include $(1)) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(addprefix $(dir $(1)), $(test)-$(attribute)):= \ : $($(test)-$(attribute))))) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(test)-$(attribute):=))) \ : $(eval alltests+=$(addprefix $(dir $(1)), $(tests))) \ : $(eval subdirs+=$(subst $(CURDIR)/,, \ : $(abspath $(addprefix $(dir $(1)),$(test-subdirs))))) : : # Traverse through the unit-tests tree and invoke includemakefiles : evaluate_subdirs= \ : $(eval cursubdirs:=$(subdirs)) \ : $(eval subdirs:=) \ : $(foreach dir,$(cursubdirs), \ : $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ : $(if $(subdirs),$(eval $(call evaluate_subdirs)))
I don't really see why you would need to change the top Makefile, can you explain? Or I guess I ca […]
One more comment which I have regarding your proposal above, namely about $(test)-runner. I think we may ask user to keep explicitly listing all sources he/she wants to include into the final binary. In other words - I don't see that much benefit, while things are less straightforward. After all it is only one extra line.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@86 PS2, Line 86: $(eval $(call evaluate_subdirs))
Yeah, I know the top Makefile isn't perfect in some cases, a lot of stuff in there is pretty ancient […]
Let's start with removing this $(eval). I will think about cleanup in Makefile, but this is kind of a risky change. Let's see how it goes.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@88 PS2, Line 88: .SECONDEXPANSION:
Yeah, let's just move it up in the top Makefile if that's an issue.
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@93 PS2, Line 93: $(eval WRAP_LD_FLAGS:= $(foreach mock,$($(1)-mocks),-Wl,--wrap=$(mock)))
Yes, this was exactly an issue with time of expand and time of use. […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@96 PS2, Line 96: $$$$(filter tests/$$$$*.c, $($(1)-srcs)) $(TEST_KCONFIG_AUTOHEADER)
Indeed. I was so proud of creating such a complicated syntax.. […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@98 PS2, Line 98: $(HOSTCC) $(HOSTCFLAGS) $(TEST_CFLAGS) $($(1)-cflags) -MMD \
I already have -include for kconfig.h and commonlib/bsd/compiler.h. Thought that if kconfig. […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@99 PS2, Line 99: $$(@)
nit: Let's try to be consistent about using $@ or $(@) (though I know other parts of coreboot aren't […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@102 PS2, Line 102: $(HOSTCFLAGS) $(TEST_CFLAGS)
Sounds reasonable.
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@103 PS2, Line 103: $(TEST_LDFLAGS) $(WRAP_LD_FLAGS) -o $$@
Please always add an extra indent for wrapped lines.
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@107 PS2, Line 107: # tests/ dir
Frankly, at this point in time, I'm no longer sure what was my reasoning behind removing tests/ from […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@112 PS2, Line 112: %-test.o
So is this the main reason you want to suffix all tests with '-test'? […]
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@119 PS2, Line 119: $(patsubst %.c,%.o, $(subst tests/,,$($(test)-srcs))))))
Good point.
Done
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@128 PS2, Line 128: cp $(DEFAULT_CONFIG) $(TEST_DOTCONFIG)
Indeed, there is an issue with wrong cp argument - will fix in v3. […]
Done
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@86 PS2, Line 86: $(eval $(call evaluate_subdirs))
Let's start with removing this $(eval). […]
Done
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1:
I'm not really sure I understand the dependency problem you're describing? You just need to make the […]
Actually at the time of writing above, I was unaware of the easy method of defining variable per-target, which I'm now using even in my Makefile.inc. So if we can define per-target variables for Kconfig to consume, then a little Makefile magic should allow me to create what I need.
However, we will need to create config.h for every test right? I'm afraid this may take a significant time to run (for the first, clean build).
That being said, I would like to propose to postpone this work for future, if this is acceptable. This shouldn't be a killer at least at the beginning of writing tests. Let's stabilize what we have now and then introduce changes on top of it.
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39894/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39894/3//COMMIT_MSG@10 PS3, Line 10: based on built using
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 3:
(9 comments)
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile File Makefile:
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile@145 PS3, Line 145: UNIT_TEST:=1 We might want to test here that no non-test goals are specified together with test goals, and error out with a message if they are.
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile@171 PS3, Line 171: include $(DOTCONFIG) Would we ever want to include this $(DOTCONFIG) when building unit tests? I would assume tests should always independent of whatever the user set in menuconfig for their previous build. I would just exclude this with ifneq ($(UNIT_TEST),1).
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@5 PS3, Line 5: override testobj := $(abspath $(testobj)) The use of override here implies that $(testobj) can be overridden manually by the user, but considering that you are using $(obj)/tests directly multiple times below, I don't think it can. Maybe it's better to just get rid of it and always use $(obj)/tests directly?
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@18 PS3, Line 18: -include $(TEST_KCONFIG_AUTOHEADER) Sorry, you were right... if you have kconfig.h you shouldn't have this as well.
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@58 PS3, Line 58: $$($(1)-stage) Can we also check if it is in $(classes-y) somewhere and error out otherwise, to guard against typos?
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@61 PS3, Line 61: build You're using 'build/' a bunch of times directly in here where I think you always want to be using $(obj).
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@115 PS3, Line 115: - ./$^ Why discard errors? Don't we want to stop as soon as we find one? (If you want maybe there can be an extra command line variable or a separate target to run them all despite errors, but I think the default behavior should be to stop on the first error. Also, I think make -k basically gives you the other behavior already.)
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@121 PS3, Line 121: run-unit-tests: $(alltests) In our vboot test framework we discovered that when running all tests in parallel it can be tricky to figure out if there were errors or not (because the errors may scroll off the screen from a bunch of successful tests that ran in parallel). We solved that by echoing a big fat multi-line "all tests passed" message in the recipe for the overall "run tests" target. That way, if you see the message you know that everything passed, if you don't you know there must be an error hidden somewhere further up. I would suggest doing that here as well. (This requires that you don't discard errors when running tests, see above.)
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1:
Actually at the time of writing above, I was unaware of the easy method of defining variable per-tar […]
Yes, time to generate the configs is a good point. It's probably better to go with generating the extra header by hand as you mentioned, that should be much faster and I think it should be good enough. Agree that this can be pushed until later.
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39894
to look at the new patch set (#4).
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
tests: Add build subsystem for unit testing coreboot
Add a subsystem which will be used for writing, building and running unit tests for different coreboot's modules. This work is built using Cmocka unit testing framework. Description of what unit testing means (for the author) and how unit testing framework evaluation was performed may be found in Documentation/technotes/2020-03-unit-testing-coreboot.md
Makefiles structure is very similar to this used for building coreboot images. Every directory has its own Makefile.inc were tests' names, sources, subdirs and multiple other test-related attributes are defined in form of variables.
Signed-off-by: Jan Dabros jsd@semihalf.com Change-Id: I9b0220b84b9a6e448476ca3eb3ccccc5fb829ad1 --- M Makefile A tests/Makefile.inc 2 files changed, 155 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39894/4
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 4:
(11 comments)
https://review.coreboot.org/c/coreboot/+/39894/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39894/3//COMMIT_MSG@10 PS3, Line 10: based on
built using
Done
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile File Makefile:
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile@145 PS3, Line 145: UNIT_TEST:=1
We might want to test here that no non-test goals are specified together with test goals, and error […]
OK.
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile@171 PS3, Line 171: include $(DOTCONFIG)
Would we ever want to include this $(DOTCONFIG) when building unit tests? I would assume tests shoul […]
I was thinking about that we may want to include toolchain.inc if someone would like to use crosgcc to build unit tests in future (currently it is $(HOSTCC) only). But probably I should then include this file in tests/Makefile.inc. tolchain.inc requires $(DOTCONFIG).
Let me conditionally include both toolchain.inc & $(DOTCONFIG) only when there is no unit-testing target of Make.
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/2/tests/Makefile.inc@52 PS2, Line 52: # Include Makefile.inc, clean test-specific variables; : # Add directory prefix to all test-specific variables and test name : # itself in order to allow the same test name in different directories : includemakefiles= \ : $(foreach value,tests test-subdirs, \ : $(eval $(value):=)) \ : $(eval -include $(1)) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(addprefix $(dir $(1)), $(test)-$(attribute)):= \ : $($(test)-$(attribute))))) \ : $(foreach test, $(tests), \ : $(foreach attribute, $(attributes), \ : $(eval $(test)-$(attribute):=))) \ : $(eval alltests+=$(addprefix $(dir $(1)), $(tests))) \ : $(eval subdirs+=$(subst $(CURDIR)/,, \ : $(abspath $(addprefix $(dir $(1)),$(test-subdirs))))) : : # Traverse through the unit-tests tree and invoke includemakefiles : evaluate_subdirs= \ : $(eval cursubdirs:=$(subdirs)) \ : $(eval subdirs:=) \ : $(foreach dir,$(cursubdirs), \ : $(eval $(call includemakefiles,$(dir)/Makefile.inc))) \ : $(if $(subdirs),$(eval $(call evaluate_subdirs)))
One more comment which I have regarding your proposal above, namely about $(test)-runner. […]
Mark as completed.
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@5 PS3, Line 5: override testobj := $(abspath $(testobj))
The use of override here implies that $(testobj) can be overridden manually by the user, but conside […]
Yes, this makes sense. Actually I want to be able to change test output directory, but this won't work in current form. Thanks for pointing this out.
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@18 PS3, Line 18: -include $(TEST_KCONFIG_AUTOHEADER)
Sorry, you were right... if you have kconfig.h you shouldn't have this as well.
Done
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@58 PS3, Line 58: $$($(1)-stage)
Can we also check if it is in $(classes-y) somewhere and error out otherwise, to guard against typos […]
This won't be doable unless we do traverse through all src/directories (currently, we are not invoking includemakefiles macro if building unit tests). I also don't think this will be justified considering extra time needed for this. I will prepare a Make instruction to check whether value is from static list. Let me know, whether this is acceptable.
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@61 PS3, Line 61: build
You're using 'build/' a bunch of times directly in here where I think you always want to be using $( […]
Done
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@115 PS3, Line 115: - ./$^
Why discard errors? Don't we want to stop as soon as we find one? (If you want maybe there can be an […]
Hmm.. Yes, actually I was thinking about running all tests to completion and gathering statistics about them afterwards. Let's say that Jenkins will run unit tests for all new commits and then show the results. For example 60% passes. As you said, -k should do the trick.
Current approach is definitely unacceptable considering usual developers needs. Result should be a binary. Now with 2 tests everything is clear, but yeah, let me change this.
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@121 PS3, Line 121: run-unit-tests: $(alltests)
In our vboot test framework we discovered that when running all tests in parallel it can be tricky t […]
Makes sense.
https://review.coreboot.org/c/coreboot/+/39894/1/tests/include/config.h File tests/include/config.h:
PS1:
Yes, time to generate the configs is a good point. […]
Done
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 4: Code-Review+1
I would +2 but I want other reviewers' feedback before we consider this ready to merge.
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 4: -Code-Review
Sorry, wrong tab
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 4: Code-Review+1
OK, now +1 is actually meant for this CL. And same reasoning for +1 vs. +2 applies as on the other CL.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 4: Code-Review+2
(3 comments)
Cool, I think for a first version this is good to go!
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile File Makefile:
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile@171 PS3, Line 171: include $(DOTCONFIG)
I was thinking about that we may want to include toolchain. […]
Hmm... okay, fair enough, I see that there are some benefits to that (e.g. also handling CONFIG_CCACHE). Not sure what the best answer is. Maybe we should translate the few Kconfig options toolchain.inc cares about into Makefile variables first. Or maybe it's right to have menuconfig affect unit tests for those build-specific options after all.
Can probably be solved at a later time, though.
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@58 PS3, Line 58: $$($(1)-stage)
This won't be doable unless we do traverse through all src/directories (currently, we are not invoki […]
Ack. I would prefer no redundancy but in practice I guess we don't add new stages often enough for this to matter.
https://review.coreboot.org/c/coreboot/+/39894/4/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/4/tests/Makefile.inc@54 PS4, Line 54: filter nit: simpler with $(findstring)
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Fagerburg, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39894
to look at the new patch set (#5).
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
tests: Add build subsystem for unit testing coreboot
Add a subsystem which will be used for writing, building and running unit tests for different coreboot's modules. This work is built using Cmocka unit testing framework. Description of what unit testing means (for the author) and how unit testing framework evaluation was performed may be found in Documentation/technotes/2020-03-unit-testing-coreboot.md
Makefiles structure is very similar to this used for building coreboot images. Every directory has its own Makefile.inc were tests' names, sources, subdirs and multiple other test-related attributes are defined in form of variables.
Signed-off-by: Jan Dabros jsd@semihalf.com Change-Id: I9b0220b84b9a6e448476ca3eb3ccccc5fb829ad1 --- M Makefile A tests/Makefile.inc 2 files changed, 155 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39894/5
Name of user not set #1002873 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile File Makefile:
https://review.coreboot.org/c/coreboot/+/39894/3/Makefile@171 PS3, Line 171: include $(DOTCONFIG)
Hmm... okay, fair enough, I see that there are some benefits to that (e.g. […]
As of now, I think it will be better to add some default variables into a Makefile, which can be overwritten by a cmdline provided along with "make unit-tests". This way we are isolating firmware build system from unit tests build system.
Will work on this in future.
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/3/tests/Makefile.inc@58 PS3, Line 58: $$($(1)-stage)
Ack. […]
Good. After all, hopefully error message is clear and should be easy if one would like to change this const list.
https://review.coreboot.org/c/coreboot/+/39894/4/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/39894/4/tests/Makefile.inc@54 PS4, Line 54: filter
nit: simpler with $(findstring)
Done
Paul Fagerburg has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 5: Code-Review+2
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
Patch Set 5: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39894 )
Change subject: tests: Add build subsystem for unit testing coreboot ......................................................................
tests: Add build subsystem for unit testing coreboot
Add a subsystem which will be used for writing, building and running unit tests for different coreboot's modules. This work is built using Cmocka unit testing framework. Description of what unit testing means (for the author) and how unit testing framework evaluation was performed may be found in Documentation/technotes/2020-03-unit-testing-coreboot.md
Makefiles structure is very similar to this used for building coreboot images. Every directory has its own Makefile.inc were tests' names, sources, subdirs and multiple other test-related attributes are defined in form of variables.
Signed-off-by: Jan Dabros jsd@semihalf.com Change-Id: I9b0220b84b9a6e448476ca3eb3ccccc5fb829ad1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/39894 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Fagerburg pfagerburg@chromium.org Reviewed-by: Julius Werner jwerner@chromium.org --- M Makefile A tests/Makefile.inc 2 files changed, 155 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved Paul Fagerburg: Looks good to me, approved
diff --git a/Makefile b/Makefile index 98e3eb5..55d3db1 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,14 @@ endif endif
+ifneq ($(filter %-test %-tests,$(MAKECMDGOALS)),) +ifneq ($(filter-out %-test %-tests, $(MAKECMDGOALS)),) +$(error Cannot mix unit-tests targets with other targets) +endif +UNIT_TEST:=1 +NOCOMPILE:= +endif + .xcompile: util/xcompile/xcompile rm -f $@ $< $(XGCCPATH) > $@.tmp @@ -159,7 +167,9 @@ @exit 1 else
+ifneq ($(UNIT_TEST),1) include $(DOTCONFIG) +endif
# in addition to the dependency below, create the file if it doesn't exist # to silence stupid warnings about a file that would be generated anyway. @@ -177,7 +187,9 @@ CFLAGS_x86_32 += -mno-mmx endif
+ifneq ($(UNIT_TEST),1) include toolchain.inc +endif
strip_quotes = $(strip $(subst ",,$(subst ",,$(1)))) # fix makefile syntax highlighting after strip macro " ")) @@ -276,7 +288,14 @@ # collect all object files eligible for building subdirs:=$(TOPLEVEL) postinclude-hooks := + +# Don't iterate through Makefile.incs under src/ when building tests +ifneq ($(UNIT_TEST),1) $(eval $(call evaluate_subdirs)) +else +include $(TOPLEVEL)/tests/Makefile.inc +endif + ifeq ($(FAILBUILD),1) $(error cannot continue build) endif diff --git a/tests/Makefile.inc b/tests/Makefile.inc new file mode 100644 index 0000000..82f724e --- /dev/null +++ b/tests/Makefile.inc @@ -0,0 +1,136 @@ +# SPDX-License-Identifier: GPL-2.0-only +# This file is part of the coreboot project. + +testobj = $(obj)/tests + +TEST_DEFAULT_CONFIG = $(top)/configs/config.emulation_qemu_x86_i440fx +TEST_DOTCONFIG = $(testobj)/.config +TEST_KCONFIG_AUTOHEADER := $(testobj)/config.h +TEST_KCONFIG_AUTOCONFIG := $(testobj)/auto.conf +TEST_KCONFIG_DEPENDENCIES := $(testobj)/auto.conf.cmd +TEST_KCONFIG_SPLITCONFIG := $(testobj)/config +TEST_KCONFIG_TRISTATE := $(testobj)/tristate.conf + +TEST_CFLAGS = -include$(src)/include/kconfig.h \ + -include$(src)/commonlib/bsd/include/commonlib/bsd/compiler.h \ + -include $(src)/include/rules.h \ + +# Include generic test mock headers, before original ones +TEST_CFLAGS += -Itests/include/mocks + +TEST_CFLAGS += -I$(src)/include -I$(src)/commonlib/include \ + -I$(src)/commonlib/bsd/include -I$(src)/arch/x86/include \ + +# Path for Kconfig autoheader +TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER)) + +TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections \ + -Wl,--gc-sections -fno-builtin + +# Link against Cmocka +TEST_LDFLAGS = -lcmocka + +# Extra attributes for unit tests, declared per test +attributes:= srcs cflags mocks stage + +stages:= decompressor bootblock romstage smm verstage +stages+= ramstage rmodule postcar libagesa + +alltests:= +subdirs:= tests/arch tests/commonlib tests/console tests/cpu tests/device +subdirs+= tests/drivers tests/ec tests/lib tests/mainboard +subdirs+= tests/northbridge tests/security tests/soc tests/southbridge +subdirs+= tests/superio tests/vendorcode + +define tests-handler +alltests += $(1)$(2) +$(foreach attribute,$(attributes), + $(eval $(1)$(2)-$(attribute) += $($(2)-$(attribute)))) +$(foreach attribute,$(attributes), + $(eval $(2)-$(attribute):=)) + +# Sanity check for stage attribute value +$(eval $(1)$(2)-stage:=$(if $($(1)$(2)-stage),$($(1)$(2)-stage),ramstage)) +$(if $(findstring $($(1)$(2)-stage), $(stages)),, + $(error Wrong $(1)$(2)-stage value $($(1)$(2)-stage). \ + Check your $(dir $(1)$(2))Makefile.inc)) +endef + +$(call add-special-class, tests) +$(call evaluate_subdirs) + +# Create actual targets for unit test binaries +# $1 - test name +define TEST_CC_template +$($(1)-objs): TEST_CFLAGS+= \ + -D__$$(shell echo $$($(1)-stage) | tr '[:lower:]' '[:upper:]')__ +$($(1)-objs): $(obj)/$(1)/%.o: $$$$*.c $(TEST_KCONFIG_AUTOHEADER) + mkdir -p $$(dir $$@) + $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $($(1)-cflags) -MMD \ + -MT $$@ -c $$< -o $$@ + +$($(1)-bin): TEST_LDFLAGS+= $$(foreach mock,$$($(1)-mocks),-Wl,--wrap=$$(mock)) +$($(1)-bin): $($(1)-objs) + $(HOSTCC) $$^ $($(1)-cflags) $$(TEST_LDFLAGS) -o $$@ + +endef + +$(foreach test, $(alltests), \ + $(eval $(test)-objs:=$(addprefix $(obj)/$(test)/, \ + $(patsubst %.c,%.o,$($(test)-srcs))))) +$(foreach test, $(alltests), \ + $(eval $(test)-bin:=$(obj)/$(test)/run)) +$(foreach test, $(alltests), \ + $(eval $(call TEST_CC_template,$(test)))) + +$(foreach test, $(alltests), \ + $(eval all-test-objs+=$($(test)-objs))) +$(foreach test, $(alltests), \ + $(eval test-bins+=$($(test)-bin))) + +DEPENDENCIES += $(addsuffix .d,$(basename $(all-test-objs))) +-include $(DEPENDENCIES) + +# Kconfig targets +$(TEST_DOTCONFIG): + mkdir -p $(dir $@) + cp $(TEST_DEFAULT_CONFIG) $(TEST_DOTCONFIG) + +# Don't override default Kconfig variables, since this will affect all +# Kconfig targets. Change them only when calling sub-make instead. +$(TEST_KCONFIG_AUTOHEADER): TEST_KCONFIG_FLAGS:= DOTCONFIG=$(TEST_DOTCONFIG) \ + KCONFIG_AUTOHEADER=$(TEST_KCONFIG_AUTOHEADER) \ + KCONFIG_AUTOCONFIG=$(TEST_KCONFIG_AUTOCONFIG) \ + KCONFIG_DEPENDENCIES=$(TEST_KCONFIG_DEPENDENCIES) \ + KCONFIG_SPLITCONFIG=$(TEST_KCONFIG_SPLITCONFIG) \ + KCONFIG_TRISTATE=$(TEST_KCONFIG_TRISTATE) \ + KBUILD_DEFCONFIG=$(TEST_DEFAULT_CONFIG) + +$(TEST_KCONFIG_AUTOHEADER): $(TEST_DOTCONFIG) $(objutil)/kconfig/conf + mkdir -p $(dir $@) + +$(MAKE) $(TEST_KCONFIG_FLAGS) olddefconfig + +$(MAKE) $(TEST_KCONFIG_FLAGS) silentoldconfig + +$(TEST_KCONFIG_AUTOCONFIG): $(TEST_KCONFIG_AUTOHEADER) + true + +.PHONY: $(alltests) $(addprefix clean-,$(alltests)) +.PHONY: unit-tests build-unit-tests run-unit-tests clean-unit-tests + +$(alltests): $$($$(@)-bin) + ./$^ + +unit-tests: build-unit-tests run-unit-tests + +build-unit-tests: $(test-bins) + +run-unit-tests: $(alltests) + echo "**********************" + echo " ALL TESTS PASSED" + echo "**********************" + +$(addprefix clean-,$(alltests)): clean-%: + rm -rf $(obj)/$* + +clean-unit-tests: + rm -rf $(testobj)