Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 1 | /* |
Yann Gautier | a45433b | 2019-01-16 18:31:00 +0100 | [diff] [blame] | 2 | * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 7 | #include <assert.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | #include <string.h> |
| 9 | |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 10 | #include <platform_def.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 11 | |
| 12 | #include <arch_helpers.h> |
| 13 | #include <common/bl_common.h> |
| 14 | #include <common/debug.h> |
| 15 | #include <common/desc_image_load.h> |
| 16 | #include <drivers/delay_timer.h> |
| 17 | #include <drivers/generic_delay_timer.h> |
| 18 | #include <drivers/st/stm32_console.h> |
Yann Gautier | a45433b | 2019-01-16 18:31:00 +0100 | [diff] [blame] | 19 | #include <drivers/st/stm32mp_pmic.h> |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 20 | #include <drivers/st/stm32mp_reset.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 21 | #include <drivers/st/stm32mp1_clk.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 22 | #include <drivers/st/stm32mp1_pwr.h> |
| 23 | #include <drivers/st/stm32mp1_ram.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 24 | #include <lib/mmio.h> |
Yann Gautier | b3386f7 | 2019-04-19 09:41:01 +0200 | [diff] [blame] | 25 | #include <lib/optee_utils.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 26 | #include <lib/xlat_tables/xlat_tables_v2.h> |
| 27 | #include <plat/common/platform.h> |
| 28 | |
Yann Gautier | 8593e44 | 2018-11-14 18:46:15 +0100 | [diff] [blame] | 29 | #include <stm32mp1_context.h> |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 30 | |
Yann Gautier | 8593e44 | 2018-11-14 18:46:15 +0100 | [diff] [blame] | 31 | static struct console_stm32 console; |
| 32 | |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 33 | static void print_reset_reason(void) |
| 34 | { |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 35 | uint32_t rstsr = mmio_read_32(stm32mp_rcc_base() + RCC_MP_RSTSCLRR); |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 36 | |
| 37 | if (rstsr == 0U) { |
| 38 | WARN("Reset reason unknown\n"); |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | INFO("Reset reason (0x%x):\n", rstsr); |
| 43 | |
| 44 | if ((rstsr & RCC_MP_RSTSCLRR_PADRSTF) == 0U) { |
| 45 | if ((rstsr & RCC_MP_RSTSCLRR_STDBYRSTF) != 0U) { |
| 46 | INFO("System exits from STANDBY\n"); |
| 47 | return; |
| 48 | } |
| 49 | |
| 50 | if ((rstsr & RCC_MP_RSTSCLRR_CSTDBYRSTF) != 0U) { |
| 51 | INFO("MPU exits from CSTANDBY\n"); |
| 52 | return; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | if ((rstsr & RCC_MP_RSTSCLRR_PORRSTF) != 0U) { |
| 57 | INFO(" Power-on Reset (rst_por)\n"); |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | if ((rstsr & RCC_MP_RSTSCLRR_BORRSTF) != 0U) { |
| 62 | INFO(" Brownout Reset (rst_bor)\n"); |
| 63 | return; |
| 64 | } |
| 65 | |
| 66 | if ((rstsr & RCC_MP_RSTSCLRR_MCSYSRSTF) != 0U) { |
| 67 | if ((rstsr & RCC_MP_RSTSCLRR_PADRSTF) != 0U) { |
| 68 | INFO(" System reset generated by MCU (MCSYSRST)\n"); |
| 69 | } else { |
| 70 | INFO(" Local reset generated by MCU (MCSYSRST)\n"); |
| 71 | } |
| 72 | return; |
| 73 | } |
| 74 | |
| 75 | if ((rstsr & RCC_MP_RSTSCLRR_MPSYSRSTF) != 0U) { |
| 76 | INFO(" System reset generated by MPU (MPSYSRST)\n"); |
| 77 | return; |
| 78 | } |
| 79 | |
| 80 | if ((rstsr & RCC_MP_RSTSCLRR_HCSSRSTF) != 0U) { |
| 81 | INFO(" Reset due to a clock failure on HSE\n"); |
| 82 | return; |
| 83 | } |
| 84 | |
| 85 | if ((rstsr & RCC_MP_RSTSCLRR_IWDG1RSTF) != 0U) { |
| 86 | INFO(" IWDG1 Reset (rst_iwdg1)\n"); |
| 87 | return; |
| 88 | } |
| 89 | |
| 90 | if ((rstsr & RCC_MP_RSTSCLRR_IWDG2RSTF) != 0U) { |
| 91 | INFO(" IWDG2 Reset (rst_iwdg2)\n"); |
| 92 | return; |
| 93 | } |
| 94 | |
| 95 | if ((rstsr & RCC_MP_RSTSCLRR_MPUP0RSTF) != 0U) { |
| 96 | INFO(" MPU Processor 0 Reset\n"); |
| 97 | return; |
| 98 | } |
| 99 | |
| 100 | if ((rstsr & RCC_MP_RSTSCLRR_MPUP1RSTF) != 0U) { |
| 101 | INFO(" MPU Processor 1 Reset\n"); |
| 102 | return; |
| 103 | } |
| 104 | |
| 105 | if ((rstsr & RCC_MP_RSTSCLRR_PADRSTF) != 0U) { |
| 106 | INFO(" Pad Reset from NRST\n"); |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | if ((rstsr & RCC_MP_RSTSCLRR_VCORERSTF) != 0U) { |
| 111 | INFO(" Reset due to a failure of VDD_CORE\n"); |
| 112 | return; |
| 113 | } |
| 114 | |
| 115 | ERROR(" Unidentified reset reason\n"); |
| 116 | } |
| 117 | |
| 118 | void bl2_el3_early_platform_setup(u_register_t arg0, |
| 119 | u_register_t arg1 __unused, |
| 120 | u_register_t arg2 __unused, |
| 121 | u_register_t arg3 __unused) |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 122 | { |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 123 | stm32mp_save_boot_ctx_address(arg0); |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | void bl2_platform_setup(void) |
| 127 | { |
Yann Gautier | caf575b | 2018-07-24 17:18:19 +0200 | [diff] [blame] | 128 | int ret; |
| 129 | |
Yann Gautier | f3928f6 | 2019-02-14 11:15:03 +0100 | [diff] [blame] | 130 | if (dt_pmic_status() > 0) { |
Yann Gautier | bb836ee | 2018-07-16 17:55:07 +0200 | [diff] [blame] | 131 | initialize_pmic(); |
| 132 | } |
| 133 | |
Yann Gautier | caf575b | 2018-07-24 17:18:19 +0200 | [diff] [blame] | 134 | ret = stm32mp1_ddr_probe(); |
| 135 | if (ret < 0) { |
| 136 | ERROR("Invalid DDR init: error %d\n", ret); |
| 137 | panic(); |
| 138 | } |
| 139 | |
Yann Gautier | b3386f7 | 2019-04-19 09:41:01 +0200 | [diff] [blame] | 140 | #ifdef AARCH32_SP_OPTEE |
| 141 | INFO("BL2 runs OP-TEE setup\n"); |
| 142 | /* Initialize tzc400 after DDR initialization */ |
| 143 | stm32mp1_security_setup(); |
| 144 | #else |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 145 | INFO("BL2 runs SP_MIN setup\n"); |
Yann Gautier | b3386f7 | 2019-04-19 09:41:01 +0200 | [diff] [blame] | 146 | #endif |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 147 | } |
| 148 | |
| 149 | void bl2_el3_plat_arch_setup(void) |
| 150 | { |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 151 | int32_t result; |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 152 | struct dt_node_info dt_uart_info; |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 153 | const char *board_model; |
Yann Gautier | 4193466 | 2018-07-20 11:36:05 +0200 | [diff] [blame] | 154 | boot_api_context_t *boot_context = |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 155 | (boot_api_context_t *)stm32mp_get_boot_ctx_address(); |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 156 | uint32_t clk_rate; |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 157 | uintptr_t pwr_base; |
| 158 | uintptr_t rcc_base; |
Yann Gautier | 4193466 | 2018-07-20 11:36:05 +0200 | [diff] [blame] | 159 | |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 160 | mmap_add_region(BL_CODE_BASE, BL_CODE_BASE, |
| 161 | BL_CODE_END - BL_CODE_BASE, |
| 162 | MT_CODE | MT_SECURE); |
| 163 | |
Yann Gautier | b3386f7 | 2019-04-19 09:41:01 +0200 | [diff] [blame] | 164 | #ifdef AARCH32_SP_OPTEE |
| 165 | /* OP-TEE image needs post load processing: keep RAM read/write */ |
| 166 | mmap_add_region(STM32MP_DDR_BASE + dt_get_ddr_size() - |
| 167 | STM32MP_DDR_S_SIZE - STM32MP_DDR_SHMEM_SIZE, |
| 168 | STM32MP_DDR_BASE + dt_get_ddr_size() - |
| 169 | STM32MP_DDR_S_SIZE - STM32MP_DDR_SHMEM_SIZE, |
| 170 | STM32MP_DDR_S_SIZE, |
| 171 | MT_MEMORY | MT_RW | MT_SECURE); |
| 172 | |
| 173 | mmap_add_region(STM32MP_OPTEE_BASE, STM32MP_OPTEE_BASE, |
| 174 | STM32MP_OPTEE_SIZE, |
| 175 | MT_MEMORY | MT_RW | MT_SECURE); |
| 176 | #else |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 177 | /* Prevent corruption of preloaded BL32 */ |
| 178 | mmap_add_region(BL32_BASE, BL32_BASE, |
| 179 | BL32_LIMIT - BL32_BASE, |
| 180 | MT_MEMORY | MT_RO | MT_SECURE); |
| 181 | |
Yann Gautier | b3386f7 | 2019-04-19 09:41:01 +0200 | [diff] [blame] | 182 | #endif |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 183 | /* Map non secure DDR for BL33 load and DDR training area restore */ |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 184 | mmap_add_region(STM32MP_DDR_BASE, |
| 185 | STM32MP_DDR_BASE, |
| 186 | STM32MP_DDR_MAX_SIZE, |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 187 | MT_MEMORY | MT_RW | MT_NS); |
| 188 | |
| 189 | /* Prevent corruption of preloaded Device Tree */ |
| 190 | mmap_add_region(DTB_BASE, DTB_BASE, |
| 191 | DTB_LIMIT - DTB_BASE, |
| 192 | MT_MEMORY | MT_RO | MT_SECURE); |
| 193 | |
| 194 | configure_mmu(); |
| 195 | |
| 196 | if (dt_open_and_check() < 0) { |
| 197 | panic(); |
| 198 | } |
| 199 | |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 200 | pwr_base = stm32mp_pwr_base(); |
| 201 | rcc_base = stm32mp_rcc_base(); |
| 202 | |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 203 | /* |
| 204 | * Disable the backup domain write protection. |
| 205 | * The protection is enable at each reset by hardware |
| 206 | * and must be disabled by software. |
| 207 | */ |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 208 | mmio_setbits_32(pwr_base + PWR_CR1, PWR_CR1_DBP); |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 209 | |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 210 | while ((mmio_read_32(pwr_base + PWR_CR1) & PWR_CR1_DBP) == 0U) { |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 211 | ; |
| 212 | } |
| 213 | |
| 214 | /* Reset backup domain on cold boot cases */ |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 215 | if ((mmio_read_32(rcc_base + RCC_BDCR) & RCC_BDCR_RTCSRC_MASK) == 0U) { |
| 216 | mmio_setbits_32(rcc_base + RCC_BDCR, RCC_BDCR_VSWRST); |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 217 | |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 218 | while ((mmio_read_32(rcc_base + RCC_BDCR) & RCC_BDCR_VSWRST) == |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 219 | 0U) { |
| 220 | ; |
| 221 | } |
| 222 | |
Yann Gautier | 3d78a2e | 2019-02-14 11:01:20 +0100 | [diff] [blame] | 223 | mmio_clrbits_32(rcc_base + RCC_BDCR, RCC_BDCR_VSWRST); |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 224 | } |
| 225 | |
Yann Gautier | ed34232 | 2019-02-15 17:33:27 +0100 | [diff] [blame] | 226 | /* Disable MCKPROT */ |
| 227 | mmio_clrbits_32(rcc_base + RCC_TZCR, RCC_TZCR_MCKPROT); |
| 228 | |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 229 | generic_delay_timer_init(); |
| 230 | |
Yann Gautier | 9aea69e | 2018-07-24 17:13:36 +0200 | [diff] [blame] | 231 | if (stm32mp1_clk_probe() < 0) { |
| 232 | panic(); |
| 233 | } |
| 234 | |
| 235 | if (stm32mp1_clk_init() < 0) { |
| 236 | panic(); |
| 237 | } |
| 238 | |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 239 | result = dt_get_stdout_uart_info(&dt_uart_info); |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 240 | |
| 241 | if ((result <= 0) || |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 242 | (dt_uart_info.status == 0U) || |
| 243 | (dt_uart_info.clock < 0) || |
| 244 | (dt_uart_info.reset < 0)) { |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 245 | goto skip_console_init; |
| 246 | } |
| 247 | |
| 248 | if (dt_set_stdout_pinctrl() != 0) { |
| 249 | goto skip_console_init; |
| 250 | } |
| 251 | |
Yann Gautier | e4a3c35 | 2019-02-14 10:53:33 +0100 | [diff] [blame] | 252 | stm32mp_clk_enable((unsigned long)dt_uart_info.clock); |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 253 | |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 254 | stm32mp_reset_assert((uint32_t)dt_uart_info.reset); |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 255 | udelay(2); |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 256 | stm32mp_reset_deassert((uint32_t)dt_uart_info.reset); |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 257 | mdelay(1); |
| 258 | |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 259 | clk_rate = stm32mp_clk_get_rate((unsigned long)dt_uart_info.clock); |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 260 | |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 261 | if (console_stm32_register(dt_uart_info.base, clk_rate, |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 262 | STM32MP_UART_BAUDRATE, &console) == 0) { |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 263 | panic(); |
| 264 | } |
| 265 | |
| 266 | board_model = dt_get_board_model(); |
| 267 | if (board_model != NULL) { |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 268 | NOTICE("Model: %s\n", board_model); |
Yann Gautier | 69035a8 | 2018-07-05 16:48:16 +0200 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | skip_console_init: |
| 272 | |
Yann Gautier | 4193466 | 2018-07-20 11:36:05 +0200 | [diff] [blame] | 273 | if (stm32_save_boot_interface(boot_context->boot_interface_selected, |
| 274 | boot_context->boot_interface_instance) != |
| 275 | 0) { |
| 276 | ERROR("Cannot save boot interface\n"); |
| 277 | } |
| 278 | |
Yann Gautier | caf575b | 2018-07-24 17:18:19 +0200 | [diff] [blame] | 279 | stm32mp1_arch_security_setup(); |
| 280 | |
Yann Gautier | f9d40d5 | 2019-01-17 14:41:46 +0100 | [diff] [blame] | 281 | print_reset_reason(); |
| 282 | |
Yann Gautier | a2e2a30 | 2019-02-14 11:13:39 +0100 | [diff] [blame] | 283 | stm32mp_io_setup(); |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 284 | } |
Yann Gautier | b3386f7 | 2019-04-19 09:41:01 +0200 | [diff] [blame] | 285 | |
| 286 | #if defined(AARCH32_SP_OPTEE) |
| 287 | /******************************************************************************* |
| 288 | * This function can be used by the platforms to update/use image |
| 289 | * information for given `image_id`. |
| 290 | ******************************************************************************/ |
| 291 | int bl2_plat_handle_post_image_load(unsigned int image_id) |
| 292 | { |
| 293 | int err = 0; |
| 294 | bl_mem_params_node_t *bl_mem_params = get_bl_mem_params_node(image_id); |
| 295 | bl_mem_params_node_t *bl32_mem_params; |
| 296 | bl_mem_params_node_t *pager_mem_params; |
| 297 | bl_mem_params_node_t *paged_mem_params; |
| 298 | |
| 299 | assert(bl_mem_params != NULL); |
| 300 | |
| 301 | switch (image_id) { |
| 302 | case BL32_IMAGE_ID: |
| 303 | bl_mem_params->ep_info.pc = |
| 304 | bl_mem_params->image_info.image_base; |
| 305 | |
| 306 | pager_mem_params = get_bl_mem_params_node(BL32_EXTRA1_IMAGE_ID); |
| 307 | assert(pager_mem_params != NULL); |
| 308 | pager_mem_params->image_info.image_base = STM32MP_OPTEE_BASE; |
| 309 | pager_mem_params->image_info.image_max_size = |
| 310 | STM32MP_OPTEE_SIZE; |
| 311 | |
| 312 | paged_mem_params = get_bl_mem_params_node(BL32_EXTRA2_IMAGE_ID); |
| 313 | assert(paged_mem_params != NULL); |
| 314 | paged_mem_params->image_info.image_base = STM32MP_DDR_BASE + |
| 315 | (dt_get_ddr_size() - STM32MP_DDR_S_SIZE - |
| 316 | STM32MP_DDR_SHMEM_SIZE); |
| 317 | paged_mem_params->image_info.image_max_size = |
| 318 | STM32MP_DDR_S_SIZE; |
| 319 | |
| 320 | err = parse_optee_header(&bl_mem_params->ep_info, |
| 321 | &pager_mem_params->image_info, |
| 322 | &paged_mem_params->image_info); |
| 323 | if (err) { |
| 324 | ERROR("OPTEE header parse error.\n"); |
| 325 | panic(); |
| 326 | } |
| 327 | |
| 328 | /* Set optee boot info from parsed header data */ |
| 329 | bl_mem_params->ep_info.pc = |
| 330 | pager_mem_params->image_info.image_base; |
| 331 | bl_mem_params->ep_info.args.arg0 = |
| 332 | paged_mem_params->image_info.image_base; |
| 333 | bl_mem_params->ep_info.args.arg1 = 0; /* Unused */ |
| 334 | bl_mem_params->ep_info.args.arg2 = 0; /* No DT supported */ |
| 335 | break; |
| 336 | |
| 337 | case BL33_IMAGE_ID: |
| 338 | bl32_mem_params = get_bl_mem_params_node(BL32_IMAGE_ID); |
| 339 | assert(bl32_mem_params != NULL); |
| 340 | bl32_mem_params->ep_info.lr_svc = bl_mem_params->ep_info.pc; |
| 341 | break; |
| 342 | |
| 343 | default: |
| 344 | /* Do nothing in default case */ |
| 345 | break; |
| 346 | } |
| 347 | |
| 348 | return err; |
| 349 | } |
| 350 | #endif |