romstage_handoff: provide common logic for setup

The romstage_handoff structure can be utilized from different components
of the romstage -- some in the chipset code, some in coreboot's core
libarary. To ensure that all users handle initialization of a newly
added romstage_handoff structure properly, provide a common function to
handle structure initialization.

Change-Id: I3998c6bb228255f4fd93d27812cf749560b06e61
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/2795
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Aaron Durbin
2013-02-11 21:07:18 -06:00
committed by Ronald G. Minnich
parent ef4275bc2e
commit f2b20d898a
2 changed files with 28 additions and 1 deletions

View File

@ -161,7 +161,7 @@ void * cbfs_load_stage(struct cbfs_media *media, const char *name)
if (rmodule_load(ramstage_loc, &ramstage))
return (void *) -1;
handoff = cbmem_add(CBMEM_ID_ROMSTAGE_INFO, sizeof(*handoff));
handoff = romstage_handoff_find_or_add();
if (handoff) {
handoff->reserve_base = (uint32_t)ramstage_base;
handoff->reserve_size = (uint32_t)cbmem_base -