coreboot-kgpe-d16/src/lib
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
..
gnat Makefile.inc: Add -fno-pie to ADAFLAGS_common 2022-01-23 18:55:16 +00:00
asan.c
b64_decode.c
bmp_logo.c drivers/intel/fsp1_1,fsp2_0: Refactor logo display 2021-02-09 07:52:31 +00:00
boot_device.c
bootblock.c timestamps: Rename timestamps to make names more consistent 2022-03-08 16:06:33 +00:00
bootmem.c payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity 2022-10-13 19:14:57 +00:00
bootmode.c
bootsplash.c
cb.ads lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
cbfs.c vboot: Add VBOOT_CBFS_INTEGRATION support 2022-11-08 23:03:49 +00:00
cbfs_master_header.c Makefile.inc: Generate master header and pointer as C structs 2022-05-12 11:11:53 +00:00
cbmem_common.c
cbmem_console.c CBMEM: Change declarations for initialization hooks 2022-05-20 07:15:39 +00:00
cbmem_stage_cache.c treewide: Remove "ERROR: "/"WARN: " prefixes from log messages 2022-02-07 23:29:09 +00:00
compute_ip_checksum.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
coreboot_table.c lib/coreboot_table: Rename lb_fill_pcie 2022-11-04 19:17:49 +00:00
crc_byte.c
decompressor.c timestamps: Rename timestamps to make names more consistent 2022-03-08 16:06:33 +00:00
delay.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
device_tree.c lib/device_tree.c: zero-initialize new DT nodes 2022-03-22 20:45:26 +00:00
dimm_info_util.c arch/x86: Refactor the SMBIOS type 17 write function 2021-11-11 09:10:10 +00:00
dp_aux.c Use the fallthrough statement in switch loops 2022-02-16 21:29:53 +00:00
edid.c Use the fallthrough statement in switch loops 2022-02-16 21:29:53 +00:00
edid_fill_fb.c lib/edid_fill_fb.c: Remove unused <bootsplash.h> 2022-04-24 17:44:24 +00:00
espi_debug.c lib/espi_debug: Add espi_show_slave_peripheral_channel_configuration 2021-04-23 21:20:26 +00:00
ext_stage_cache.c CBMEM: Change declarations for initialization hooks 2022-05-20 07:15:39 +00:00
fallback_boot.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
fit.c lib/fit.c: Don't align memory regions to 1MB 2022-07-08 00:00:24 +00:00
fit_payload.c timestamps: Rename timestamps to make names more consistent 2022-03-08 16:06:33 +00:00
fmap.c CBMEM: Change declarations for initialization hooks 2022-05-20 07:15:39 +00:00
fw_config.c lib: Introduce fw_config_get_field 2022-12-17 20:43:16 +00:00
gcc.c
gcov-glue.c payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity 2022-10-13 19:14:57 +00:00
gcov-io.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
gcov-io.h lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
gcov-iov.h lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
gpio.c
halt.c
hardwaremain.c timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
hexdump.c lib/hexdump: remove hexdump32 and use hexdump instead 2021-05-27 15:41:15 +00:00
hexstrtobin.c
hw-time-timer.adb
imd.c lib: Remove unused <stdlib.h> and use <types.h> when appropriate 2022-04-24 17:43:57 +00:00
imd_cbmem.c cbmem_top_chipset: Change the return value to uintptr_t 2022-11-18 16:00:45 +00:00
jpeg.c
jpeg.h
Kconfig lib/lzma: Build the source for decompression with flag -Ofast 2022-10-12 16:55:58 +00:00
Kconfig.cbfs_verification cbfs_verification: Remove dependency on VBOOT_STARTS_BEFORE_BOOTBLOCK 2022-10-26 17:19:22 +00:00
libgcc.c
libgcov.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
list.c lib/list: Add list_append 2021-11-03 08:29:16 +00:00
lzma.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
lzmadecode.c lib/lzma: Build the source for decompression with flag -Ofast 2022-10-12 16:55:58 +00:00
lzmadecode.h
Makefile.inc lib/metadata_hash: Include metadata_hash in verstage 2022-10-26 15:59:02 +00:00
malloc.c lib/malloc.c: Fix log messages 2022-11-18 16:02:28 +00:00
master_header_pointer.c Kconfig: Add an option to skip adding a cbfs bootblock on x86 2022-05-12 11:12:21 +00:00
memchr.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
memcmp.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
memcpy.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
memmove.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
memrange.c allocator_v4: Introduce RESOURCE_ALLOCATION_TOP_DOWN 2022-09-04 16:35:22 +00:00
memset.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
metadata_hash.c cbfs/vboot: Adapt to new vb2_digest API 2022-09-02 23:51:29 +00:00
nhlt.c src/acpi to src/lib: Fix spelling errors 2021-10-05 18:06:39 +00:00
primitive_memtest.c
prog_loaders.c lib/prog_loaders.c: Clean up includes 2022-10-06 18:13:30 +00:00
prog_ops.c lib/prog_ops.c: Add <types.h> 2022-10-06 18:13:19 +00:00
program.ld arch/x86: Only use .bss from car.ld when running XIP 2022-10-20 14:43:40 +00:00
ramdetect.c
ramtest.c lib/ramtest.c: Use {read,write}32p() 2022-12-10 00:01:05 +00:00
reg_script.c
region_file.c src/acpi to src/lib: Fix spelling errors 2021-10-05 18:06:39 +00:00
reset.c
rmodule.c payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity 2022-10-13 19:14:57 +00:00
rmodule.ld lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
romstage_handoff.c
rtc.c lib/rtc: Add sanity check for time and date 2021-05-30 20:24:13 +00:00
selfboot.c /: Remove extra space after comma 2022-11-30 03:07:23 +00:00
spd_bin.c lib: Add LPDDR5x DRAM type 2022-11-07 02:29:23 +00:00
spd_cache.c lib: Check for non-existent DIMMs in check_if_dimm_changed 2022-04-20 06:57:21 +00:00
stack.c
string.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
thread.c timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
timer.c
timer_queue.c lib/timer_queue.c: Fix function signature 2022-09-23 17:34:30 +00:00
timestamp.c CBMEM: Change declarations for initialization hooks 2022-05-20 07:15:39 +00:00
ubsan.c
uuid.c
version.c lib: Add SPDX identifiers to files missing them 2022-08-11 17:53:29 +00:00
wrdd.c
xxhash.c lib/xxhash.c: Add new hash functions 2022-09-07 22:24:51 +00:00