coreboot-kgpe-d16/payloads/libpayload/arch/x86
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
..
Kconfig libpayload/x86/exception: Add ability to ignore unknown interrupts 2018-10-04 15:25:17 +00:00
Makefile.inc libpayload/x86/delay: Add an x86 arch_ndelay 2018-09-12 14:15:25 +00:00
apic.c libpayload/apic: Register a spurious interrupt vector 2018-10-04 15:24:44 +00:00
coreboot.c libpayload: refactor fetching cbmem pointers 2019-10-03 15:27:30 +00:00
delay.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
exception.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
exception_asm.S libpayload/x86/exception: Add ability to handle user defined interrupts 2018-09-10 15:01:04 +00:00
exec.S Use more secure HTTPS URLs for coreboot sites 2017-06-07 12:04:50 +02:00
gdb.c libpayload/x86/gdb: Migrate to use set_interrupt_handler 2018-09-10 15:01:19 +00:00
head.S Use more secure HTTPS URLs for coreboot sites 2017-06-07 12:04:50 +02:00
libpayload.ldscript libpayload: Move base address, stack and heap size to Kconfig 2016-03-15 20:53:38 +01:00
main.c libpayload: Align main() data types 2019-04-05 22:37:19 +00:00
multiboot.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
rom_media.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
selfboot.c libpayload: Introduce new Kconfig to explicitly allow GPL code 2015-01-09 07:06:27 +01:00
string.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
sysinfo.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
timer.c libpayload: timer: Move the timer drivers from depthcharge to libpayload. 2014-11-13 06:23:07 +01:00
util.S libpayload: rename i386 to x86 2012-12-14 22:29:17 +01:00
virtual.c libpayload: rename i386 to x86 2012-12-14 22:29:17 +01:00