Rework the TSPD setup code
There is no mechanism which allows the TSPD to specify what SPSR to
use when entering BL3-2 instead of BL3-3. This patch divides the
responsibility between tspd_setup() and tspd_init() for initializing
the TSPD and TSP to support the alternate BL3-2 initialization flow
where BL3-1 handsover control to BL3-2 instead of BL3-3.
SPSR generated by TSPD for TSP is preserved due the new division of
labour which fixes #174.

This patch also moves the cpu_context initialization code from
tspd_setup() to tspd_init() immediately before entering the TSP.
Instead tspd_setup() updates the BL3-2 entrypoint info structure
with the state required for initializing the TSP later.

Fixes  ARM-software/TF-issues#174

Change-Id: Ida0a8a48d466c71d5b07b8c7f2af169b73f96940
1 parent dd2bdee commit 50e27dadbcc4b442f1c5ceb343c6d55783afed54
@Vikram Kanigiri Vikram Kanigiri authored on 15 Jul 2014
Showing 5 changed files
View
plat/fvp/bl31_fvp_setup.c
View
services/spd/tspd/tspd_common.c
View
services/spd/tspd/tspd_main.c
View
services/spd/tspd/tspd_pm.c
View
services/spd/tspd/tspd_private.h