Hung-Te Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32541
Change subject: soc/mediatek: Register coreboot table for ATF ......................................................................
soc/mediatek: Register coreboot table for ATF
Register coreboot table into BL31 parameter so ATF can find coreboot information and use it (for example, use memory console).
BUG=None TEST=emerge-kukui coreboot; Boots on Kukui.
Change-Id: I6e39495988159608c1c4bbf16a97c86e526bd82b Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/soc/mediatek/common/bl31_plat_params.c 1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/32541/1
diff --git a/src/soc/mediatek/common/bl31_plat_params.c b/src/soc/mediatek/common/bl31_plat_params.c index eb7477a..51edab3 100644 --- a/src/soc/mediatek/common/bl31_plat_params.c +++ b/src/soc/mediatek/common/bl31_plat_params.c @@ -14,6 +14,7 @@ */
#include <arm_tf.h> +#include <cbmem.h> #include <soc/bl31_plat_params.h>
static struct bl31_plat_param *plat_params; @@ -26,5 +27,13 @@
void *soc_get_bl31_plat_params(bl31_params_t *bl31_params) { + static struct bl31_u64_param cbtable_param = { + .h = { .type = PARAM_COREBOOT_TABLE, }, + }; + if (!cbtable_param.value) { + cbtable_param.value = (uint64_t)cbmem_find(CBMEM_ID_CBTABLE); + if (cbtable_param.value) + register_bl31_param(&cbtable_param.h); + } return plat_params; }