mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 17:14:21 +00:00
fix(spm): not defining load-address in SP config
The FF-A specification has made it such that SPs may optionally specify their load address in the manifest. This info was being retrieved to generate some information for the SPMC manifest. However, it is not a mandatory utility. This change relaxes the case in which the SP manifest doesn't have a load address. Signed-off-by: J-Alves <joao.alves@arm.com> Change-Id: Ic4c1b1ec6666522900c113903be45ba0eb5d0bf6
This commit is contained in:
parent
e631ac3b21
commit
04e7f80823
1 changed files with 10 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
|
||||
# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
|
@ -136,7 +136,10 @@ def get_load_address(sp_layout, sp, args :dict):
|
|||
''' Helper to fetch load-address from pm file listed in sp_layout.json'''
|
||||
with open(get_sp_manifest_full_path(sp_layout[sp], args), "r") as pm_f:
|
||||
load_address_lines = [l for l in pm_f if 'load-address' in l]
|
||||
assert(len(load_address_lines) == 1)
|
||||
|
||||
if len(load_address_lines) is not 1:
|
||||
return None
|
||||
|
||||
load_address_parsed = re.search("(0x[0-9a-f]+)", load_address_lines[0])
|
||||
return load_address_parsed.group(0)
|
||||
|
||||
|
@ -240,7 +243,8 @@ def gen_fconf_fragment(sp_layout, sp, args: dict):
|
|||
else:
|
||||
load_address = get_load_address(sp_layout, sp, args)
|
||||
|
||||
f.write(
|
||||
if load_address is not None:
|
||||
f.write(
|
||||
f'''\
|
||||
{sp} {{
|
||||
uuid = "{uuid}";
|
||||
|
@ -249,6 +253,9 @@ f'''\
|
|||
}};
|
||||
|
||||
''')
|
||||
else:
|
||||
print("Warning: No load-address was found in the SP manifest.")
|
||||
|
||||
return args
|
||||
|
||||
def init_sp_actions(sys):
|
||||
|
|
Loading…
Add table
Reference in a new issue