Tristan Hsieh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31604
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
mediatek: Pass board specific message to BL31
Sometimes we need to pass board specific messages to BL31, so that BL31 can do board specific operation based on common code.
BUG=b:80501386 BRANCH=none TEST=emerge-kukui coreboot
Change-Id: I60b09423d479b356ac5c04517906042fc8d512ca Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com --- A src/soc/mediatek/common/bl31_plat_params.c A src/soc/mediatek/common/include/soc/bl31_plat_params.h M src/soc/mediatek/mt8183/Makefile.inc 3 files changed, 54 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/31604/1
diff --git a/src/soc/mediatek/common/bl31_plat_params.c b/src/soc/mediatek/common/bl31_plat_params.c new file mode 100644 index 0000000..eb7477a --- /dev/null +++ b/src/soc/mediatek/common/bl31_plat_params.c @@ -0,0 +1,30 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 MediaTek Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <arm_tf.h> +#include <soc/bl31_plat_params.h> + +static struct bl31_plat_param *plat_params; + +void register_bl31_param(struct bl31_plat_param *param) +{ + param->next = plat_params; + plat_params = param; +} + +void *soc_get_bl31_plat_params(bl31_params_t *bl31_params) +{ + return plat_params; +} diff --git a/src/soc/mediatek/common/include/soc/bl31_plat_params.h b/src/soc/mediatek/common/include/soc/bl31_plat_params.h new file mode 100644 index 0000000..399b0d5 --- /dev/null +++ b/src/soc/mediatek/common/include/soc/bl31_plat_params.h @@ -0,0 +1,23 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 MediaTek Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __BL31_PLAT_PARAMS_H__ +#define __BL31_PLAT_PARAMS_H__ + +#include <arm-trusted-firmware/plat/mediatek/common/plat_params.h> + +void register_bl31_param(struct bl31_plat_param *param); + +#endif diff --git a/src/soc/mediatek/mt8183/Makefile.inc b/src/soc/mediatek/mt8183/Makefile.inc index 8af3d68..fc2bbe2 100644 --- a/src/soc/mediatek/mt8183/Makefile.inc +++ b/src/soc/mediatek/mt8183/Makefile.inc @@ -50,6 +50,7 @@ ramstage-y += ../common/usb.c ramstage-y += ../common/wdt.c
+ramstage-y += ../common/bl31_plat_params.c BL31_MAKEARGS += PLAT=mt8183
CPPFLAGS_common += -Isrc/soc/mediatek/mt8183/include
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/common/include/soc/... File src/soc/mediatek/common/include/soc/bl31_plat_params.h:
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/common/include/soc/... PS1, Line 19: #include <arm-trusted-firmware/plat/mediatek/common/plat_params.h> When I run 'emerge-kukui coreboot' under ChromiumOS chroot with this patch, I'll see "src/soc/mediatek/common/include/soc/bl31_plat_params.h:19:10: fatal error: arm-trusted-firmware/plat/mediatek/common/plat_params.h: No such file or directory".
Should we manually declare 'struct bl31_plat_param' in this file? (soc/cavium/cn81xx does in this way)
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/common/include/soc/... File src/soc/mediatek/common/include/soc/bl31_plat_params.h:
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/common/include/soc/... PS1, Line 19: #include <arm-trusted-firmware/plat/mediatek/common/plat_params.h>
When I run 'emerge-kukui coreboot' under ChromiumOS chroot with this patch, […]
You must update the arm-trusted-firmware submodule pointer first. The reason it'S done on cavium is that the BL31 is not part of arm-trusted-firmware, but the blobs submodule.
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/common/include/soc/... File src/soc/mediatek/common/include/soc/bl31_plat_params.h:
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/common/include/soc/... PS1, Line 19: #include <arm-trusted-firmware/plat/mediatek/common/plat_params.h>
You must update the arm-trusted-firmware submodule pointer first. […]
Thanks for the explanation. After pulling mediatek's latest ATF source code, emerge is happy now.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/mt8183/Makefile.inc File src/soc/mediatek/mt8183/Makefile.inc:
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/mt8183/Makefile.inc... PS1, Line 53: ramstage-y += ../common/bl31_plat_params.c ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += bl31_plat_params.c
Hung-Te Lin has uploaded a new patch set (#2) to the change originally created by Tristan Hsieh. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
mediatek: Pass board specific message to BL31
Sometimes we need to pass board specific messages to BL31, so that BL31 can do board specific operation based on common code.
BUG=b:80501386 BRANCH=none TEST=emerge-kukui coreboot
Change-Id: I60b09423d479b356ac5c04517906042fc8d512ca Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com --- A src/soc/mediatek/common/bl31_plat_params.c A src/soc/mediatek/common/include/soc/bl31_plat_params.h M src/soc/mediatek/mt8183/Makefile.inc 3 files changed, 54 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/31604/2
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Patch Set 2: Code-Review+2
Patch needs to wait until TF patches land and submodule is uprevved, of course, but LGTM.
Hello Julius Werner, You-Cheng Syu, Hung-Te Lin, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31604
to look at the new patch set (#3).
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
mediatek: Pass board specific message to BL31
Sometimes we need to pass board specific messages to BL31, so that BL31 can do board specific operation based on common code.
BUG=b:80501386 BRANCH=none TEST=emerge-kukui coreboot
Change-Id: I60b09423d479b356ac5c04517906042fc8d512ca Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com --- A src/soc/mediatek/common/bl31_plat_params.c A src/soc/mediatek/common/include/soc/bl31_plat_params.h M src/soc/mediatek/mt8183/Makefile.inc 3 files changed, 54 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/31604/3
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Patch Set 5: Code-Review+2
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/mt8183/Makefile.inc File src/soc/mediatek/mt8183/Makefile.inc:
https://review.coreboot.org/#/c/31604/1/src/soc/mediatek/mt8183/Makefile.inc... PS1, Line 53: ramstage-y += ../common/bl31_plat_params.c
ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += bl31_plat_params. […]
Done
jitao shi has uploaded a new patch set (#7) to the change originally created by Tristan Hsieh. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
mediatek: Pass board specific message to BL31
Sometimes we need to pass board specific messages to BL31, so that BL31 can do board specific operation based on common code.
BUG=b:80501386 BRANCH=none TEST=emerge-kukui coreboot
Change-Id: I60b09423d479b356ac5c04517906042fc8d512ca Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com --- A src/soc/mediatek/common/bl31_plat_params.c A src/soc/mediatek/common/include/soc/bl31_plat_params.h M src/soc/mediatek/mt8183/Makefile.inc 3 files changed, 54 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/31604/7
Tristan Hsieh has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31604 )
Change subject: mediatek: Pass board specific message to BL31 ......................................................................
Abandoned
no longer needed since jwerner's new version.