blob: 78ab0c7ed472f9b5e1fc89067525ccd89a6b36d8 [file] [log] [blame]
Stephan Gerholdb68e4e92022-08-28 15:18:55 +02001/*
2 * Copyright (c) 2022-2023, Stephan Gerhold <stephan@gerhold.net>
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arch.h>
8#include <common/debug.h>
9#include <lib/xlat_tables/xlat_mmu_helpers.h>
10#include <platform_sp_min.h>
11
12#include "../msm8916_config.h"
13#include "../msm8916_setup.h"
14
15static struct {
16 entry_point_info_t bl33;
17} image_ep_info = {
18 /* BL33 entry point */
19 SET_STATIC_PARAM_HEAD(bl33, PARAM_EP, VERSION_1,
20 entry_point_info_t, NON_SECURE),
21 .bl33.pc = PRELOADED_BL33_BASE,
22 .bl33.spsr = SPSR_MODE32(MODE32_hyp, SPSR_T_ARM, SPSR_E_LITTLE,
23 DISABLE_ALL_EXCEPTIONS),
24};
25
26void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
27 u_register_t arg2, u_register_t arg3)
28{
29 msm8916_early_platform_setup();
30}
31
32void sp_min_plat_arch_setup(void)
33{
34 msm8916_plat_arch_setup(BL32_BASE, BL32_END - BL32_BASE);
35 enable_mmu_svc_mon(0);
36}
37
38void sp_min_platform_setup(void)
39{
40 INFO("SP_MIN: Platform setup start\n");
41 msm8916_platform_setup();
42 msm8916_configure();
43 INFO("SP_MIN: Platform setup done\n");
44}
45
46entry_point_info_t *sp_min_plat_get_bl33_ep_info(void)
47{
48 return &image_ep_info.bl33;
49}