2017-05-15 05:00:00 +01:00
|
|
|
/*
|
uniphier: make uniphier_mmap_setup() work with PIE
BL2_BASE, BL31_BASE, and BL32_BASE are defined in platform_def.h,
that is, determined at link-time.
On the other hand, BL2_END, BL31_END, and BL32_END are derived from
the symbols produced by the linker scripts. So, they are fixed-up
at run-time if ENABLE_PIE is enabled.
To make it work in a position-indepenent manner, use BL_CODE_BASE and
BL_END, both of which are relocatable.
Change-Id: Ic179a7c60eb64c5f3024b178690b3ac7cbd7521b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-01-17 04:46:38 +00:00
|
|
|
* Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
|
2017-05-15 05:00:00 +01:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
2020-02-03 10:45:16 +00:00
|
|
|
#include <errno.h>
|
|
|
|
|
2017-05-15 05:00:00 +01:00
|
|
|
#include <platform_def.h>
|
2018-12-14 00:18:21 +00:00
|
|
|
|
2019-01-25 13:28:38 +00:00
|
|
|
#include <common/bl_common.h>
|
2020-02-03 10:45:16 +00:00
|
|
|
#include <plat/common/platform.h>
|
2017-05-15 05:00:00 +01:00
|
|
|
|
|
|
|
#include "../uniphier.h"
|
|
|
|
|
2020-02-03 10:45:16 +00:00
|
|
|
static unsigned int uniphier_soc = UNIPHIER_SOC_UNKNOWN;
|
|
|
|
|
2017-05-15 05:00:00 +01:00
|
|
|
void tsp_early_platform_setup(void)
|
|
|
|
{
|
2020-02-03 10:45:16 +00:00
|
|
|
uniphier_soc = uniphier_get_soc_id();
|
|
|
|
if (uniphier_soc == UNIPHIER_SOC_UNKNOWN)
|
|
|
|
plat_error_handler(-ENOTSUP);
|
|
|
|
|
|
|
|
uniphier_console_setup(uniphier_soc);
|
2017-05-15 05:00:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void tsp_platform_setup(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void tsp_plat_arch_setup(void)
|
|
|
|
{
|
2020-02-03 10:46:15 +00:00
|
|
|
uniphier_mmap_setup(uniphier_soc);
|
2017-05-15 05:00:00 +01:00
|
|
|
}
|