coreboot-kgpe-d16/payloads/libpayload/include
Patrick Georgi 006eb9d8c8 libpayload: refactor fetching cbmem pointers
There's a recurring pattern of reading cbtable entries that point into
cbmem entries. Move that pattern into its own function.

Coccinelle patch used for this:
  @@
  identifier T, T2;
  expression TARGET;
  @@
  -struct cb_cbmem_tab *const T2 = (struct cb_cbmem_tab *)T;
  -TARGET = phys_to_virt(T2->cbmem_tab);
  +TARGET = get_cbmem_ptr(T);

Change-Id: I7bd4a7ad8baeeaebf0fa7d4b4de6dbc719bc781f
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35756
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2019-10-03 15:27:30 +00:00
..
arm/arch
arm64/arch libpayload: arm64: Make exception handling closer to arm32 2018-10-12 20:17:28 +00:00
arpa
mips/arch
pci
storage payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
sys libpayload/sys/types.h: Add definition for off_t 2019-02-13 12:03:03 +00:00
udc
usb libpayload/usb: add USB 3.1 GEN2 support 2019-08-27 07:21:00 +00:00
x86/arch
archive.h
assert.h
cbfs.h
cbfs_core.h libpayload: cbfs: Require input size and output size for cbfs_decompress 2019-02-28 13:56:26 +00:00
cbfs_ram.h
cbgfx.h
compiler.h Make common macros double-evaluation safe 2019-04-04 19:38:31 +00:00
coreboot_tables.h libpayload: refactor fetching cbmem pointers 2019-10-03 15:27:30 +00:00
ctype.h
die.h
endian.h payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
errno.h
exception.h
fmap_serialized.h fmap: Add FMAP_AREA_PRESERVE 2019-03-04 13:25:01 +00:00
gdb.h libpayload: gdb: Factor out gdb_handle_reentrant_exception() from arm32 2018-10-12 20:17:40 +00:00
getopt.h
inttypes.h
ipchksum.h
kconfig.h Add new CONFIG(XXX) macro to replace IS_ENABLED(CONFIG_XXX) 2019-03-07 17:06:28 +00:00
keycodes.h
libpayload.h Add buffer_to/from_fifo32(_prefix) helpers 2019-08-22 10:36:22 +00:00
limits.h libpayload: limits.h: Provide reliable definitions for all XXX_MAX/MIN 2019-04-10 10:43:27 +00:00
lz4.h
lzma.h
malloc.h
multiboot_tables.h
panel.h
pci.h
queue.h
stdarg.h
stddef.h
stdint.h
stdio.h
stdlib.h libpayload: Deduplicate strtol and strtoull 2019-04-10 10:44:31 +00:00
string.h libpayload/libc: Tidy utf16le_to_ascii 2019-07-23 09:09:45 +00:00
strings.h
swab.h
sysinfo.h libpayload: Add fmap_cache to sysinfo_t 2019-10-02 11:26:53 +00:00
term.h
time.h
unistd.h
video_console.h