Skip to content

Commit

Permalink
[util] Fix audit_sec_mmio_calls to use the new IP header rules
Browse files Browse the repository at this point in the history
With the new rule, a very easy way to get the list of all Hjson
files for IPs is to look at the `ip_hjson` attribute of the
definition of //hw/top:top_<name>_desc. Since this script kind
of assumes earlgrey anyway, explicitely point to the earlgrey
description of now.

Signed-off-by: Amaury Pouly <[email protected]>
  • Loading branch information
pamaury committed Dec 12, 2024
1 parent ee55b25 commit d770b52
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions util/py/scripts/audit_sec_mmio_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ def query_hjson_sources(self) -> list[Path]:
query_lines = run.run(
"./bazelisk.sh",
"cquery",
"labels(srcs, kind(autogen_hjson_c_header, //...))",
"--output=starlark",
"--starlark:expr='\\n'.join([f.path for f in target.files.to_list()])",
"labels(ip_hjson, //hw/top:top_earlgrey_desc)",
"--output=files",
)
return [Path(line) for line in query_lines]

Expand Down Expand Up @@ -255,7 +254,7 @@ def main(log_level: ot_logging.LogLevel = ot_logging.LogLevel.WARNING) -> None:
report_lines.append("Callsites where "
f"[bold]{function_name}[/bold] " +
"is called with hw-writable register " +
f"[purple]{register_token}[/purple]:")
f"[purple]{register_token}[/purple]: ")
report_lines.append("")

for loc in sorted(callsites, key=lambda c: c.path):
Expand Down

0 comments on commit d770b52

Please sign in to comment.