From 53d6d84c3ff33973ca82ed0241cb5967dfc92991 Mon Sep 17 00:00:00 2001 From: Xing Zheng Date: Tue, 6 Dec 2016 17:12:21 +0800 Subject: rockchip/rk3399: soc: resize reserve memory Reserve the whole TZRAM area because it will be marked as secure-only by BL31 and can not be accessed by the non-secure kernel. CQ-DEPEND=CL:452659 BUG=chrome-os-partner:57361 BRANCH=firmware-gru-8785.B TEST=the reserve memory is resized Change-Id: Ie3ab39598f3f7cb96feb0c574e230e7fcb53a1a4 Signed-off-by: Patrick Georgi Original-Commit-Id: f34d254e1dfc9ae95a784aba22503e75a2fa65f1 Original-Change-Id: I39c4cb530f41a7b0f7f3064125072dd85b62276f Original-Signed-off-by: Xing Zheng Original-Reviewed-on: https://chromium-review.googlesource.com/418102 Original-Reviewed-by: Julius Werner Original-(cherry picked from commit ea9fe064a9b1e1ce81fca74f829a0fb6e78ce426) Original-Reviewed-on: https://chromium-review.googlesource.com/452640 Original-Tested-by: Julius Werner Original-Commit-Queue: Julius Werner Reviewed-on: https://review.coreboot.org/19431 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/soc/rockchip/rk3399/soc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/soc') diff --git a/src/soc/rockchip/rk3399/soc.c b/src/soc/rockchip/rk3399/soc.c index 4418a27a25..37de652983 100644 --- a/src/soc/rockchip/rk3399/soc.c +++ b/src/soc/rockchip/rk3399/soc.c @@ -25,6 +25,7 @@ #include #include #include +#include static void soc_read_resources(device_t dev) { @@ -33,10 +34,11 @@ static void soc_read_resources(device_t dev) static void soc_init(device_t dev) { - /* reserve bl31 image, which define in - * arm-trusted-firmware/plat/rockchip/rk3399/include/platform_def.h + /* + * Reserve the whole TZRAM area because it will be marked as secure-only + * by BL31 and can not be accessed by the non-secure kernel. */ - mmio_resource(dev, 1, (0x10000 / KiB), (0x80000 / KiB)); + mmio_resource(dev, 1, (TZRAM_BASE / KiB), (TZRAM_SIZE / KiB)); if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) && display_init_required()) rk_display_init(dev); -- cgit v1.2.3