Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
ec8b25d0
Commit
ec8b25d0
authored
Dec 01, 2015
by
danh-arm
Browse files
Merge pull request #445 from jcastillo-arm/jc/tf-issues/320
Add NULL pointer check before reading BL32 entry point information
parents
4226f858
5ea8aa72
Changes
1
Show whitespace changes
Inline
Side-by-side
plat/arm/common/arm_bl31_setup.c
View file @
ec8b25d0
...
@@ -124,7 +124,8 @@ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2,
...
@@ -124,7 +124,8 @@ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2,
assert
(
from_bl2
==
NULL
);
assert
(
from_bl2
==
NULL
);
assert
(
plat_params_from_bl2
==
NULL
);
assert
(
plat_params_from_bl2
==
NULL
);
/* Populate entry point information for BL3-2 and BL3-3 */
#ifdef BL32_BASE
/* Populate entry point information for BL3-2 */
SET_PARAM_HEAD
(
&
bl32_image_ep_info
,
SET_PARAM_HEAD
(
&
bl32_image_ep_info
,
PARAM_EP
,
PARAM_EP
,
VERSION_1
,
VERSION_1
,
...
@@ -132,7 +133,9 @@ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2,
...
@@ -132,7 +133,9 @@ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2,
SET_SECURITY_STATE
(
bl32_image_ep_info
.
h
.
attr
,
SECURE
);
SET_SECURITY_STATE
(
bl32_image_ep_info
.
h
.
attr
,
SECURE
);
bl32_image_ep_info
.
pc
=
BL32_BASE
;
bl32_image_ep_info
.
pc
=
BL32_BASE
;
bl32_image_ep_info
.
spsr
=
arm_get_spsr_for_bl32_entry
();
bl32_image_ep_info
.
spsr
=
arm_get_spsr_for_bl32_entry
();
#endif
/* BL32_BASE */
/* Populate entry point information for BL3-3 */
SET_PARAM_HEAD
(
&
bl33_image_ep_info
,
SET_PARAM_HEAD
(
&
bl33_image_ep_info
,
PARAM_EP
,
PARAM_EP
,
VERSION_1
,
VERSION_1
,
...
@@ -161,9 +164,10 @@ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2,
...
@@ -161,9 +164,10 @@ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2,
ARM_BL31_PLAT_PARAM_VAL
);
ARM_BL31_PLAT_PARAM_VAL
);
/*
/*
* Copy BL3-2 and BL3-3 entry point information.
* Copy BL3-2
(if populated by BL2)
and BL3-3 entry point information.
* They are stored in Secure RAM, in BL2's address space.
* They are stored in Secure RAM, in BL2's address space.
*/
*/
if
(
from_bl2
->
bl32_ep_info
)
bl32_image_ep_info
=
*
from_bl2
->
bl32_ep_info
;
bl32_image_ep_info
=
*
from_bl2
->
bl32_ep_info
;
bl33_image_ep_info
=
*
from_bl2
->
bl33_ep_info
;
bl33_image_ep_info
=
*
from_bl2
->
bl33_ep_info
;
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment