diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-02-12 00:40:30 -0600 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-03-21 22:51:05 +0100 |
commit | 25fe2d04d583cfaaf55b8f3861f1fad86885d818 (patch) | |
tree | 1754f2d6d2ba668221aceb5703603cf80ca1db85 /src/include | |
parent | c00457d065a0b57e8e2e8abc9318fc6e1198ee64 (diff) |
ramstage: Add cbmem_get_table_location()
When CONFIG_EARLY_CBMEM_INIT is selected romstage is supposed to have
initialized cbmem. Therefore provide a weak function for the chipset
to implement named cbmem_get_table_location(). When
CONFIG_EARLY_CBMEM_INIT is selected cbmem_get_table_location() will be
called to get the cbmem location and size. After that cbmem_initialize()
is called.
Change-Id: Idc45a95f9d4b1d83eb3c6d4977f7a8c80c1ffe76
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/2797
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/cbmem.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h index d0f0c9a5cc..1212cb2655 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -67,6 +67,11 @@ #ifndef __ASSEMBLER__ #ifndef __PRE_RAM__ extern uint64_t high_tables_base, high_tables_size; +#if CONFIG_EARLY_CBMEM_INIT +/* Return 0 on success, < 0 on error. */ +int __attribute__((weak)) cbmem_get_table_location(uint64_t *tables_base, + uint64_t *tables_size); +#endif #endif int cbmem_initialize(void); |