[coreboot-gerrit] Patch set updated for coreboot: mediatek/mt8173: Add soc ARM Trusted Firmware support

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Jan 21 18:05:54 CET 2016


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13100

-gerrit

commit a1fe57ec7a443b9b1059948f117679a9bc9c6482
Author: Jimmy Huang <jimmy.huang at mediatek.com>
Date:   Fri Jul 31 17:11:00 2015 +0800

    mediatek/mt8173: Add soc ARM Trusted Firmware support
    
    We define a mechanism to pass board specific parameters to BL31. The
    idea is BL31 doesn't need to have the board revision knowledge, it
    only needs to process the board specific parameters to initialize and
    control specific hardware. In this way, we can support different boards
    with same BL31 binary.
    
    BRANCH=none
    BUG=none
    TEST=booted on oak-rev2 and oak-rev3 boards, and confirmed they got
         different board arguments in ARM TF
    
    Change-Id: I9ea3ce6c8f79dd427be67f30bc940d2038173b81
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 0f9a4a2776110c5ddc113f0d605d4337d5773ace
    Original-Change-Id: I985d9555238f5ac5385e126479140b772b36bac8
    Original-Signed-off-by: Jimmy Huang <jimmy.huang at mediatek.com>
    Original-Reviewed-on: https://chromium-review.googlesource.com/292678
    Original-Commit-Ready: Yidi Lin <yidi.lin at mediatek.com>
    Original-Tested-by: Yidi Lin <yidi.lin at mediatek.com>
    Original-Reviewed-by: Julius Werner <jwerner at chromium.org>
---
 src/soc/mediatek/mt8173/Kconfig                    |  1 +
 src/soc/mediatek/mt8173/Makefile.inc               |  5 ++++
 src/soc/mediatek/mt8173/bl31_plat_params.c         | 30 ++++++++++++++++++++++
 .../mediatek/mt8173/include/soc/bl31_plat_params.h | 24 +++++++++++++++++
 4 files changed, 60 insertions(+)

diff --git a/src/soc/mediatek/mt8173/Kconfig b/src/soc/mediatek/mt8173/Kconfig
index ec192e5..5acee6e 100644
--- a/src/soc/mediatek/mt8173/Kconfig
+++ b/src/soc/mediatek/mt8173/Kconfig
@@ -11,6 +11,7 @@ config SOC_MEDIATEK_MT8173
 	select SPI_ATOMIC_SEQUENCING if SPI_FLASH
 	select HAVE_MONOTONIC_TIMER
 	select GENERIC_UDELAY
+	select ARM64_USE_ARM_TRUSTED_FIRMWARE
 	select HAS_PRECBMEM_TIMESTAMP_REGION
 	select GENERIC_GPIO_LIB
 	select HAVE_HARD_RESET
diff --git a/src/soc/mediatek/mt8173/Makefile.inc b/src/soc/mediatek/mt8173/Makefile.inc
index e23ccb9..b35e1f6 100644
--- a/src/soc/mediatek/mt8173/Makefile.inc
+++ b/src/soc/mediatek/mt8173/Makefile.inc
@@ -73,6 +73,11 @@ ramstage-y += rtc.c
 
 ramstage-y += usb.c
 
+ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += bl31_plat_params.c
+
+BL31_MAKEARGS += PLAT=mt8173 MEDIATEK_MEM_CONFIG=SRAM_192K MEDIATEK_DA9212=1 \
+		 MEDIATEK_MT6311=1
+
 ################################################################################
 
 # Generate the actual coreboot bootblock code
diff --git a/src/soc/mediatek/mt8173/bl31_plat_params.c b/src/soc/mediatek/mt8173/bl31_plat_params.c
new file mode 100644
index 0000000..025c202
--- /dev/null
+++ b/src/soc/mediatek/mt8173/bl31_plat_params.c
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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 <assert.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 = (void *)plat_params;
+	plat_params = param;
+}
+
+void *soc_get_bl31_plat_params(bl31_params_t *bl31_params)
+{
+	return (void *)plat_params;
+}
diff --git a/src/soc/mediatek/mt8173/include/soc/bl31_plat_params.h b/src/soc/mediatek/mt8173/include/soc/bl31_plat_params.h
new file mode 100644
index 0000000..c1ea885
--- /dev/null
+++ b/src/soc/mediatek/mt8173/include/soc/bl31_plat_params.h
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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__
+
+#if IS_ENABLED(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE)
+#include <arm-trusted-firmware/plat/mediatek/mt8173/include/plat_params.h>
+
+void register_bl31_param(struct bl31_plat_param *param);
+#endif
+
+#endif /* __BL31_PLAT_PARAMS_H__ */



More information about the coreboot-gerrit mailing list