diff --git a/docs/tools/transfer-list-compiler.rst b/docs/tools/transfer-list-compiler.rst index e9710d745..8ecbab529 100644 --- a/docs/tools/transfer-list-compiler.rst +++ b/docs/tools/transfer-list-compiler.rst @@ -267,9 +267,18 @@ info entry would have an entry like: pc: 67239936 spsr: 467 +You can give the name of the tag instead of the tag id number. The valid tag names are in the +`transfer_entry_formats` dict in `tools/tlc/tlc/tl.py`_. Some examples are: + +* empty +* fdt +* hob_block +* hob_list + -------------- *Copyright (c) 2024, Arm Limited. All rights reserved.* .. _Firmware Handoff specification: https://github.com/FirmwareHandoff/firmware_handoff/ .. _tools/tlc/pyproject.toml: https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/heads/master/tools/tlc/pyproject.toml +.. _tools/tlc/tlc/tl.py: https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/heads/master/tools/tlc/tlc/tl.py diff --git a/tools/tlc/tests/test_cli.py b/tools/tlc/tests/test_cli.py index 5c1035cd8..6d50ab7cd 100644 --- a/tools/tlc/tests/test_cli.py +++ b/tools/tlc/tests/test_cli.py @@ -240,13 +240,18 @@ def test_create_entry_from_yaml_and_blob_file( "tag_id": 0x100, "pp_addr": 100, }, + { + "tag_id": "optee_pageable_part", + "pp_addr": 100, + }, ], ) def test_create_from_yaml_check_sum_bytes(tlcrunner, tmpyamlconfig, tmptlstr, entry): """Test creating a TL from a yaml file, but only check that the sum of the data in the yaml file matches the sum of the data in the TL. This means you don't have to type the exact sequence of expected bytes. All the data - in the yaml file must be integers. + in the yaml file must be integers (except for the tag IDs, which can be + strings). """ # create yaml config file config = { diff --git a/tools/tlc/tlc/tl.py b/tools/tlc/tlc/tl.py index dae7e14f6..eec5db08e 100644 --- a/tools/tlc/tlc/tl.py +++ b/tools/tlc/tlc/tl.py @@ -259,7 +259,10 @@ class TransferList: :param entry: Dictionary containing the data described above. """ + # Tag_id is either a tag name or a tag id. Use it to get the TE format. tag_id = entry["tag_id"] + if tag_id in tag_name_to_tag_id: + tag_id = tag_name_to_tag_id[tag_id] te_format = transfer_entry_formats[tag_id] tag_name = te_format["tag_name"]