aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBrandon Maier <brandon.maier@collins.com>2024-01-04 18:50:07 +0000
committerMichal Simek <michal.simek@amd.com>2024-01-10 09:27:12 +0100
commit2ddd0248e9cc8bf1da7c3d42c0bab1f65e859913 (patch)
tree4834f0184bd7500c1d33ab8a3f594c0b315e2f35 /tools
parent85acf83a09583e472538c23c6a2d23176135485f (diff)
downloadu-boot-2ddd0248e9cc8bf1da7c3d42c0bab1f65e859913.zip
u-boot-2ddd0248e9cc8bf1da7c3d42c0bab1f65e859913.tar.gz
u-boot-2ddd0248e9cc8bf1da7c3d42c0bab1f65e859913.tar.bz2
tools: zynqmpimage: print all partition sizes
Two of the partition size fields are not printed. Currently only the "total" size is displayed, which is the size of the image data (encrypted), padding, expansion, and authentication data. Add the "unencrypted data" size, which is the original size of the data before being encrypted. And "encrypted data" size, which is just the encrypted data. To avoid printing useless information, only print the encrypted and unencrypted sizes if they are different from the total. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Link: https://lore.kernel.org/r/20240104185258.39465-2-brandon.maier@collins.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/zynqmpimage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/zynqmpimage.c b/tools/zynqmpimage.c
index 05af1e8..2795a2b 100644
--- a/tools/zynqmpimage.c
+++ b/tools/zynqmpimage.c
@@ -139,6 +139,8 @@ static void print_partition(const void *ptr, const struct partition_header *ph)
{
uint32_t attr = le32_to_cpu(ph->attributes);
unsigned long len = le32_to_cpu(ph->len) * 4;
+ unsigned long len_enc = le32_to_cpu(ph->len_enc) * 4;
+ unsigned long len_unenc = le32_to_cpu(ph->len_unenc) * 4;
const char *part_owner;
const char *dest_devs[0x8] = {
"none", "PS", "PL", "PMU", "unknown", "unknown", "unknown",
@@ -163,6 +165,10 @@ static void print_partition(const void *ptr, const struct partition_header *ph)
printf(" Offset : 0x%08x\n", le32_to_cpu(ph->offset) * 4);
printf(" Size : %lu (0x%lx) bytes\n", len, len);
+ if (len != len_unenc)
+ printf(" Size Data : %lu (0x%lx) bytes\n", len_unenc, len_unenc);
+ if (len_unenc != len_enc)
+ printf(" Size Enc : %lu (0x%lx) bytes\n", len_unenc, len_unenc);
printf(" Load : 0x%08llx",
(unsigned long long)le64_to_cpu(ph->load_address));
if (ph->load_address != ph->entry_point)