Hi Peng,

AFAIK, there is no straight-forward way to grab the details you mentioned (memory usage data, static image size, runtime memory per feature).

In build, there is a memmap feature that provides static memory usage per bootloader component. You might find it useful to experiment with it yourself. Here is a sample command line (at the top of build log) and its output (see the memory usage at the end of the build log) [1].

You may also find the following GCC options useful, depending on what you expect from the run-time memory usage.

If you think there is a better way to show memory usage, we are happy to take your contribution. 

[1]:  https://ci-builds.trustedfirmware.org/static-files/b2vhPeg4jcjMxT3RLtjrr-GR3cJX4N_8BhDuZeThjygxNjU4MTYxODE4NjgzOjk6bWJhZGFya2hlOmpvYi90Zi1hLWJ1aWxkZXIvMTExMDA4Ni9hcnRpZmFjdA==/artefacts/build.log



Manish Badarkhe


From: Peng Fan via TF-A <tf-a@lists.trustedfirmware.org>
Date: Monday, 18 July 2022 at 12:56
To: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>, Jose Marinho <Jose.Marinho@arm.com>, Sudeep Holla <Sudeep.Holla@arm.com>, Dan Handley <Dan.Handley@arm.com>
Subject: [TF-A] Question about maximum TF-A BL31 memory usage

Hi All,

Is there any public BL31 memory usage data, such as static image size
and runtime memory usage, with different feature enabled?

For example,
typical PSCI feature would require image size XXKB, runtime memory XXKB.
enabling FFA would enlarge image size by XXKB, runtime memory enlarge XXKB.

we are evaluating how much On-Chip RAM could be assigned for BL31,
if there are any public data available, that would be great.

TF-A mailing list -- tf-a@lists.trustedfirmware.org
To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.org