1cdc21a49346c38f65671447417064d2b4a373cd
[openwrt/openwrt.git] / package / boot / tfa-layerscape / patches / 010-gcc11.patch
1 --- a/common/runtime_svc.c
2 +++ b/common/runtime_svc.c
3 @@ -38,7 +38,7 @@ uintptr_t handle_runtime_svc(uint32_t smc_fid,
4 u_register_t x1, x2, x3, x4;
5 int index;
6 unsigned int idx;
7 - const rt_svc_desc_t *rt_svc_descs;
8 + rt_svc_desc_t *rt_svc_descs = NULL;
9
10 assert(handle);
11 idx = get_unique_oen_from_smc_fid(smc_fid);
12 @@ -48,7 +48,7 @@ uintptr_t handle_runtime_svc(uint32_t smc_fid,
13 if (index < 0 || index >= (int)RT_SVC_DECS_NUM)
14 SMC_RET1(handle, SMC_UNK);
15
16 - rt_svc_descs = (rt_svc_desc_t *) RT_SVC_DESCS_START;
17 + memcpy(rt_svc_descs, (rt_svc_desc_t *)RT_SVC_DESCS_START, MAX_RT_SVCS);
18
19 get_smc_params_from_ctx(handle, x1, x2, x3, x4);
20