From e0eea337b32e37bbef9bad1310b96b9c0d86f7b9 Mon Sep 17 00:00:00 2001 From: Arthur Cassegrain Date: Fri, 26 Nov 2021 16:34:36 +0100 Subject: [PATCH] feat(hikey960): increase secure workspace to 64MB Common TEE use cases require 64 MB these days, and not just 16 MB. This in turn requires more XLAT tables to be pre-allocated for BL31. Change-Id: I85c4033da64785f3e3272b0e9a4da4bceb20fcc7 Signed-off-by: vallau01 Signed-off-by: Lukas Hanel --- plat/hisilicon/hikey960/hikey960_def.h | 8 ++++---- plat/hisilicon/hikey960/include/platform_def.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plat/hisilicon/hikey960/hikey960_def.h b/plat/hisilicon/hikey960/hikey960_def.h index 9651d7891..060ca4f9c 100644 --- a/plat/hisilicon/hikey960/hikey960_def.h +++ b/plat/hisilicon/hikey960/hikey960_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -21,14 +21,14 @@ #define HIKEY960_DRAM_ID 1 /* - * DDR for OP-TEE (32MB from 0x3E00000-0x3FFFFFFF) is divided in several + * DDR for TEE (80MB from 0x3E00000-0x42FFFFFF) is divided into several * regions: - * - Secure DDR (default is the top 16MB) used by OP-TEE + * - Secure DDR (default is the top 64MB) used by OP-TEE * - Non-secure DDR used by OP-TEE (shared memory and padding) (4MB) * - Secure DDR (4MB aligned on 4MB) for OP-TEE's "Secure Data Path" feature * - Non-secure DDR (8MB) reserved for OP-TEE's future use */ -#define DDR_SEC_SIZE 0x01000000 +#define DDR_SEC_SIZE 0x04000000 /* reserve 64MB secure memory */ #define DDR_SEC_BASE 0x3F000000 #define DDR_SDP_SIZE 0x00400000 diff --git a/plat/hisilicon/hikey960/include/platform_def.h b/plat/hisilicon/hikey960/include/platform_def.h index 48d4103ba..3288f5e9a 100644 --- a/plat/hisilicon/hikey960/include/platform_def.h +++ b/plat/hisilicon/hikey960/include/platform_def.h @@ -117,11 +117,11 @@ #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 36) #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 36) -#if defined(IMAGE_BL1) || defined(IMAGE_BL31) || defined(IMAGE_BL32) +#if defined(IMAGE_BL1) || defined(IMAGE_BL32) #define MAX_XLAT_TABLES 3 #endif -#ifdef IMAGE_BL2 +#if defined(IMAGE_BL2) || defined(IMAGE_BL31) #define MAX_XLAT_TABLES 4 #endif -- 2.39.5