mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-08 05:43:53 +00:00
feat: add option to input text instead of tag id number
Change-Id: I6d1b1a20d1cd5b073d7d614da102b9e6bd8ea522 Signed-off-by: Charlie Bareham <charlie.bareham@arm.com>
This commit is contained in:
parent
311209934e
commit
792e8e896f
3 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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"]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue