1d8e919c7SMasahiro Yamada /* 2b5dd85f2SMasahiro Yamada * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved. 3d8e919c7SMasahiro Yamada * 4d8e919c7SMasahiro Yamada * SPDX-License-Identifier: BSD-3-Clause 5d8e919c7SMasahiro Yamada */ 6d8e919c7SMasahiro Yamada 71083b2b3SAntonio Nino Diaz #ifndef PLATFORM_DEF_H 81083b2b3SAntonio Nino Diaz #define PLATFORM_DEF_H 9d8e919c7SMasahiro Yamada 1009d40e0eSAntonio Nino Diaz #include <common/tbbr/tbbr_img_def.h> 1109d40e0eSAntonio Nino Diaz #include <lib/utils_def.h> 1209d40e0eSAntonio Nino Diaz #include <plat/common/common_def.h> 13d8e919c7SMasahiro Yamada 14d8e919c7SMasahiro Yamada #define PLATFORM_STACK_SIZE 0x1000 15d8e919c7SMasahiro Yamada 16d8e919c7SMasahiro Yamada #define CACHE_WRITEBACK_SHIFT 6 17d8e919c7SMasahiro Yamada #define CACHE_WRITEBACK_GRANULE (1 << (CACHE_WRITEBACK_SHIFT)) 18d8e919c7SMasahiro Yamada 19d8e919c7SMasahiro Yamada /* topology */ 2050dae22eSDeepika Bhavnani #define UNIPHIER_MAX_CPUS_PER_CLUSTER U(4) 2150dae22eSDeepika Bhavnani #define UNIPHIER_CLUSTER_COUNT U(2) 22d8e919c7SMasahiro Yamada 23d8e919c7SMasahiro Yamada #define PLATFORM_CORE_COUNT \ 24d8e919c7SMasahiro Yamada ((UNIPHIER_MAX_CPUS_PER_CLUSTER) * (UNIPHIER_CLUSTER_COUNT)) 25d8e919c7SMasahiro Yamada 261083b2b3SAntonio Nino Diaz #define PLAT_MAX_PWR_LVL U(1) 27d8e919c7SMasahiro Yamada 281083b2b3SAntonio Nino Diaz #define PLAT_MAX_OFF_STATE U(2) 291083b2b3SAntonio Nino Diaz #define PLAT_MAX_RET_STATE U(1) 30d8e919c7SMasahiro Yamada 31*7af21317SMasahiro Yamada #define UNIPHIER_BL2_OFFSET UL(0x00000000) 32*7af21317SMasahiro Yamada #define UNIPHIER_BL2_MAX_SIZE UL(0x00080000) 337e51ca8dSMasahiro Yamada 34*7af21317SMasahiro Yamada /* 0x00080000-0x01000000: reserved for DSP */ 357e51ca8dSMasahiro Yamada 36*7af21317SMasahiro Yamada #define UNIPHIER_BL31_OFFSET UL(0x01000000) 37*7af21317SMasahiro Yamada #define UNIPHIER_BL31_MAX_SIZE UL(0x00080000) 38d8e919c7SMasahiro Yamada 39*7af21317SMasahiro Yamada #define UNIPHIER_BL32_OFFSET UL(0x01080000) 40*7af21317SMasahiro Yamada #define UNIPHIER_BL32_MAX_SIZE UL(0x00100000) 41*7af21317SMasahiro Yamada 42*7af21317SMasahiro Yamada /* 43*7af21317SMasahiro Yamada * The link addresses are determined by UNIPHIER_MEM_BASE + offset. 44*7af21317SMasahiro Yamada * When ENABLE_PIE is set, all the TF images can be loaded anywhere, so 45*7af21317SMasahiro Yamada * UNIPHIER_MEM_BASE is arbitrary. 46*7af21317SMasahiro Yamada * 47*7af21317SMasahiro Yamada * When ENABLE_PIE is unset, UNIPHIER_MEM_BASE should be chosen so that 48*7af21317SMasahiro Yamada * BL2_BASE matches to the physical address where BL2 is loaded, that is, 49*7af21317SMasahiro Yamada * UNIPHIER_MEM_BASE should be the base address of the DRAM region. 50*7af21317SMasahiro Yamada */ 51*7af21317SMasahiro Yamada #define UNIPHIER_MEM_BASE UL(0x00000000) 52*7af21317SMasahiro Yamada 53*7af21317SMasahiro Yamada #define BL2_BASE (UNIPHIER_MEM_BASE + UNIPHIER_BL2_OFFSET) 54*7af21317SMasahiro Yamada #define BL2_LIMIT (BL2_BASE + UNIPHIER_BL2_MAX_SIZE) 55*7af21317SMasahiro Yamada 56*7af21317SMasahiro Yamada #define BL31_BASE (UNIPHIER_MEM_BASE + UNIPHIER_BL31_OFFSET) 57*7af21317SMasahiro Yamada #define BL31_LIMIT (BL31_BASE + UNIPHIER_BL31_MAX_SIZE) 58*7af21317SMasahiro Yamada 59*7af21317SMasahiro Yamada #define BL32_BASE (UNIPHIER_MEM_BASE + UNIPHIER_BL32_OFFSET) 60*7af21317SMasahiro Yamada #define BL32_LIMIT (BL32_BASE + UNIPHIER_BL32_MAX_SIZE) 61d8e919c7SMasahiro Yamada 62d8e919c7SMasahiro Yamada #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) 63d8e919c7SMasahiro Yamada #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) 64d8e919c7SMasahiro Yamada 65b5dd85f2SMasahiro Yamada #define MAX_XLAT_TABLES 9 66b5dd85f2SMasahiro Yamada #define MAX_MMAP_REGIONS 13 67d8e919c7SMasahiro Yamada 68d8e919c7SMasahiro Yamada #define MAX_IO_HANDLES 2 69d8e919c7SMasahiro Yamada #define MAX_IO_DEVICES 2 70b7c6529cSYann Gautier #define MAX_IO_BLOCK_DEVICES U(1) 71d8e919c7SMasahiro Yamada 7263b3a28eSMasahiro Yamada #define TSP_SEC_MEM_BASE (BL32_BASE) 7363b3a28eSMasahiro Yamada #define TSP_SEC_MEM_SIZE ((BL32_LIMIT) - (BL32_BASE)) 7463b3a28eSMasahiro Yamada #define TSP_IRQ_SEC_PHY_TIMER 29 7563b3a28eSMasahiro Yamada 761083b2b3SAntonio Nino Diaz #endif /* PLATFORM_DEF_H */ 77