Skip to content

Commit 0321409

Browse files
authored
Fixes in FVP invocation (#62)
This patches fixes two bugs: - Properly propagate FVP's return code to the caller. - Prepend `INST=` to the `--application` argument value. This is required when the application's path contains equal signs (`=`). This sign is interpreted as a special case inside FVP: its presence in the path leads to ambiguity. One way to work around this is to do the prepend. After that, any `=` sign that comes up in the path is treated as part of the path. This is the help message from Corstone's `--application`: > -a, --application FILE application to load, format: -a [INST=]FILE (use -a INST=FILE for a specific instance, use -a INST*=FILE to match multiple instances using wildcards e.g. for SMP cores)
1 parent c51547e commit 0321409

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

arm-software/embedded/arm-runtimes/test-support/lit-exec-fvp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def main():
7777
help="optional arguments for the image",
7878
)
7979
args = parser.parse_args()
80-
return run_fvp(
80+
ret_code = run_fvp(
8181
args.fvp_install_dir,
8282
args.fvp_config_dir,
8383
args.fvp_model,

arm-software/embedded/arm-runtimes/test-support/run_fvp.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,18 @@ def run_fvp(
5959
command.extend(["--quiet"])
6060
for config in fvp_configs:
6161
command.extend(["--config-file", path.join(fvp_config_dir, config + ".cfg")])
62-
command.extend(["--application", image])
62+
63+
if fvp_model == "corstone-310":
64+
command.extend(["--application", f"cpu0={image}"])
65+
elif fvp_model == "aem-a" or fvp_model == "aem-r":
66+
# In case we ever need to run multiprocessor images, the instance name below
67+
# can be renamed to "cluster0.cpu*" (wildcard).
68+
command.extend(["--application", f"cluster0.cpu0={image}"])
69+
else:
70+
raise RuntimeError(
71+
f"FVP model {fvp_model} not covered in --application definition"
72+
)
73+
6374
command.extend(["--parameter", f"{model.cmdline_param}={shlex.join(arguments)}"])
6475
command.extend(["--plugin", path.join(fvp_install_dir, model.crypto_plugin)])
6576
if tarmac_file is not None:

0 commit comments

Comments
 (0)