coreboot: infrastructure for different ramstage loaders

There are 2 methods currently available in coreboot to load
ramstage from romstage: cbfs and vboot. The vboot path had
to be explicitly enabled and code needed to be added to
each chipset to support both. Additionally, many of the paths
were duplicated between the two. An additional complication
is the presence of having a relocatable ramstage which creates
another path with duplication.

To rectify this situation provide a common API through the
use of a callback to load the ramstage. The rest of the
existing logic to handle all the various cases is put in
a common place.

Change-Id: I5268ce70686cc0d121161a775c3a86ea38a4d8ae
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/5087
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Aaron Durbin
2014-01-30 17:19:46 -06:00
committed by Aaron Durbin
parent e9aaa71fb1
commit 0f333071ef
14 changed files with 298 additions and 135 deletions

View File

@ -66,6 +66,7 @@
#define CBMEM_ID_HOB_POINTER 0x484f4221
#ifndef __ASSEMBLER__
#include <stddef.h>
#include <stdint.h>
struct cbmem_entry;
@ -150,6 +151,10 @@ void cbmem_late_set_table(uint64_t base, uint64_t size);
void get_cbmem_table(uint64_t *base, uint64_t *size);
struct cbmem_entry *get_cbmem_toc(void);
static inline const struct cbmem_entry *cbmem_entry_find(uint32_t id)
{
return NULL;
}
#endif /* CONFIG_DYNAMIC_CBMEM */
/* Common API between cbmem and dynamic cbmem. */