diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2015-09-28 17:03:06 +0100 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2015-11-02 09:23:05 +0000 |
commit | 68a68c925f6d2b9266b53fb6257b58ff720c3bcd (patch) | |
tree | e505ac915610f951b2d4e0eaa80025814a79a364 /common | |
parent | f57e2db6ef4b86a6af57891a2d7a90266ad6c033 (diff) | |
download | trusted-firmware-a-68a68c925f6d2b9266b53fb6257b58ff720c3bcd.tar.gz |
Introduce print_entry_point_info() function
This patch introduces a new function called 'print_entry_point_info'
that prints an entry_point_t structure for debugging purposes.
As such, it can be used to display the entry point address, SPSR and
arguments passed from a firmware image to the next one.
This function is now called in the following images transitions:
- BL1 to BL2
- BL1 to BL31
- BL31 to the next image (typically BL32 or BL33)
The following changes have been introduced:
- Fix the output format of the SPSR value : SPSR is a 32-bit value,
not a 64-bit one.
- Print all arguments values.
The entry_point_info_t structure allows to pass up to 8 arguments.
In most cases, only the first 2 arguments were printed.
print_entry_point_info() now prints all of them as 'VERBOSE'
traces.
Change-Id: Ieb384bffaa7849e6cb95a01a47c0b7fc2308653a
Diffstat (limited to 'common')
-rw-r--r-- | common/bl_common.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/common/bl_common.c b/common/bl_common.c index 91a0ae8c43..1cf0b23bbb 100644 --- a/common/bl_common.c +++ b/common/bl_common.c @@ -352,3 +352,27 @@ int load_auth_image(meminfo_t *mem_layout, return 0; } + +/******************************************************************************* + * Print the content of an entry_point_info_t structure. + ******************************************************************************/ +void print_entry_point_info(const entry_point_info_t *ep_info) +{ + INFO("Entry point address = 0x%llx\n", + (unsigned long long) ep_info->pc); + INFO("SPSR = 0x%lx\n", (unsigned long) ep_info->spsr); + +#define PRINT_IMAGE_ARG(n) \ + VERBOSE("Argument #" #n " = 0x%llx\n", \ + (unsigned long long) ep_info->args.arg##n) + + PRINT_IMAGE_ARG(0); + PRINT_IMAGE_ARG(1); + PRINT_IMAGE_ARG(2); + PRINT_IMAGE_ARG(3); + PRINT_IMAGE_ARG(4); + PRINT_IMAGE_ARG(5); + PRINT_IMAGE_ARG(6); + PRINT_IMAGE_ARG(7); +#undef PRINT_IMAGE_ARG +} |