coreboot-kgpe-d16/src/lib
Furquan Shaikh b33a2b05af fmap: Add get_fmap_flash_offset()
CB:35377 changed the behavior of find_fmap_directory() to return
pointer to CBMEM_ID_FMAP if fmap is cached in
cbmem. lb_boot_media_params() calls find_fmap_directory to add offset
of fmap in flash to coreboot table. However, because of the change in
behavior of find_fmap_directory(), it ended up adding 0 as the offset.

This change adds a new function get_fmap_flash_offset() which returns
the offset of fmap in flash. Ideally, all payloads should move to
using the FMAP from CBMEM. However, in order to maintain compatibility
with payloads which are not updated, ensure that fmap_offset is
updated correctly.

Since find_fmap_directory() is no longer used outside fmap.c, this
change also removes it from fmap.h and limits scope to fmap.c.

In a follow up patch, we need to push a change to libpayload to expose
the fmap cache pointer to lib_sysinfo.

BUG=b:141723751

Change-Id: I7ff6e8199143d1a992a83d7de1e3b44813b733f4
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2019-09-27 21:59:44 +00:00
..
gnat lib/gnat: Enable -Werror 2019-06-28 08:42:16 +00:00
Kconfig src/Kconfig: Move DRAM section to src/lib/Kconfig 2019-05-20 10:58:56 +00:00
Makefile.inc lib/stage_cache: Refactor Kconfig options 2019-08-08 04:50:33 +00:00
b64_decode.c
boot_device.c boot_device: Constify argument 2019-05-12 07:47:45 +00:00
bootblock.c lib/bootblock: Add simplified entry with basetime 2019-08-26 21:11:31 +00:00
bootmem.c lib/bootmem: Prepare for OpenSBI 2019-07-31 10:57:30 +00:00
bootmode.c Revert "src/security/vboot: Add option to skip display init with vboot 2.0" 2019-07-29 17:21:09 +00:00
bootsplash.c lib/bootsplash: Fix compilation 2019-09-27 16:20:04 +00:00
cb.ads Hook up Kconfig Ada spec file 2019-02-06 16:20:35 +00:00
cbfs.c src: Use include <console/console.h> when appropriate 2019-04-23 10:01:21 +00:00
cbmem_common.c arch/x86: Remove acpi_fail_wakeup() and cbmem_fail_resume() 2019-09-14 10:55:34 +00:00
cbmem_console.c src/: Replace some __PRE_RAM__ use 2019-09-14 11:16:17 +00:00
cbmem_stage_cache.c
compute_ip_checksum.c
coreboot_table.c fmap: Add get_fmap_flash_offset() 2019-09-27 21:59:44 +00:00
decompressor.c src: Use '#include <timestamp.h>' when needed 2019-07-15 02:26:52 +00:00
delay.c
device_tree.c add ctype.h header 2019-06-24 21:15:14 +00:00
dimm_info_util.c
edid.c lib: edid: Move manufacturer name from private extra to public info 2019-08-15 03:04:08 +00:00
edid_fill_fb.c lib/edid: Add suport for display rotation 2019-08-08 03:18:35 +00:00
ext_stage_cache.c buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
fallback_boot.c coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
fit.c add ctype.h header 2019-06-24 21:15:14 +00:00
fit_payload.c lib: Throw an error when ramdisk is present but initrd.size is 0 2019-08-06 20:29:57 +00:00
fmap.c fmap: Add get_fmap_flash_offset() 2019-09-27 21:59:44 +00:00
gcc.c
gcov-glue.c coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
gcov-io.c
gcov-io.h
gcov-iov.h
generic_dump_spd.c src: Add missing include 'console.h' 2019-04-23 10:00:39 +00:00
gpio.c src: include <assert.h> when appropriate 2019-04-23 10:01:36 +00:00
halt.c
hardwaremain.c timestamps: Improve collection for ENV_ROMSTAGE_OR_BEFORE 2019-09-11 04:57:12 +00:00
hexdump.c src/lib/hexdump: Use size_t for indices 2019-07-23 09:09:22 +00:00
hexstrtobin.c add ctype.h header 2019-06-24 21:15:14 +00:00
hw-time-timer.adb
imd.c
imd_cbmem.c src/: Replace some __PRE_RAM__ use 2019-09-14 11:16:17 +00:00
jpeg.c
jpeg.h
libgcc.c coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
libgcov.c
list.c
lzma.c Split MAYBE_STATIC to _BSS and _NONZERO variants 2019-08-26 20:56:29 +00:00
lzmadecode.c src/{include,arch,cpu,lib}: Add missing 'include <types.h>' 2019-05-29 20:27:18 +00:00
lzmadecode.h
malloc.c coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
memchr.c
memcmp.c
memcpy.c
memmove.c
memrange.c Replace ENV_RAMSTAGE with ENV_PAYLOAD_LOADER 2019-06-24 04:33:06 +00:00
memset.c
nhlt.c
primitive_memtest.c src: Include <stdint.h> instead of <inttypes.h> 2019-08-10 01:33:58 +00:00
prog_loaders.c ACPI S3: Depend on RELOCATABLE_RAMSTAGE 2019-08-22 06:38:13 +00:00
prog_ops.c
program.ld src/: Replace some __PRE_RAM__ use 2019-09-14 11:16:17 +00:00
ramdetect.c lib: ramdetect: Register exception handlers for ARMv8 2019-08-26 07:14:03 +00:00
ramtest.c Move calls to quick_ram_check() before CBMEM init 2019-03-27 08:26:16 +00:00
reg_script.c src/: Replace some __PRE_RAM__ use 2019-09-14 11:16:17 +00:00
region_file.c
reset.c coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
rmodule.c src: Remove unneeded include <lib.h> 2018-11-16 09:50:51 +00:00
rmodule.ld
romstage_handoff.c buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
rtc.c rtc: Fix rtc_calc_weekday 2019-02-27 11:07:11 +00:00
selfboot.c src/lib/selfboot: Remove unused variables 2019-04-25 15:55:21 +00:00
spd_bin.c lib/spd_bin: Extend DDR4 spd information 2019-09-09 13:30:10 +00:00
stack.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
string.c string: implement strspn, strcspn, atol 2019-08-10 01:32:19 +00:00
thread.c src: Use #include <timer.h> when appropriate 2019-04-06 16:02:49 +00:00
timer.c
timer_queue.c
timestamp.c timestamps: Remove TIMESTAMP_CACHE_IN_BSS 2019-09-13 19:48:26 +00:00
trace.c
ubsan.c
version.c ACPI: Correct asl_compiler_revision value 2019-02-21 19:07:31 +00:00
wrdd.c