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
886dfdf2
Commit
886dfdf2
authored
May 29, 2014
by
Dan Handley
Browse files
Merge pull request #115 'athoelke-at:fix-bl31-X1-parameter'
parents
bcc8d779
03462671
Changes
4
Hide whitespace changes
Inline
Side-by-side
bl2/bl2_main.c
View file @
886dfdf2
...
...
@@ -38,24 +38,6 @@
#include <stdio.h>
#include "bl2_private.h"
/*******************************************************************************
* Runs BL31 from the given entry point. It jumps to a higher exception level
* through an SMC.
******************************************************************************/
static
void
__dead2
bl2_run_bl31
(
entry_point_info_t
*
bl31_ep_info
,
unsigned
long
arg1
,
unsigned
long
arg2
)
{
/* Set the args pointer */
bl31_ep_info
->
args
.
arg0
=
arg1
;
bl31_ep_info
->
args
.
arg1
=
arg2
;
/* Flush the params to be passed to memory */
bl2_plat_flush_bl31_params
();
smc
(
RUN_IMAGE
,
(
unsigned
long
)
bl31_ep_info
,
0
,
0
,
0
,
0
,
0
,
0
);
}
/*******************************************************************************
* The only thing to do in BL2 is to load further images and pass control to
...
...
@@ -91,6 +73,9 @@ void bl2_main(void)
bl2_to_bl31_params
=
bl2_plat_get_bl31_params
();
bl31_ep_info
=
bl2_plat_get_bl31_ep_info
();
/* Set the X0 parameter to bl31 */
bl31_ep_info
->
args
.
arg0
=
(
unsigned
long
)
bl2_to_bl31_params
;
/*
* Load BL31. BL1 tells BL2 whether it has been TOP or BOTTOM loaded.
* To avoid fragmentation of trusted SRAM memory, BL31 is always
...
...
@@ -163,10 +148,13 @@ void bl2_main(void)
}
#endif
/* BL32_BASE */
/* Flush the params to be passed to memory */
bl2_plat_flush_bl31_params
();
/*
* Run BL31 via an SMC to BL1. Information on how to pass control to
* the BL32 (if present) and BL33 software images will be passed to
* BL31 as an argument.
*/
bl2_run_bl31
(
bl31_ep_info
,
(
unsigned
long
)
bl2_to_bl31_params
,
0
);
smc
(
RUN_IMAGE
,
(
unsigned
long
)
bl31_ep_info
,
0
,
0
,
0
,
0
,
0
,
0
);
}
plat/fvp/bl2_fvp_setup.c
View file @
886dfdf2
...
...
@@ -156,6 +156,9 @@ bl31_params_t *bl2_plat_get_bl31_params(void)
******************************************************************************/
struct
entry_point_info
*
bl2_plat_get_bl31_ep_info
(
void
)
{
#if DEBUG
bl31_ep_info
->
args
.
arg1
=
FVP_BL31_PLAT_PARAM_VAL
;
#endif
return
bl31_ep_info
;
}
...
...
plat/fvp/bl31_fvp_setup.c
View file @
886dfdf2
...
...
@@ -159,6 +159,7 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2,
assert
(
from_bl2
->
h
.
version
>=
VERSION_1
);
bl2_to_bl31_params
=
from_bl2
;
assert
(((
unsigned
long
)
plat_params_from_bl2
)
==
FVP_BL31_PLAT_PARAM_VAL
);
#endif
}
...
...
plat/fvp/fvp_def.h
View file @
886dfdf2
...
...
@@ -115,6 +115,9 @@
/* Load address of BL33 in the FVP port */
#define NS_IMAGE_OFFSET (DRAM1_BASE + 0x8000000)
/* DRAM + 128MB */
/* Special value used to verify platform parameters from BL2 to BL3-1 */
#define FVP_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL
/*
* V2M sysled bit definitions. The values written to this
* register are defined in arch.h & runtime_svc.h. Only
...
...
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