coreboot/src/cpu
Julius Werner 7dd5bbd712 cbmem: Unify random on-CBMEM-init tasks under common CBMEM_INIT_HOOK() API
There are several use cases for performing a certain task when CBMEM is
first set up (usually to migrate some data into it that was previously
kept in BSS/SRAM/hammerspace), and unfortunately we handle each of them
differently: timestamp migration is called explicitly from
cbmem_initialize(), certain x86-chipset-specific tasks use the
CAR_MIGRATION() macro to register a hook, and the CBMEM console is
migrated through a direct call from romstage (on non-x86 and SandyBridge
boards).

This patch decouples the CAR_MIGRATION() hook mechanism from
cache-as-RAM and rechristens it to CBMEM_INIT_HOOK(), which is a clearer
description of what it really does. All of the above use cases are
ported to this new, consistent model, allowing us to have one less line
of boilerplate in non-CAR romstages.

BRANCH=None
BUG=None
TEST=Built and booted on Nyan_Blaze and Falco with and without
CONFIG_CBMEM_CONSOLE. Confirmed that 'cbmem -c' shows the full log after
boot (and the resume log after S3 resume on Falco). Compiled for Parrot,
Stout and Lumpy.

Change-Id: I1681b372664f5a1f15c3733cbd32b9b11f55f8ea
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/232612
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-12-04 04:01:59 +00:00
..
amd coreboot: Introduce stage-specific architecture for coreboot 2014-05-09 04:41:47 +00:00
armltd arm: Redesign mainboard and SoC hooks for bootblock 2014-12-02 22:36:17 +00:00
intel timestamp: remove conditional #if CONFIG_COLLECT_TIMESTAMPS 2014-11-07 01:24:01 +00:00
mips CBFS: Automate ROM image layout and remove hardcoded offsets 2014-12-03 06:09:54 +00:00
via coreboot: Introduce stage-specific architecture for coreboot 2014-05-09 04:41:47 +00:00
x86 cbmem: Unify random on-CBMEM-init tasks under common CBMEM_INIT_HOOK() API 2014-12-04 04:01:59 +00:00
Kconfig arch/mips: Add base MIPS architecture support 2014-09-01 11:05:57 +00:00
Makefile.inc imgtec/danube: Add support for ImgTec Danube SoC 2014-09-01 11:06:39 +00:00