blob: 3c93305170d21c5e29a03bd3aa742bd3985085d2 [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();
Stephan Gerhold1b783462022-09-16 20:42:49 +020030 msm8916_configure_early();
Stephan Gerholdb68e4e92022-08-28 15:18:55 +020031}
32
33void sp_min_plat_arch_setup(void)
34{
35 msm8916_plat_arch_setup(BL32_BASE, BL32_END - BL32_BASE);
36 enable_mmu_svc_mon(0);
37}
38
39void sp_min_platform_setup(void)
40{
41 INFO("SP_MIN: Platform setup start\n");
42 msm8916_platform_setup();
43 msm8916_configure();
44 INFO("SP_MIN: Platform setup done\n");
45}
46
47entry_point_info_t *sp_min_plat_get_bl33_ep_info(void)
48{
49 return &image_ep_info.bl33;
50}