Rework the TSPD setup code
authorVikram Kanigiri <vikram.kanigiri@arm.com>
Tue, 15 Jul 2014 15:46:43 +0000 (16:46 +0100)
committerVikram Kanigiri <vikram.kanigiri@arm.com>
Fri, 1 Aug 2014 08:46:52 +0000 (09:46 +0100)
commit50e27dadbcc4b442f1c5ceb343c6d55783afed54
tree7fd1d7a75eff50ed56e906aadaf68833a22b40cf
parentdd2bdee61682df0ec65dfc43371c126a86a30c30
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
plat/fvp/bl31_fvp_setup.c
services/spd/tspd/tspd_common.c
services/spd/tspd/tspd_main.c
services/spd/tspd/tspd_pm.c
services/spd/tspd/tspd_private.h