Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
cf44cb2c
Commit
cf44cb2c
authored
Jul 31, 2020
by
Manish Pandey
Committed by
TrustedFirmware Code Review
Jul 31, 2020
Browse files
Merge "tbbr/dualroot: rename SP package certificate file" into integration
parents
15320adb
03a5225c
Changes
7
Hide whitespace changes
Inline
Side-by-side
drivers/auth/dualroot/cot.c
View file @
cf44cb2c
...
@@ -693,8 +693,8 @@ static const auth_img_desc_t nt_fw_config = {
...
@@ -693,8 +693,8 @@ static const auth_img_desc_t nt_fw_config = {
* Secure Partitions
* Secure Partitions
*/
*/
#if defined(SPD_spmd)
#if defined(SPD_spmd)
static
const
auth_img_desc_t
sp_content_cert
=
{
static
const
auth_img_desc_t
sip_
sp_content_cert
=
{
.
img_id
=
SP_CONTENT_CERT_ID
,
.
img_id
=
SIP_
SP_CONTENT_CERT_ID
,
.
img_type
=
IMG_CERT
,
.
img_type
=
IMG_CERT
,
.
parent
=
&
trusted_key_cert
,
.
parent
=
&
trusted_key_cert
,
.
img_auth_methods
=
(
const
auth_method_desc_t
[
AUTH_METHOD_NUM
])
{
.
img_auth_methods
=
(
const
auth_method_desc_t
[
AUTH_METHOD_NUM
])
{
...
@@ -775,14 +775,14 @@ static const auth_img_desc_t sp_content_cert = {
...
@@ -775,14 +775,14 @@ static const auth_img_desc_t sp_content_cert = {
}
}
};
};
DEFINE_SP_PKG
(
1
);
DEFINE_
SIP_
SP_PKG
(
1
);
DEFINE_SP_PKG
(
2
);
DEFINE_
SIP_
SP_PKG
(
2
);
DEFINE_SP_PKG
(
3
);
DEFINE_
SIP_
SP_PKG
(
3
);
DEFINE_SP_PKG
(
4
);
DEFINE_
SIP_
SP_PKG
(
4
);
DEFINE_SP_PKG
(
5
);
DEFINE_
SIP_
SP_PKG
(
5
);
DEFINE_SP_PKG
(
6
);
DEFINE_
SIP_
SP_PKG
(
6
);
DEFINE_SP_PKG
(
7
);
DEFINE_
SIP_
SP_PKG
(
7
);
DEFINE_SP_PKG
(
8
);
DEFINE_
SIP_
SP_PKG
(
8
);
#endif
/* SPD_spmd */
#endif
/* SPD_spmd */
#else
/* IMAGE_BL2 */
#else
/* IMAGE_BL2 */
...
@@ -914,15 +914,15 @@ static const auth_img_desc_t * const cot_desc[] = {
...
@@ -914,15 +914,15 @@ static const auth_img_desc_t * const cot_desc[] = {
[
BL33_IMAGE_ID
]
=
&
bl33_image
,
[
BL33_IMAGE_ID
]
=
&
bl33_image
,
[
NT_FW_CONFIG_ID
]
=
&
nt_fw_config
,
[
NT_FW_CONFIG_ID
]
=
&
nt_fw_config
,
#if defined(SPD_spmd)
#if defined(SPD_spmd)
[
SP_CONTENT_CERT_ID
]
=
&
sp_content_cert
,
[
SIP_
SP_CONTENT_CERT_ID
]
=
&
sip_
sp_content_cert
,
[
SP_
CONTENT_CERT_ID
+
1
]
=
&
sp_pkg1
,
[
SP_
PKG1_ID
]
=
&
sp_pkg1
,
[
SP_
CONTENT_CERT_ID
+
2
]
=
&
sp_pkg2
,
[
SP_
PKG2_ID
]
=
&
sp_pkg2
,
[
SP_
CONTENT_CERT_ID
+
3
]
=
&
sp_pkg3
,
[
SP_
PKG3_ID
]
=
&
sp_pkg3
,
[
SP_
CONTENT_CERT_ID
+
4
]
=
&
sp_pkg4
,
[
SP_
PKG4_ID
]
=
&
sp_pkg4
,
[
SP_
CONTENT_CERT_ID
+
5
]
=
&
sp_pkg5
,
[
SP_
PKG5_ID
]
=
&
sp_pkg5
,
[
SP_
CONTENT_CERT_ID
+
6
]
=
&
sp_pkg6
,
[
SP_
PKG6_ID
]
=
&
sp_pkg6
,
[
SP_
CONTENT_CERT_ID
+
7
]
=
&
sp_pkg7
,
[
SP_
PKG7_ID
]
=
&
sp_pkg7
,
[
SP_
CONTENT_CERT_ID
+
8
]
=
&
sp_pkg8
,
[
SP_
PKG8_ID
]
=
&
sp_pkg8
,
#endif
#endif
};
};
#endif
#endif
...
...
drivers/auth/tbbr/tbbr_cot_bl2.c
View file @
cf44cb2c
...
@@ -558,8 +558,8 @@ static const auth_img_desc_t nt_fw_config = {
...
@@ -558,8 +558,8 @@ static const auth_img_desc_t nt_fw_config = {
};
};
/* Secure Partitions */
/* Secure Partitions */
#if defined(SPD_spmd)
#if defined(SPD_spmd)
static
const
auth_img_desc_t
sp_content_cert
=
{
static
const
auth_img_desc_t
sip_
sp_content_cert
=
{
.
img_id
=
SP_CONTENT_CERT_ID
,
.
img_id
=
SIP_
SP_CONTENT_CERT_ID
,
.
img_type
=
IMG_CERT
,
.
img_type
=
IMG_CERT
,
.
parent
=
&
trusted_key_cert
,
.
parent
=
&
trusted_key_cert
,
.
img_auth_methods
=
(
const
auth_method_desc_t
[
AUTH_METHOD_NUM
])
{
.
img_auth_methods
=
(
const
auth_method_desc_t
[
AUTH_METHOD_NUM
])
{
...
@@ -640,14 +640,14 @@ static const auth_img_desc_t sp_content_cert = {
...
@@ -640,14 +640,14 @@ static const auth_img_desc_t sp_content_cert = {
}
}
};
};
DEFINE_SP_PKG
(
1
);
DEFINE_
SIP_
SP_PKG
(
1
);
DEFINE_SP_PKG
(
2
);
DEFINE_
SIP_
SP_PKG
(
2
);
DEFINE_SP_PKG
(
3
);
DEFINE_
SIP_
SP_PKG
(
3
);
DEFINE_SP_PKG
(
4
);
DEFINE_
SIP_
SP_PKG
(
4
);
DEFINE_SP_PKG
(
5
);
DEFINE_
SIP_
SP_PKG
(
5
);
DEFINE_SP_PKG
(
6
);
DEFINE_
SIP_
SP_PKG
(
6
);
DEFINE_SP_PKG
(
7
);
DEFINE_
SIP_
SP_PKG
(
7
);
DEFINE_SP_PKG
(
8
);
DEFINE_
SIP_
SP_PKG
(
8
);
#endif
/* SPD_spmd */
#endif
/* SPD_spmd */
static
const
auth_img_desc_t
*
const
cot_desc
[]
=
{
static
const
auth_img_desc_t
*
const
cot_desc
[]
=
{
...
@@ -672,15 +672,15 @@ static const auth_img_desc_t * const cot_desc[] = {
...
@@ -672,15 +672,15 @@ static const auth_img_desc_t * const cot_desc[] = {
[
BL33_IMAGE_ID
]
=
&
bl33_image
,
[
BL33_IMAGE_ID
]
=
&
bl33_image
,
[
NT_FW_CONFIG_ID
]
=
&
nt_fw_config
,
[
NT_FW_CONFIG_ID
]
=
&
nt_fw_config
,
#if defined(SPD_spmd)
#if defined(SPD_spmd)
[
SP_CONTENT_CERT_ID
]
=
&
sp_content_cert
,
[
SIP_
SP_CONTENT_CERT_ID
]
=
&
sip_
sp_content_cert
,
[
SP_
CONTENT_CERT_ID
+
1
]
=
&
sp_pkg1
,
[
SP_
PKG1_ID
]
=
&
sp_pkg1
,
[
SP_
CONTENT_CERT_ID
+
2
]
=
&
sp_pkg2
,
[
SP_
PKG2_ID
]
=
&
sp_pkg2
,
[
SP_
CONTENT_CERT_ID
+
3
]
=
&
sp_pkg3
,
[
SP_
PKG3_ID
]
=
&
sp_pkg3
,
[
SP_
CONTENT_CERT_ID
+
4
]
=
&
sp_pkg4
,
[
SP_
PKG4_ID
]
=
&
sp_pkg4
,
[
SP_
CONTENT_CERT_ID
+
5
]
=
&
sp_pkg5
,
[
SP_
PKG5_ID
]
=
&
sp_pkg5
,
[
SP_
CONTENT_CERT_ID
+
6
]
=
&
sp_pkg6
,
[
SP_
PKG6_ID
]
=
&
sp_pkg6
,
[
SP_
CONTENT_CERT_ID
+
7
]
=
&
sp_pkg7
,
[
SP_
PKG7_ID
]
=
&
sp_pkg7
,
[
SP_
CONTENT_CERT_ID
+
8
]
=
&
sp_pkg8
,
[
SP_
PKG8_ID
]
=
&
sp_pkg8
,
#endif
#endif
};
};
...
...
fdts/cot_descriptors.dtsi
View file @
cf44cb2c
...
@@ -146,8 +146,8 @@ cot {
...
@@ -146,8 +146,8 @@ cot {
};
};
#if defined(SPD_spmd)
#if defined(SPD_spmd)
sp_content_cert: sp_content_cert {
sip_
sp_content_cert:
sip_
sp_content_cert {
image-id = <SP_CONTENT_CERT_ID>;
image-id = <
SIP_
SP_CONTENT_CERT_ID>;
parent = <&trusted_key_cert>;
parent = <&trusted_key_cert>;
signing-key = <&trusted_world_pk>;
signing-key = <&trusted_world_pk>;
antirollback-counter = <&trusted_nv_counter>;
antirollback-counter = <&trusted_nv_counter>;
...
@@ -251,50 +251,50 @@ cot {
...
@@ -251,50 +251,50 @@ cot {
#if defined(SPD_spmd)
#if defined(SPD_spmd)
sp_pkg1 {
sp_pkg1 {
image-id = <SP_
CONTENT_CERT_ID + 1
>;
image-id = <SP_
PKG1_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg1_hash>;
hash = <&sp_pkg1_hash>;
};
};
sp_pkg2 {
sp_pkg2 {
image-id = <SP_
CONTENT_CERT_ID + 2
>;
image-id = <SP_
PKG2_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg2_hash>;
hash = <&sp_pkg2_hash>;
};
};
sp_pkg3 {
sp_pkg3 {
image-id = <SP_
CONTENT_CERT_ID + 3
>;
image-id = <SP_
PKG3_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg3_hash>;
hash = <&sp_pkg3_hash>;
};
};
sp_pkg4 {
sp_pkg4 {
image-id = <SP_
CONTENT_CERT_ID + 4
>;
image-id = <SP_
PKG4_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg4_hash>;
hash = <&sp_pkg4_hash>;
};
};
sp_pkg5 {
sp_pkg5 {
image-id = <SP_
CONTENT_CERT_ID + 5
>;
image-id = <SP_
PKG5_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg5_hash>;
hash = <&sp_pkg5_hash>;
};
};
sp_pkg6 {
sp_pkg6 {
image-id = <SP_
CONTENT_CERT_ID + 6
>;
image-id = <SP_
PKG6_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg6_hash>;
hash = <&sp_pkg6_hash>;
};
};
sp_pkg7 {
sp_pkg7 {
image-id = <SP_
CONTENT_CERT_ID + 7
>;
image-id = <SP_
PKG7_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg7_hash>;
hash = <&sp_pkg7_hash>;
};
};
sp_pkg8 {
sp_pkg8 {
image-id = <SP_
CONTENT_CERT_ID + 8
>;
image-id = <SP_
PKG8_ID
>;
parent = <&sp_content_cert>;
parent = <&
sip_
sp_content_cert>;
hash = <&sp_pkg8_hash>;
hash = <&sp_pkg8_hash>;
};
};
#endif
#endif
...
...
include/common/tbbr/tbbr_img_def.h
View file @
cf44cb2c
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include <export/common/tbbr/tbbr_img_def_exp.h>
#include <export/common/tbbr/tbbr_img_def_exp.h>
#if defined(SPD_spmd)
#if defined(SPD_spmd)
#define SP_CONTENT_CERT_ID MAX_IMAGE_IDS
#define
SIP_
SP_CONTENT_CERT_ID MAX_IMAGE_IDS
#define SP_PKG1_ID (MAX_IMAGE_IDS + 1)
#define SP_PKG1_ID (MAX_IMAGE_IDS + 1)
#define SP_PKG2_ID (MAX_IMAGE_IDS + 2)
#define SP_PKG2_ID (MAX_IMAGE_IDS + 2)
#define SP_PKG3_ID (MAX_IMAGE_IDS + 3)
#define SP_PKG3_ID (MAX_IMAGE_IDS + 3)
...
...
include/drivers/auth/auth_mod.h
View file @
cf44cb2c
...
@@ -51,11 +51,11 @@ extern const size_t cot_desc_size;
...
@@ -51,11 +51,11 @@ extern const size_t cot_desc_size;
extern
unsigned
int
auth_img_flags
[
MAX_NUMBER_IDS
];
extern
unsigned
int
auth_img_flags
[
MAX_NUMBER_IDS
];
#if defined(SPD_spmd)
#if defined(SPD_spmd)
#define DEFINE_SP_PKG(n) \
#define DEFINE_
SIP_
SP_PKG(n) \
static const auth_img_desc_t sp_pkg##n = { \
static const auth_img_desc_t sp_pkg##n = { \
.img_id = SP_
CONTENT_CERT_ID + (n)
, \
.img_id = SP_
PKG##n##_ID
, \
.img_type = IMG_RAW, \
.img_type = IMG_RAW, \
.parent = &sp_content_cert, \
.parent = &
sip_
sp_content_cert, \
.img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { \
.img_auth_methods = (const auth_method_desc_t[AUTH_METHOD_NUM]) { \
[0] = { \
[0] = { \
.type = AUTH_METHOD_HASH, \
.type = AUTH_METHOD_HASH, \
...
...
plat/arm/common/fconf/arm_fconf_io.c
View file @
cf44cb2c
...
@@ -51,7 +51,7 @@ const io_uuid_spec_t arm_uuid_spec[MAX_NUMBER_IDS] = {
...
@@ -51,7 +51,7 @@ const io_uuid_spec_t arm_uuid_spec[MAX_NUMBER_IDS] = {
[
TRUSTED_OS_FW_CONTENT_CERT_ID
]
=
{
UUID_TRUSTED_OS_FW_CONTENT_CERT
},
[
TRUSTED_OS_FW_CONTENT_CERT_ID
]
=
{
UUID_TRUSTED_OS_FW_CONTENT_CERT
},
[
NON_TRUSTED_FW_CONTENT_CERT_ID
]
=
{
UUID_NON_TRUSTED_FW_CONTENT_CERT
},
[
NON_TRUSTED_FW_CONTENT_CERT_ID
]
=
{
UUID_NON_TRUSTED_FW_CONTENT_CERT
},
#if defined(SPD_spmd)
#if defined(SPD_spmd)
[
SP_CONTENT_CERT_ID
]
=
{
UUID_SIP_SECURE_PARTITION_CONTENT_CERT
},
[
SIP_
SP_CONTENT_CERT_ID
]
=
{
UUID_SIP_SECURE_PARTITION_CONTENT_CERT
},
#endif
#endif
#endif
/* ARM_IO_IN_DTB */
#endif
/* ARM_IO_IN_DTB */
#endif
/* TRUSTED_BOARD_BOOT */
#endif
/* TRUSTED_BOARD_BOOT */
...
@@ -184,9 +184,9 @@ struct plat_io_policy policies[MAX_NUMBER_IDS] = {
...
@@ -184,9 +184,9 @@ struct plat_io_policy policies[MAX_NUMBER_IDS] = {
open_fip
open_fip
},
},
#if defined(SPD_spmd)
#if defined(SPD_spmd)
[
SP_CONTENT_CERT_ID
]
=
{
[
SIP_
SP_CONTENT_CERT_ID
]
=
{
&
fip_dev_handle
,
&
fip_dev_handle
,
(
uintptr_t
)
&
arm_uuid_spec
[
SP_CONTENT_CERT_ID
],
(
uintptr_t
)
&
arm_uuid_spec
[
SIP_
SP_CONTENT_CERT_ID
],
open_fip
open_fip
},
},
#endif
#endif
...
@@ -233,7 +233,7 @@ static const struct policies_load_info load_info[FCONF_ARM_IO_UUID_NUMBER] = {
...
@@ -233,7 +233,7 @@ static const struct policies_load_info load_info[FCONF_ARM_IO_UUID_NUMBER] = {
{
TRUSTED_OS_FW_CONTENT_CERT_ID
,
"tos_fw_content_cert_uuid"
},
{
TRUSTED_OS_FW_CONTENT_CERT_ID
,
"tos_fw_content_cert_uuid"
},
{
NON_TRUSTED_FW_CONTENT_CERT_ID
,
"nt_fw_content_cert_uuid"
},
{
NON_TRUSTED_FW_CONTENT_CERT_ID
,
"nt_fw_content_cert_uuid"
},
#if defined(SPD_spmd)
#if defined(SPD_spmd)
{
SP_CONTENT_CERT_ID
,
"sp_content_cert_uuid"
},
{
SIP_
SP_CONTENT_CERT_ID
,
"
sip_
sp_content_cert_uuid"
},
#endif
#endif
#endif
/* TRUSTED_BOARD_BOOT */
#endif
/* TRUSTED_BOARD_BOOT */
};
};
...
...
plat/arm/common/fconf/arm_fconf_sp.c
View file @
cf44cb2c
...
@@ -30,7 +30,7 @@ int fconf_populate_arm_sp(uintptr_t config)
...
@@ -30,7 +30,7 @@ int fconf_populate_arm_sp(uintptr_t config)
union
uuid_helper_t
uuid_helper
;
union
uuid_helper_t
uuid_helper
;
unsigned
int
index
=
0
;
unsigned
int
index
=
0
;
uint32_t
val32
;
uint32_t
val32
;
const
unsigned
int
sp_start_index
=
SP_
CONTENT_CERT_ID
+
1
;
const
unsigned
int
sp_start_index
=
SP_
PKG1_ID
;
/* As libfdt use void *, we can't avoid this cast */
/* As libfdt use void *, we can't avoid this cast */
const
void
*
dtb
=
(
void
*
)
config
;
const
void
*
dtb
=
(
void
*
)
config
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment