Stephan Gerhold | b68e4e9 | 2022-08-28 15:18:55 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
| 15 | static 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 | |
| 26 | void 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 Gerhold | 1b78346 | 2022-09-16 20:42:49 +0200 | [diff] [blame] | 30 | msm8916_configure_early(); |
Stephan Gerhold | b68e4e9 | 2022-08-28 15:18:55 +0200 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | void 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 | |
| 39 | void 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 | |
| 47 | entry_point_info_t *sp_min_plat_get_bl33_ep_info(void) |
| 48 | { |
| 49 | return &image_ep_info.bl33; |
| 50 | } |