Initialize CBMEM early.
authorVadim Bendebury <vbendeb@chromium.org>
Wed, 21 Sep 2011 00:07:14 +0000 (17:07 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Wed, 28 Mar 2012 18:38:41 +0000 (20:38 +0200)
We want to be able to share data between different phases of firmware
(rom stage/ram stage/payload). Coreboot CBMEM seems an appropriate
location for this data, but normally it is not initialized
until coreboot reaches the ram stage.

This change initializes the CBMEM while still in rom stage in
case CONFIG_EARLY_CBMEM_INIT is set.

Note that there is a discrepancy in how coreboot determines the
size of DRAM at rom and ram stages, get_top_of_ram() is used at
rom stage and is not defined for all platforms. Those platforms
will have to define this function should they enable the
CONFIG_EARLY_CBMEM_INIT flag.

Change-Id: I81691d45e28de59496fb227f2cca4e8c15ece717
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/711
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>

No differences found