coreboot/src/include
Eric Lai 5b89bf4666 lib: Introduce fw_config_get_field
In some cases, fw_config is used for ids like sar_id, sku_id etc.
To avoid calling fw_config_probe over and over, hence provide the
method to return the value then caller can use the switch case
instead of if else statement.

TEST=get fw_config field value on nivviks.
[INFO ]  fw_config get field name=DB_USB, mask=0x3, shift=0, value =0x1

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: Iae89668e8fe7322d5a4dcbf88a97d7ed36619af5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70745
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
2022-12-17 20:43:16 +00:00
..
acpi soc/intel/{adl, common}: provide a list of D-states to enter LPM 2022-12-15 16:53:51 +00:00
boot lib/coreboot_table: Rename lb_fill_pcie 2022-11-04 19:17:49 +00:00
console treewide: Add 'IWYU pragma: export' comment 2022-11-03 13:05:17 +00:00
cpu cpu/cpu.h: Change the function signature 2022-12-10 17:54:53 +00:00
device drivers/wifi: Move ADL-P CNVi IDs from generic to IA common code CNVi driver 2022-12-12 01:31:48 +00:00
efi include/efi: Add EFI Status code definitions 2022-03-25 19:26:28 +00:00
mipi commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
pc80 include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
smp include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
superio src/include: Add PnP/HWM unset_and_set functions 2020-09-18 12:06:38 +00:00
sys include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
adainit.h
asan.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
assert.h arch/x86: Use ENV_X86_64 instead of _x86_64_ 2021-07-06 06:09:13 +00:00
b64_decode.h
base3.h
boardid.h
boot_device.h cbfs: Move more stuff into cbfs_boot_lookup() 2020-12-02 22:13:06 +00:00
bootblock_common.h decompressor: Add CBFS_VERIFICATION support 2021-04-06 07:49:15 +00:00
bootmem.h cbfs: Remove prog_locate() for payloads (SELF and FIT) 2021-03-17 00:13:53 +00:00
bootmode.h mb/google,samsung: Drop init_bootmode_straps() 2022-04-09 02:50:01 +00:00
bootsplash.h drivers/intel/fsp1_1,fsp2_0: Refactor logo display 2021-02-09 07:52:31 +00:00
bootstate.h lib/hardwaremain: Drop boot_state_current_{block,unblock}() 2021-07-18 15:16:26 +00:00
cbfs.h commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
cbfs_glue.h vboot: Add VBOOT_CBFS_INTEGRATION support 2022-11-08 23:03:49 +00:00
cbmem.h cbmem_top_chipset: Change the return value to uintptr_t 2022-11-18 16:00:45 +00:00
cper.h include/cper.h: Add CPER Memory Error Section definitions 2022-12-09 03:46:33 +00:00
crc_byte.h
ctype.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
delay.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
device_tree.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
dimm_info_util.h arch/x86: Refactor the SMBIOS type 17 write function 2021-11-11 09:10:10 +00:00
dp_aux.h google/trogdor: Add backlight support for Parade ps8640 2021-11-02 08:17:21 +00:00
edid.h include/edid.h: Remove repeated word 2021-01-18 07:37:04 +00:00
elog.h elog: move MAX_EVENT_SIZE to commonlib/bsd/include 2021-09-10 22:53:19 +00:00
endian.h
espi.h include/espi.h: Switch to types.h 2022-03-27 15:13:31 +00:00
fallback.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
fit.h
fmap.h
framebuffer_info.h src: Remove unused <stdbool> 2022-01-19 15:15:50 +00:00
fw_config.h lib: Introduce fw_config_get_field 2022-12-17 20:43:16 +00:00
gpio.h include/gpio: skip everything but soc/gpio.h include in ASM & ACPI cases 2022-12-13 15:23:37 +00:00
halt.h
imd.h include/imd: Improve API documentation 2020-08-26 07:32:37 +00:00
imd_private.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
input-event-codes.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
inttypes.h
ip_checksum.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
kconfig.h
lib.h lib: Add __fls() (Find Last Set) 2021-12-13 02:57:07 +00:00
limits.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
list.h lib/list: Add list_append 2021-11-03 08:29:16 +00:00
main_decl.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
memlayout.h include/memlayout.h: update comment about VBOOT2 work buffer size 2022-11-21 14:07:46 +00:00
memory_info.h soc/intel: Add node_num to dimm_info struct + adjust dimm_info_fill 2022-11-17 17:51:46 +00:00
memrange.h include/memrange.h: Remove trailing semicolon 2022-09-28 16:12:04 +00:00
metadata_hash.h src: Drop "This file is part of the coreboot project" lines 2021-05-10 15:07:33 +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 option: Turn CMOS option backend into choice 2021-05-28 11:37:16 +00:00
post.h
program_loading.h lib/program_loaders.c: Mark run_ramstage with __noreturn 2022-07-14 23:10:17 +00:00
ramdetect.h
random.h
reg_script.h include/reg_script.h: Remove trailing semicolon 2022-09-28 16:12:24 +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 include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
rmodule.h
romstage_common.h arch/x86: Add a common romstage entry 2022-06-07 12:54:39 +00:00
romstage_handoff.h
rtc.h lib/rtc: Add sanity check for time and date 2021-05-30 20:24:13 +00:00
rules.h arch/x86: Only use .bss from car.ld when running XIP 2022-10-20 14:43:40 +00:00
sar.h wifi: Update deny list entry size to uint16_t 2021-09-09 15:01:35 +00:00
sdram_mode.h
smbios.h arch/x86/smbios: Add SMBIOS Type 39 2022-11-17 21:17:49 +00:00
smmstore.h payloads/tianocore: Rename TianoCore to edk2 2022-08-13 16:35:18 +00:00
spd.h include/spd.h: Fix comment module type information 2022-11-22 12:49:12 +00:00
spd_bin.h lib: Add LPDDR5x DRAM type 2022-11-07 02:29:23 +00:00
spd_cache.h src/lib: Add Kconfig option for SPD cache in FMAP 2020-12-14 08:23:41 +00:00
spi-generic.h drivers/spi/spi-generic: document SPI_CNTRLR_DEDUCT_CMD_LEN better 2021-12-15 22:39:21 +00:00
spi_bitbang.h
spi_flash.h drivers: spi_flash: Add Fast Read Dual I/O support 2021-07-15 14:05:34 +00:00
spi_sdcard.h
stage_cache.h stage_cache: Add resume_from_stage_cache() 2021-01-29 10:53:33 +00:00
stdarg.h
stdbool.h
stddef.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
stdint.h
stdio.h
stdlib.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
string.h treewide: Add 'IWYU pragma: export' comment 2022-11-03 13:05:17 +00:00
swab.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
symbols.h ELOG: Refactor watchdog_tombstone 2022-04-06 23:42:56 +00:00
thread.h rules.h: Use more consistent naming 2022-05-16 21:52:22 +00:00
timer.h timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
timestamp.h timestamp: Allow timestamp_add to accept a negative number 2022-01-21 22:42:19 +00:00
types.h treewide: Add 'IWYU pragma: export' comment 2022-11-03 13:05:17 +00:00
uuid.h
vbe.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
version.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
watchdog.h include: Add SPDX-License-Identifiers to files missing them 2022-08-01 13:59:11 +00:00
wrdd.h
xxhash.h lib/xxhash.c: Add new hash functions 2022-09-07 22:24:51 +00:00