diff options
author | Joel Hutton <Joel.Hutton@Arm.com> | 2019-03-11 11:37:38 +0000 |
---|---|---|
committer | Joel Hutton <Joel.Hutton@Arm.com> | 2019-04-08 14:24:21 +0100 |
commit | 30070427e3ed30721074465f97ffb68390ee688c (patch) | |
tree | a9b0cc8e9ddf99630b6f5e6411d208dae85c41bd /include | |
parent | 0b6377d1c60c01dd456a1a88dac5b1e83c0e3273 (diff) | |
download | platform_external_arm-trusted-firmware-30070427e3ed30721074465f97ffb68390ee688c.tar.gz platform_external_arm-trusted-firmware-30070427e3ed30721074465f97ffb68390ee688c.tar.bz2 platform_external_arm-trusted-firmware-30070427e3ed30721074465f97ffb68390ee688c.zip |
cot-desc: optimise memory further
This changes the auth_img_desc_t struct to have pointers to struct
arrays instead of struct arrays. This saves memory as many of these
were never used, and can be NULL pointers. Note the memory savings are
only when these arrays are not initialised, as it is assumed these
arrays are fixed length. A possible future optimisation could allow for
variable length.
memory diff:
bl1: bl2:
text text
-12 -12
bss bss
-1463 0
data data
-56 -48
rodata rodata
-5688 -2592
total total
-7419 -2652
Change-Id: I8f9bdedf75048b8867f40c56381e3a6dc6402bcc
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drivers/auth/auth_mod.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drivers/auth/auth_mod.h b/include/drivers/auth/auth_mod.h index 0119ed2e0..39f5372e5 100644 --- a/include/drivers/auth/auth_mod.h +++ b/include/drivers/auth/auth_mod.h @@ -27,8 +27,8 @@ typedef struct auth_img_desc_s { unsigned int img_id; 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]; + const auth_method_desc_t *const img_auth_methods; + const auth_param_desc_t *const authenticated_data; } auth_img_desc_t; /* Public functions */ |