summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-01-13 11:41:46 +0000
committerdanh-arm <dan.handley@arm.com>2016-01-13 11:41:46 +0000
commite123b2a37aa8c0be445bd1f0284b3907b91e5b29 (patch)
treeb6311d8049b242ac6ec2786e60de61f7574c7ae3
parent0812d49cbd2ce1215f383eecae7870022818abdf (diff)
parentb313d755a7fe92ab5e576376a10051db1ba1c92f (diff)
Merge pull request #483 from soby-mathew/sm/rm_struct_padding
Rearrange fields in TF data structures to reduce padding
-rw-r--r--include/bl31/runtime_svc.h12
-rw-r--r--include/common/bl_common.h9
-rw-r--r--include/drivers/auth/auth_mod.h2
3 files changed, 12 insertions, 11 deletions
diff --git a/include/bl31/runtime_svc.h b/include/bl31/runtime_svc.h
index 30ba29f0..87f2dd2c 100644
--- a/include/bl31/runtime_svc.h
+++ b/include/bl31/runtime_svc.h
@@ -89,12 +89,12 @@ typedef struct rt_svc_desc {
#define DECLARE_RT_SVC(_name, _start, _end, _type, _setup, _smch) \
static const rt_svc_desc_t __svc_desc_ ## _name \
__attribute__ ((section("rt_svc_descs"), used)) = { \
- _start, \
- _end, \
- _type, \
- #_name, \
- _setup, \
- _smch }
+ .start_oen = _start, \
+ .end_oen = _end, \
+ .call_type = _type, \
+ .name = #_name, \
+ .init = _setup, \
+ .handle = _smch }
/*
* Compile time assertions related to the 'rt_svc_desc' structure to:
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index 0ec7a8d8..e5e6717b 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -202,8 +202,9 @@ typedef struct param_header {
* switching exception levels. The only two mechanisms to do so are
* ERET & SMC. Security state is indicated using bit zero of header
* attribute
- * NOTE: BL1 expects entrypoint followed by spsr while processing
- * SMC to jump to BL31 from the start of entry_point_info
+ * NOTE: BL1 expects entrypoint followed by spsr at an offset from the start
+ * of this structure defined by the macro `ENTRY_POINT_INFO_PC_OFFSET` while
+ * processing SMC to jump to BL31.
*****************************************************************************/
typedef struct entry_point_info {
param_header_t h;
@@ -232,13 +233,13 @@ typedef struct image_info {
typedef struct image_desc {
/* Contains unique image id for the image. */
unsigned int image_id;
- image_info_t image_info;
- entry_point_info_t ep_info;
/*
* This member contains Image state information.
* Refer IMAGE_STATE_XXX defined above.
*/
unsigned int state;
+ image_info_t image_info;
+ entry_point_info_t ep_info;
} image_desc_t;
/*******************************************************************************
diff --git a/include/drivers/auth/auth_mod.h b/include/drivers/auth/auth_mod.h
index c00b2565..4ed4684d 100644
--- a/include/drivers/auth/auth_mod.h
+++ b/include/drivers/auth/auth_mod.h
@@ -48,8 +48,8 @@
*/
typedef struct auth_img_desc_s {
unsigned int img_id;
- const struct auth_img_desc_s *parent;
img_type_t img_type;
+ const struct auth_img_desc_s *parent;
auth_method_desc_t img_auth_methods[AUTH_METHOD_NUM];
auth_param_desc_t authenticated_data[COT_MAX_VERIFIED_PARAMS];
} auth_img_desc_t;