diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-05-15 13:00:00 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-13 00:32:57 +0900 |
commit | 63b3a28ebbe9f0de6f68e5567b65cb7a7857b8a4 (patch) | |
tree | 82dc2da2c1be311a87e9c443bd05a9a90ad0c00f | |
parent | d8e919c7b81a2739300912d6edbd3f929a136dbf (diff) | |
download | platform_external_arm-trusted-firmware-63b3a28ebbe9f0de6f68e5567b65cb7a7857b8a4.tar.gz platform_external_arm-trusted-firmware-63b3a28ebbe9f0de6f68e5567b65cb7a7857b8a4.tar.bz2 platform_external_arm-trusted-firmware-63b3a28ebbe9f0de6f68e5567b65cb7a7857b8a4.zip |
uniphier: add TSP support
Add TSP to test BL32 without relying on external projects.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r-- | docs/plat/socionext-uniphier.md | 7 | ||||
-rw-r--r-- | plat/socionext/uniphier/include/platform_def.h | 5 | ||||
-rw-r--r-- | plat/socionext/uniphier/tsp/tsp-uniphier.mk | 9 | ||||
-rw-r--r-- | plat/socionext/uniphier/tsp/uniphier_tsp_setup.c | 28 |
4 files changed, 49 insertions, 0 deletions
diff --git a/docs/plat/socionext-uniphier.md b/docs/plat/socionext-uniphier.md index 75e654524..91d72ec06 100644 --- a/docs/plat/socionext-uniphier.md +++ b/docs/plat/socionext-uniphier.md @@ -121,3 +121,10 @@ To enable BL32, add the following option to the build command: ``` SPD=<spd> BL32=<path-to-BL32> ``` + +If you use TSP for BL32, `BL32=<path-to-BL32>` is not required. Just add the +following: + +``` + SPD=tspd +``` diff --git a/plat/socionext/uniphier/include/platform_def.h b/plat/socionext/uniphier/include/platform_def.h index 7e603a3e5..b5dc16aa9 100644 --- a/plat/socionext/uniphier/include/platform_def.h +++ b/plat/socionext/uniphier/include/platform_def.h @@ -61,4 +61,9 @@ #define MAX_IO_DEVICES 2 #define MAX_IO_BLOCK_DEVICES 1 +#define TSP_SEC_MEM_BASE (BL32_BASE) +#define TSP_SEC_MEM_SIZE ((BL32_LIMIT) - (BL32_BASE)) +#define TSP_PROGBITS_LIMIT (UNIPHIER_BLOCK_BUF_BASE) +#define TSP_IRQ_SEC_PHY_TIMER 29 + #endif /* __PLATFORM_DEF_H__ */ diff --git a/plat/socionext/uniphier/tsp/tsp-uniphier.mk b/plat/socionext/uniphier/tsp/tsp-uniphier.mk new file mode 100644 index 000000000..54d4f513a --- /dev/null +++ b/plat/socionext/uniphier/tsp/tsp-uniphier.mk @@ -0,0 +1,9 @@ +# +# Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +BL32_SOURCES += plat/common/plat_gicv3.c \ + plat/common/aarch64/platform_mp_stack.S \ + $(PLAT_PATH)/tsp/uniphier_tsp_setup.c diff --git a/plat/socionext/uniphier/tsp/uniphier_tsp_setup.c b/plat/socionext/uniphier/tsp/uniphier_tsp_setup.c new file mode 100644 index 000000000..7df17d3cd --- /dev/null +++ b/plat/socionext/uniphier/tsp/uniphier_tsp_setup.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <platform_def.h> +#include <xlat_mmu_helpers.h> + +#include "../uniphier.h" + +#define BL32_END (unsigned long)(&__BL32_END__) +#define BL32_SIZE ((BL32_END) - (BL32_BASE)) + +void tsp_early_platform_setup(void) +{ + uniphier_console_setup(); +} + +void tsp_platform_setup(void) +{ +} + +void tsp_plat_arch_setup(void) +{ + uniphier_mmap_setup(BL32_BASE, BL32_SIZE, NULL); + enable_mmu_el1(0); +} |