coreboot/src/include
Tim Wawrzynczak 473bc8c892 fw_config: Use UNDEFINED_FW_CONFIG to mean unprovisioned
A mainboard might want to configure some things differently when a
device is in an unprovisioned state. In the case when fw_config comes
from the Chromium EC, an unprovisioned device will not have a FW_CONFIG
tag in its CBI. This patch will set the fw_config value to
UNDEFINED_FW_CONFIG in the case of an error retrieving the value, as
well as adding a function, `fw_config_is_provisioned()` to indicate the
provisioning status.

BUG=none
TEST=remove fw_config from chromium EC CBI, add code to mainboard to
print return value of fw_config_is_provisioned() (`0`), add
fw_config back to CBI, run same test and see `1`.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ib3046233667e97a5f78961fabacbeb3099b3d442
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47956
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-11 16:59:35 +00:00
..
acpi ACPI: Define acpi_get_preferred_pm_profile() 2020-11-19 22:58:41 +00:00
boot src/include: Add missing includes 2020-07-26 21:37:35 +00:00
console console: Override uart base address 2020-11-09 07:46:10 +00:00
cpu cpu/x86/smm_module_loaderv2: Fix compiling for x86_64 2020-12-04 17:20:30 +00:00
device include/device/device: add comment that config_of_soc never returns NULL 2020-12-06 19:00:35 +00:00
efi treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pc80 src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
smp src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
superio src/include: Add PnP/HWM unset_and_set functions 2020-09-18 12:06:38 +00:00
sys src/include: Add guards on all header files 2017-08-01 23:04:15 +00:00
adainit.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
asan.h include/asan.h: Add missing includes 2020-08-21 13:36:10 +00:00
assert.h arch/x86/boot: Jump to payload in protected mode 2020-08-19 09:06:43 +00:00
b64_decode.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
base3.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bcd.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
boardid.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
boot_device.h cbfs: Move more stuff into cbfs_boot_lookup() 2020-12-02 22:13:06 +00:00
bootblock_common.h src/lib/bootblock.c: make bootblock_main_with_timestamp public 2020-09-22 07:00:34 +00:00
bootmem.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootmode.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootsplash.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootstate.h src/include: Remove unused 'include <stdint.h>' 2020-07-26 20:59:16 +00:00
cbfs.h cbfs: Add verification for RO CBFS metadata hash 2020-12-03 00:11:08 +00:00
cbfs_glue.h cbfs: Add verification for RO CBFS metadata hash 2020-12-03 00:11:08 +00:00
cbfs_private.h cbfs: Move more stuff into cbfs_boot_lookup() 2020-12-02 22:13:06 +00:00
cbmem.h cbmem: Make cbmem_online() accurate on stages after romstage 2020-12-08 21:38:51 +00:00
cper.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
crc_byte.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
ctype.h add ctype.h header 2019-06-24 21:15:14 +00:00
delay.h cpu/x86/lapic: Refactor timer_fsb() 2019-09-19 09:28:55 +00:00
device_tree.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
dimm_info_util.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
edid.h lib/edid_fill_fb: Support multiple framebuffers 2020-12-10 19:31:29 +00:00
elog.h elog: Add new wake source codes 2020-11-30 08:05:55 +00:00
endian.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
espi.h Remove new additions of "this file is part of" lines 2020-05-13 08:37:21 +00:00
fallback.h drivers/pc80/rtc: Clean up some headers 2020-01-07 18:40:02 +00:00
fit.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
fit_payload.h src/include: Remove unused 'include <stdint.h>' 2020-07-26 20:59:16 +00:00
fmap.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
framebuffer_info.h lib/edid_fill_fb: Support multiple framebuffers 2020-12-10 19:31:29 +00:00
fw_config.h fw_config: Use UNDEFINED_FW_CONFIG to mean unprovisioned 2020-12-11 16:59:35 +00:00
gic.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
gpio.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
halt.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
imd.h include/imd: Improve API documentation 2020-08-26 07:32:37 +00:00
imd_private.h lib/imd: move struct definitions to a new header file 2020-10-19 06:55:03 +00:00
input-event-codes.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
inttypes.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
ip_checksum.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
kconfig.h kconfig: Drop IS_ENABLED() macro 2019-06-04 13:33:40 +00:00
lib.h lib and libpayload: Add popcnt functions 2020-10-15 19:01:51 +00:00
list.h include/list.h: Add support for GCC9+ 2020-11-03 09:11:21 +00:00
main_decl.h arches: lib: add main_decl.h for main() declaration 2016-02-11 23:29:08 +01:00
memlayout.h cbfs: Add metadata cache 2020-11-21 10:43:53 +00:00
memory_info.h soc: move mainboard_get_dram_part_num prototype to memory_info.h 2020-10-05 18:02:37 +00:00
memrange.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
metadata_hash.h cbfs: Add verification for RO CBFS metadata hash 2020-12-03 00:11:08 +00:00
mrc_cache.h mrc_cache: Change mrc_cache_load_current to return size of entry 2020-10-09 05:38:04 +00:00
nhlt.h soc/intel/skylake: Use correct NHLT_PDM_DEV definition 2020-11-24 09:42:14 +00:00
option.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
post.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
program_loading.h ACPI: Clean up some S3 related leftovers 2020-06-18 12:54:46 +00:00
ramdetect.h src/include/ramdetect.h: Add missing includes 2020-07-25 01:25:57 +00:00
random.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
reg_script.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
region_file.h region_file_update_data_arr: Modify region_file with array of buffers 2020-09-16 16:02:54 +00:00
reset.h reset: Finalize move to new API 2018-10-31 15:29:42 +00:00
rmodule.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
romstage_handoff.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
rtc.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
rules.h src: Update some incorrect config options in comments 2020-11-16 12:09:58 +00:00
sar.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
sdram_mode.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
smbios.h arch/x86/smbios: Update SMBIOS type 16 error correction type 2020-11-25 09:18:04 +00:00
smmstore.h drivers/smmstore: Implement SMMSTORE version 2 2020-10-22 12:29:47 +00:00
spd.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
spd_bin.h lib/spd_bin: add get_spd_sn function 2020-05-13 12:04:03 +00:00
spd_cache.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
spd_ddr2.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
spi-generic.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
spi_bitbang.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
spi_flash.h coreboot tables: Add SPI flash memory map windows to coreboot tables 2020-12-08 22:56:09 +00:00
spi_sdcard.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
stage_cache.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
stdarg.h create stdio.h and stdarg.h for {,v}snprintf 2020-03-25 23:38:46 +00:00
stdbool.h src/include: Remove unused 'include <stdint.h>' 2020-07-26 20:59:16 +00:00
stddef.h Remove MAYBE_STATIC_BSS and ENV_STAGE_HAS_BSS_SECTION 2020-05-26 15:04:08 +00:00
stdint.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
stdio.h create stdio.h and stdarg.h for {,v}snprintf 2020-03-25 23:38:46 +00:00
stdlib.h lib/malloc: Implement a simple free() only for last malloc() 2020-01-02 18:22:53 +00:00
string.h lib/string: Add standard strstr() function 2020-08-03 05:12:23 +00:00
swab.h Drop ROMCC code and header guards 2019-12-19 03:25:05 +00:00
symbols.h cbfs: Add metadata cache 2020-11-21 10:43:53 +00:00
thread.h src/include: Remove unused 'include <stddef.h>' 2020-07-26 21:37:55 +00:00
timer.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
timestamp.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
types.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
uuid.h include/uuid.h: Add missing include 2020-05-28 16:20:40 +00:00
vbe.h src: Use 'include <boot/coreboot_tables.h>' when appropriate 2019-10-27 17:48:30 +00:00
version.h ACPI: Correct asl_compiler_revision value 2019-02-21 19:07:31 +00:00
watchdog.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
wrdd.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00