Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
081c5e5a
Commit
081c5e5a
authored
4 years ago
by
Mark Dykes
Committed by
TrustedFirmware Code Review
4 years ago
Browse files
Options
Download
Plain Diff
Merge "refactor(plat/arm): store UUID as a string, rather than ints" into integration
parents
b29dec5c
7d111d99
master
v2.5
v2.5-rc1
v2.5-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
include/tools_share/uuid.h
+0
-1
include/tools_share/uuid.h
plat/arm/board/fvp/fdts/fvp_tb_fw_config.dts
+25
-25
plat/arm/board/fvp/fdts/fvp_tb_fw_config.dts
plat/arm/common/arm_common.mk
+3
-1
plat/arm/common/arm_common.mk
plat/arm/common/fconf/arm_fconf_io.c
+15
-16
plat/arm/common/fconf/arm_fconf_io.c
plat/arm/common/fconf/arm_fconf_sp.c
+16
-18
plat/arm/common/fconf/arm_fconf_sp.c
with
59 additions
and
61 deletions
+59
-61
include/tools_share/uuid.h
View file @
081c5e5a
...
...
@@ -66,7 +66,6 @@ struct efi_guid {
union
uuid_helper_t
{
struct
uuid
uuid_struct
;
struct
efi_guid
efi_guid
;
uint32_t
word
[
4
];
};
/* XXX namespace pollution? */
...
...
This diff is collapsed.
Click to expand it.
plat/arm/board/fvp/fdts/fvp_tb_fw_config.dts
View file @
081c5e5a
/*
* Copyright (c) 2020, ARM Limited. All rights reserved.
* Copyright (c) 2020
-2021
, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -48,26 +48,26 @@
arm-io_policies {
fip-handles {
compatible = "arm,io-fip-handle";
scp_bl2_uuid =
<0x
9766fd3d
0x
89bee849
0x
ae5d78a1
0x
40608213
>
;
bl31_uuid =
<0x
47d4086d
0x
4cfe9846
0x
9b952950
0x
cbbd5a00
>
;
bl32_uuid =
<0x
05d0e189
0x
53dc1347
0x
8d2b500a
0x
4b7a3e38
>
;
bl32_extra1_uuid =
<0x
0b70c28b
0x
2a5a7840
0x
9f650a56
0x
82738288
>
;
bl32_extra2_uuid =
<0x
8ea87bb1
0x
cfa23f4d
0x
85fde7bb
0x
a50220d9
>
;
bl33_uuid =
<0x
d6d0eea7
0x
fcead54b
0x
97829934
0x
f234b6e4
>
;
hw_cfg_uuid =
<0x
08b8f1d9
0x
c9cf9349
0x
a9626fbc
0x
6b7265cc
>
;
soc_fw_cfg_uuid =
<0x
9979814b
0x
0376fb46
0x
8c8e8d26
0x
7f7859e0
>
;
tos_fw_cfg_uuid =
<0x
26257c1a
0x
dbc67f47
0x
8d96c4c4
0x
b0248021
>
;
nt_fw_cfg_uuid =
<0x
28da9815
0x
93e87e44
0x
ac661aaf
0x
801550f9
>
;
t_key_cert_uuid =
<0x
827ee890
0x
f860e411
0x
a1b477a7
0x
21b4f94c
>
;
scp_fw_key_uuid =
<0x
024221a1
0x
f860e411
0x
8d9bf33c
0x
0e15a014
>
;
soc_fw_key_uuid =
<0x
8ab8becc
0x
f960e411
0x
9ad0eb48
0x
22d8dcf8
>
;
tos_fw_key_cert_uuid =
<0x
9477d603
0x
fb60e411
0x
85ddb710
0x
5b8cee04
>
;
nt_fw_key_cert_uuid =
<0x
8ad5832a
0x
fb60e411
0x
8aafdf30
0x
bbc49859
>
;
scp_fw_content_cert_uuid =
<0x
44be6f04
0x
5e63e411
0x
b28b73d8
0x
eaae9656
>
;
soc_fw_content_cert_uuid =
<0x
e2b20c20
0x
5e63e411
0x
9ce8abcc
0x
f92bb666
>
;
tos_fw_content_cert_uuid =
<0x
a49f4411
0x
5e63e411
0x
87283f05
0x
722af33d
>
;
nt_fw_content_cert_uuid =
<0x
8ec4c1f3
0x
5d63e411
0x
a7a987ee
0x
40b23fa7
>
;
sp_content_cert_uuid =
<0x
776dfd44
0x
86974c3b
0x
91ebc13e
0x
025a2a6f
>
;
scp_bl2_uuid =
"
9766fd3d
-
89be
-
e849
-
ae5d
-
78a140608213
"
;
bl31_uuid =
"
47d4086d
-
4cfe
-
9846
-
9b95
-
2950cbbd5a00
"
;
bl32_uuid =
"
05d0e189
-
53dc
-
1347
-
8d2b
-
500a4b7a3e38
"
;
bl32_extra1_uuid =
"
0b70c28b
-
2a5a
-
7840
-
9f65
-
0a5682738288
"
;
bl32_extra2_uuid =
"
8ea87bb1
-
cfa2
-
3f4d
-
85fd
-
e7bba50220d9
"
;
bl33_uuid =
"
d6d0eea7
-
fcea
-
d54b
-
9782
-
9934f234b6e4
"
;
hw_cfg_uuid =
"
08b8f1d9
-
c9cf
-
9349
-
a962
-
6fbc6b7265cc
"
;
soc_fw_cfg_uuid =
"
9979814b
-
0376
-
fb46
-
8c8e
-
8d267f7859e0
"
;
tos_fw_cfg_uuid =
"
26257c1a
-
dbc6
-
7f47
-
8d96
-
c4c4b0248021
"
;
nt_fw_cfg_uuid =
"
28da9815
-
93e8
-
7e44
-
ac66
-
1aaf801550f9
"
;
t_key_cert_uuid =
"
827ee890
-
f860
-
e411
-
a1b4
-
77a721b4f94c
"
;
scp_fw_key_uuid =
"
024221a1
-
f860
-
e411
-
8d9b
-
f33c0e15a014
"
;
soc_fw_key_uuid =
"
8ab8becc
-
f960
-
e411
-
9ad0
-
eb4822d8dcf8
"
;
tos_fw_key_cert_uuid =
"
9477d603
-
fb60
-
e411
-
85dd
-
b7105b8cee04
"
;
nt_fw_key_cert_uuid =
"
8ad5832a
-
fb60
-
e411
-
8aaf
-
df30bbc49859
"
;
scp_fw_content_cert_uuid =
"
44be6f04
-
5e63
-
e411
-
b28b
-
73d8eaae9656
"
;
soc_fw_content_cert_uuid =
"
e2b20c20
-
5e63
-
e411
-
9ce8
-
abccf92bb666
"
;
tos_fw_content_cert_uuid =
"
a49f4411
-
5e63
-
e411
-
8728
-
3f05722af33d
"
;
nt_fw_content_cert_uuid =
"
8ec4c1f3
-
5d63
-
e411
-
a7a9
-
87ee40b23fa7
"
;
sp_content_cert_uuid =
"
776dfd44
-
8697
-
4c3b
-
91eb
-
c13e025a2a6f
"
;
};
};
#endif /* ARM_IO_IN_DTB */
...
...
@@ -76,24 +76,24 @@
compatible = "arm,sp";
#ifdef OPTEE_SP_FW_CONFIG
op-tee {
uuid =
<0x
486178e0
0x
e7f811e3
0x
bc5e0002
0x
a5d5c51b
>
;
uuid =
"
486178e0
-
e7f8
-
11e3
-
bc5e
-
0002a5d5c51b
"
;
load-address = <0x6280000>;
};
#else
cactus-primary {
uuid =
<0x
b4b5671e
0x
4a904fe1
0x
b81ffb13
0x
dae1dacb
>
;
uuid =
"
b4b5671e
-
4a90
-
4fe1
-
b81f
-
fb13dae1dacb
"
;
load-address = <0x7000000>;
owner = "SiP";
};
cactus-secondary {
uuid =
<0x
d1582309
0x
f02347b9
0x
827c4464
0x
f5578fc8
>
;
uuid =
"
d1582309
-
f023
-
47b9
-
827c
-
4464f5578fc8
"
;
load-address = <0x7100000>;
owner = "Plat";
};
cactus-tertiary {
uuid =
<0x
79b55c73
0x
1d8c44b9
0x
859361e1
0x
770ad8d2
>
;
uuid =
"
79b55c73
-
1d8c
-
44b9
-
8593
-
61e1770ad8d2
"
;
load-address = <0x7200000>;
};
#endif
...
...
This diff is collapsed.
Click to expand it.
plat/arm/common/arm_common.mk
View file @
081c5e5a
...
...
@@ -222,7 +222,8 @@ include lib/libfdt/libfdt.mk
DYN_CFG_SOURCES
+=
plat/arm/common/arm_dyn_cfg.c
\
plat/arm/common/arm_dyn_cfg_helpers.c
\
common/fdt_wrappers.c
common/fdt_wrappers.c
\
common/uuid.c
BL1_SOURCES
+=
${DYN_CFG_SOURCES}
BL2_SOURCES
+=
${DYN_CFG_SOURCES}
...
...
@@ -302,6 +303,7 @@ endif
ifeq
(${SPD},spmd)
BL31_SOURCES
+=
plat/common/plat_spmd_manifest.c
\
common/fdt_wrappers.c
\
common/uuid.c
\
${LIBFDT_SRCS}
endif
...
...
This diff is collapsed.
Click to expand it.
plat/arm/common/fconf/arm_fconf_io.c
View file @
081c5e5a
/*
* Copyright (c) 2019-202
0
, ARM Limited. All rights reserved.
* Copyright (c) 2019-202
1
, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -249,7 +249,6 @@ int fconf_populate_arm_io_policies(uintptr_t config)
{
int
err
,
node
;
unsigned
int
i
;
unsigned
int
j
;
union
uuid_helper_t
uuid_helper
;
io_uuid_spec_t
*
uuid_ptr
;
...
...
@@ -268,26 +267,26 @@ int fconf_populate_arm_io_policies(uintptr_t config)
/* Locate the uuid cells and read the value for all the load info uuid */
for
(
i
=
0
;
i
<
FCONF_ARM_IO_UUID_NUMBER
;
i
++
)
{
uuid_ptr
=
pool_alloc
(
&
fconf_arm_uuids_pool
);
err
=
fdt_read_u
int32_array
(
dtb
,
node
,
load_info
[
i
].
name
,
4
,
uuid_helper
.
word
);
err
=
fdt
w
_read_u
uid
(
dtb
,
node
,
load_info
[
i
].
name
,
16
,
(
uint8_t
*
)
&
uuid_helper
);
if
(
err
<
0
)
{
WARN
(
"FCONF: Read cell failed for %s
\n
"
,
load_info
[
i
].
name
);
return
err
;
}
/* Convert uuid from big endian to little endian */
for
(
j
=
0U
;
j
<
4U
;
j
++
)
{
uuid_helper
.
word
[
j
]
=
((
uuid_helper
.
word
[
j
]
>>
24U
)
&
0xff
)
|
((
uuid_helper
.
word
[
j
]
<<
8U
)
&
0xff0000
)
|
((
uuid_helper
.
word
[
j
]
>>
8U
)
&
0xff00
)
|
((
uuid_helper
.
word
[
j
]
<<
24U
)
&
0xff000000
);
}
VERBOSE
(
"FCONF: arm-io_policies.%s cell found with value = 0x%x 0x%x 0x%x 0x%x
\n
"
,
VERBOSE
(
"FCONF: arm-io_policies.%s cell found with value = "
"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x
\n
"
,
load_info
[
i
].
name
,
uuid_helper
.
word
[
0
],
uuid_helper
.
word
[
1
],
uuid_helper
.
word
[
2
],
uuid_helper
.
word
[
3
]);
uuid_helper
.
uuid_struct
.
time_low
[
0
],
uuid_helper
.
uuid_struct
.
time_low
[
1
],
uuid_helper
.
uuid_struct
.
time_low
[
2
],
uuid_helper
.
uuid_struct
.
time_low
[
3
],
uuid_helper
.
uuid_struct
.
time_mid
[
0
],
uuid_helper
.
uuid_struct
.
time_mid
[
1
],
uuid_helper
.
uuid_struct
.
time_hi_and_version
[
0
],
uuid_helper
.
uuid_struct
.
time_hi_and_version
[
1
],
uuid_helper
.
uuid_struct
.
clock_seq_hi_and_reserved
,
uuid_helper
.
uuid_struct
.
clock_seq_low
,
uuid_helper
.
uuid_struct
.
node
[
0
],
uuid_helper
.
uuid_struct
.
node
[
1
],
uuid_helper
.
uuid_struct
.
node
[
2
],
uuid_helper
.
uuid_struct
.
node
[
3
],
uuid_helper
.
uuid_struct
.
node
[
4
],
uuid_helper
.
uuid_struct
.
node
[
5
]);
uuid_ptr
->
uuid
=
uuid_helper
.
uuid_struct
;
policies
[
load_info
[
i
].
image_id
].
image_spec
=
(
uintptr_t
)
uuid_ptr
;
...
...
This diff is collapsed.
Click to expand it.
plat/arm/common/fconf/arm_fconf_sp.c
View file @
081c5e5a
/*
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2020
-2021
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -37,7 +37,6 @@ int fconf_populate_arm_sp(uintptr_t config)
const
unsigned
int
plat_start
=
SP_PKG5_ID
;
unsigned
int
plat_index
=
plat_start
;
const
unsigned
int
plat_end
=
plat_start
+
MAX_SP_IDS
/
2
;
unsigned
int
j
;
/* As libfdt use void *, we can't avoid this cast */
const
void
*
dtb
=
(
void
*
)
config
;
...
...
@@ -59,29 +58,28 @@ int fconf_populate_arm_sp(uintptr_t config)
}
/* Read UUID */
err
=
fdt_read_u
int32_array
(
dtb
,
sp_node
,
"uuid"
,
4
,
uuid_helper
.
word
);
err
=
fdt
w
_read_u
uid
(
dtb
,
sp_node
,
"uuid"
,
16
,
(
uint8_t
*
)
&
uuid_helper
);
if
(
err
<
0
)
{
ERROR
(
"FCONF: cannot read SP uuid
\n
"
);
return
-
1
;
}
/* Convert uuid from big endian to little endian */
for
(
j
=
0U
;
j
<
4U
;
j
++
)
{
uuid_helper
.
word
[
j
]
=
((
uuid_helper
.
word
[
j
]
>>
24U
)
&
0xff
)
|
((
uuid_helper
.
word
[
j
]
<<
8U
)
&
0xff0000
)
|
((
uuid_helper
.
word
[
j
]
>>
8U
)
&
0xff00
)
|
((
uuid_helper
.
word
[
j
]
<<
24U
)
&
0xff000000
);
}
arm_sp
.
uuids
[
index
]
=
uuid_helper
;
VERBOSE
(
"FCONF: %s UUID %x-%x-%x-%x load_addr=%lx
\n
"
,
VERBOSE
(
"FCONF: %s UUID"
" %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
" load_addr=%lx
\n
"
,
__func__
,
uuid_helper
.
word
[
0
],
uuid_helper
.
word
[
1
],
uuid_helper
.
word
[
2
],
uuid_helper
.
word
[
3
],
uuid_helper
.
uuid_struct
.
time_low
[
0
],
uuid_helper
.
uuid_struct
.
time_low
[
1
],
uuid_helper
.
uuid_struct
.
time_low
[
2
],
uuid_helper
.
uuid_struct
.
time_low
[
3
],
uuid_helper
.
uuid_struct
.
time_mid
[
0
],
uuid_helper
.
uuid_struct
.
time_mid
[
1
],
uuid_helper
.
uuid_struct
.
time_hi_and_version
[
0
],
uuid_helper
.
uuid_struct
.
time_hi_and_version
[
1
],
uuid_helper
.
uuid_struct
.
clock_seq_hi_and_reserved
,
uuid_helper
.
uuid_struct
.
clock_seq_low
,
uuid_helper
.
uuid_struct
.
node
[
0
],
uuid_helper
.
uuid_struct
.
node
[
1
],
uuid_helper
.
uuid_struct
.
node
[
2
],
uuid_helper
.
uuid_struct
.
node
[
3
],
uuid_helper
.
uuid_struct
.
node
[
4
],
uuid_helper
.
uuid_struct
.
node
[
5
],
arm_sp
.
load_addr
[
index
]);
/* Read Load address */
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help