From 23ff9baa7e01eac3a451f2e8ed768c9b90d3567a Mon Sep 17 00:00:00 2001 From: Vikram Kanigiri Date: Tue, 13 May 2014 14:42:08 +0100 Subject: Introduce macros to manipulate the SPSR This patch introduces macros (SPSR_64 and SPSR_32) to create a SPSR for both aarch32 and aarch64 execution states. These macros allow the user to set fields in the SPSR depending upon its format. The make_spsr() function which did not allow manipulation of all the fields in the aarch32 SPSR has been replaced by these new macros. Change-Id: I9425dda0923e8d5f03d03ddb8fa0e28392c4c61e --- common/bl_common.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'common/bl_common.c') diff --git a/common/bl_common.c b/common/bl_common.c index 86b0cc5cb..037d0ff27 100644 --- a/common/bl_common.c +++ b/common/bl_common.c @@ -122,20 +122,6 @@ void __dead2 change_el(el_change_info_t *info) raise_el(&info->args); } -/* TODO: add a parameter for DAIF. not needed right now */ -unsigned long make_spsr(unsigned long target_el, - unsigned long target_sp, - unsigned long target_rw) -{ - unsigned long spsr; - - /* Disable all exceptions & setup the EL */ - spsr = (DAIF_FIQ_BIT | DAIF_IRQ_BIT | DAIF_ABT_BIT | DAIF_DBG_BIT) - << PSR_DAIF_SHIFT; - spsr |= PSR_MODE(target_rw, target_el, target_sp); - - return spsr; -} /******************************************************************************* * The next two functions are the weak definitions. Platform specific -- cgit v1.2.3