Commit 6ad2e461 authored by Dan Handley's avatar Dan Handley
Browse files

Rationalize console log output

Fix the following issues with the console log output:

* Make sure the welcome string is the first thing in the log output
(during normal boot).
* Prefix each message with the BL image name so it's clear which
BL the output is coming from.
* Ensure all output is wrapped in one of the log output macros so it can
be easily compiled out if necessary. Change some of the INFO() messages
to VERBOSE(), especially in the TSP.
* Create some extra NOTICE() and INFO() messages during cold boot.
* Remove all usage of \r in log output.

Fixes ARM-software/tf-issues#231

Change-Id: Ib24f7acb36ce64bbba549f204b9cde2dbb46c8a3
parent 289c28a8
...@@ -106,6 +106,13 @@ void bl1_init_bl2_mem_layout(const meminfo_t *bl1_mem_layout, ...@@ -106,6 +106,13 @@ void bl1_init_bl2_mem_layout(const meminfo_t *bl1_mem_layout,
******************************************************************************/ ******************************************************************************/
void bl1_main(void) void bl1_main(void)
{ {
/* Announce our arrival */
NOTICE(FIRMWARE_WELCOME_STR);
NOTICE("BL1: %s\n", version_string);
NOTICE("BL1: %s\n", build_message);
INFO("BL1: RAM 0x%lx - 0x%lx\n", BL1_RAM_BASE, BL1_RAM_LIMIT);
#if DEBUG #if DEBUG
unsigned long sctlr_el3 = read_sctlr_el3(); unsigned long sctlr_el3 = read_sctlr_el3();
#endif #endif
...@@ -128,11 +135,6 @@ void bl1_main(void) ...@@ -128,11 +135,6 @@ void bl1_main(void)
/* Perform platform setup in BL1. */ /* Perform platform setup in BL1. */
bl1_platform_setup(); bl1_platform_setup();
/* Announce our arrival */
tf_printf(FIRMWARE_WELCOME_STR);
tf_printf("%s\n", version_string);
tf_printf("%s\n", build_message);
SET_PARAM_HEAD(&bl2_image_info, PARAM_IMAGE_BINARY, VERSION_1, 0); SET_PARAM_HEAD(&bl2_image_info, PARAM_IMAGE_BINARY, VERSION_1, 0);
SET_PARAM_HEAD(&bl2_ep, PARAM_EP, VERSION_1, 0); SET_PARAM_HEAD(&bl2_ep, PARAM_EP, VERSION_1, 0);
...@@ -150,7 +152,7 @@ void bl1_main(void) ...@@ -150,7 +152,7 @@ void bl1_main(void)
* TODO: print failure to load BL2 but also add a tzwdog timer * TODO: print failure to load BL2 but also add a tzwdog timer
* which will reset the system eventually. * which will reset the system eventually.
*/ */
tf_printf("Failed to load boot loader stage 2 (BL2) firmware.\n"); ERROR("Failed to load BL2 firmware.\n");
panic(); panic();
} }
/* /*
...@@ -165,14 +167,13 @@ void bl1_main(void) ...@@ -165,14 +167,13 @@ void bl1_main(void)
bl1_plat_set_bl2_ep_info(&bl2_image_info, &bl2_ep); bl1_plat_set_bl2_ep_info(&bl2_image_info, &bl2_ep);
bl2_ep.args.arg1 = (unsigned long)bl2_tzram_layout; bl2_ep.args.arg1 = (unsigned long)bl2_tzram_layout;
tf_printf("Booting trusted firmware boot loader stage 2\n"); NOTICE("BL1: Booting BL2\n");
#if DEBUG INFO("BL1: BL2 address = 0x%llx\n",
tf_printf("BL2 address = 0x%llx\n",
(unsigned long long) bl2_ep.pc); (unsigned long long) bl2_ep.pc);
tf_printf("BL2 cpsr = 0x%x\n", bl2_ep.spsr); INFO("BL1: BL2 spsr = 0x%x\n", bl2_ep.spsr);
tf_printf("BL2 memory layout address = 0x%llx\n", VERBOSE("BL1: BL2 memory layout address = 0x%llx\n",
(unsigned long long) bl2_tzram_layout); (unsigned long long) bl2_tzram_layout);
#endif
bl1_run_bl2(&bl2_ep); bl1_run_bl2(&bl2_ep);
return; return;
...@@ -184,14 +185,13 @@ void bl1_main(void) ...@@ -184,14 +185,13 @@ void bl1_main(void)
******************************************************************************/ ******************************************************************************/
void display_boot_progress(entry_point_info_t *bl31_ep_info) void display_boot_progress(entry_point_info_t *bl31_ep_info)
{ {
tf_printf("Booting trusted firmware boot loader stage 3\n\r"); NOTICE("BL1: Booting BL3-1\n");
#if DEBUG INFO("BL1: BL3-1 address = 0x%llx\n",
tf_printf("BL31 address = 0x%llx\n", (unsigned long long)bl31_ep_info->pc); (unsigned long long)bl31_ep_info->pc);
tf_printf("BL31 cpsr = 0x%llx\n", (unsigned long long)bl31_ep_info->spsr); INFO("BL1: BL3-1 spsr = 0x%llx\n",
tf_printf("BL31 params address = 0x%llx\n", (unsigned long long)bl31_ep_info->spsr);
(unsigned long long)bl31_ep_info->args.arg0); INFO("BL1: BL3-1 params address = 0x%llx\n",
tf_printf("BL31 plat params address = 0x%llx\n", (unsigned long long)bl31_ep_info->args.arg0);
(unsigned long long)bl31_ep_info->args.arg1); INFO("BL1: BL3-1 plat params address = 0x%llx\n",
#endif (unsigned long long)bl31_ep_info->args.arg1);
return;
} }
...@@ -59,6 +59,7 @@ static int load_bl30(void) ...@@ -59,6 +59,7 @@ static int load_bl30(void)
* The entry point information is not relevant in this case as the AP * The entry point information is not relevant in this case as the AP
* won't execute the BL3-0 image. * won't execute the BL3-0 image.
*/ */
INFO("BL2: Loading BL3-0\n");
bl2_plat_get_bl30_meminfo(&bl30_mem_info); bl2_plat_get_bl30_meminfo(&bl30_mem_info);
e = load_image(&bl30_mem_info, e = load_image(&bl30_mem_info,
BL30_IMAGE_NAME, BL30_IMAGE_NAME,
...@@ -87,6 +88,7 @@ static int load_bl31(bl31_params_t *bl2_to_bl31_params, ...@@ -87,6 +88,7 @@ static int load_bl31(bl31_params_t *bl2_to_bl31_params,
meminfo_t *bl2_tzram_layout; meminfo_t *bl2_tzram_layout;
int e; int e;
INFO("BL2: Loading BL3-1\n");
assert(bl2_to_bl31_params != NULL); assert(bl2_to_bl31_params != NULL);
assert(bl31_ep_info != NULL); assert(bl31_ep_info != NULL);
...@@ -125,6 +127,7 @@ static int load_bl32(bl31_params_t *bl2_to_bl31_params) ...@@ -125,6 +127,7 @@ static int load_bl32(bl31_params_t *bl2_to_bl31_params)
#ifdef BL32_BASE #ifdef BL32_BASE
meminfo_t bl32_mem_info; meminfo_t bl32_mem_info;
INFO("BL2: Loading BL3-2\n");
assert(bl2_to_bl31_params != NULL); assert(bl2_to_bl31_params != NULL);
/* /*
...@@ -160,6 +163,7 @@ static int load_bl33(bl31_params_t *bl2_to_bl31_params) ...@@ -160,6 +163,7 @@ static int load_bl33(bl31_params_t *bl2_to_bl31_params)
meminfo_t bl33_mem_info; meminfo_t bl33_mem_info;
int e; int e;
INFO("BL2: Loading BL3-3\n");
assert(bl2_to_bl31_params != NULL); assert(bl2_to_bl31_params != NULL);
bl2_plat_get_bl33_meminfo(&bl33_mem_info); bl2_plat_get_bl33_meminfo(&bl33_mem_info);
...@@ -189,15 +193,15 @@ void bl2_main(void) ...@@ -189,15 +193,15 @@ void bl2_main(void)
entry_point_info_t *bl31_ep_info; entry_point_info_t *bl31_ep_info;
int e; int e;
NOTICE("BL2: %s\n", version_string);
NOTICE("BL2: %s\n", build_message);
/* Perform remaining generic architectural setup in S-EL1 */ /* Perform remaining generic architectural setup in S-EL1 */
bl2_arch_setup(); bl2_arch_setup();
/* Perform platform setup in BL2 */ /* Perform platform setup in BL2 */
bl2_platform_setup(); bl2_platform_setup();
tf_printf("BL2 %s\n", version_string);
tf_printf("BL2 %s\n", build_message);
/* /*
* Load the subsequent bootloader images * Load the subsequent bootloader images
*/ */
......
...@@ -71,19 +71,20 @@ void bl31_lib_init(void) ...@@ -71,19 +71,20 @@ void bl31_lib_init(void)
******************************************************************************/ ******************************************************************************/
void bl31_main(void) void bl31_main(void)
{ {
NOTICE("BL3-1: %s\n", version_string);
NOTICE("BL3-1: %s\n", build_message);
/* Perform remaining generic architectural setup from EL3 */ /* Perform remaining generic architectural setup from EL3 */
bl31_arch_setup(); bl31_arch_setup();
/* Perform platform setup in BL1 */ /* Perform platform setup in BL1 */
bl31_platform_setup(); bl31_platform_setup();
tf_printf("BL31 %s\n", version_string);
tf_printf("BL31 %s\n", build_message);
/* Initialise helper libraries */ /* Initialise helper libraries */
bl31_lib_init(); bl31_lib_init();
/* Initialize the runtime services e.g. psci */ /* Initialize the runtime services e.g. psci */
INFO("BL3-1: Initializing runtime services\n");
runtime_svc_init(); runtime_svc_init();
/* Clean caches before re-entering normal world */ /* Clean caches before re-entering normal world */
...@@ -102,9 +103,10 @@ void bl31_main(void) ...@@ -102,9 +103,10 @@ void bl31_main(void)
/* /*
* If SPD had registerd an init hook, invoke it. * If SPD had registerd an init hook, invoke it.
*/ */
if (bl32_init) if (bl32_init) {
INFO("BL3-1: Initializing BL3-2\n");
(*bl32_init)(); (*bl32_init)();
}
/* /*
* We are ready to enter the next EL. Prepare entry into the image * We are ready to enter the next EL. Prepare entry into the image
* corresponding to the desired security state after the next ERET. * corresponding to the desired security state after the next ERET.
...@@ -148,6 +150,11 @@ void bl31_prepare_next_image_entry(void) ...@@ -148,6 +150,11 @@ void bl31_prepare_next_image_entry(void)
assert(next_image_info); assert(next_image_info);
assert(image_type == GET_SECURITY_STATE(next_image_info->h.attr)); assert(image_type == GET_SECURITY_STATE(next_image_info->h.attr));
INFO("BL3-1: Preparing for EL3 exit to %s world\n",
(image_type == SECURE) ? "secure" : "normal");
INFO("BL3-1: Next image address = 0x%llx\n",
(unsigned long long) next_image_info->pc);
INFO("BL3-1: Next image spsr = 0x%x\n", next_image_info->spsr);
cm_init_context(read_mpidr_el1(), next_image_info); cm_init_context(read_mpidr_el1(), next_image_info);
cm_prepare_el3_exit(image_type); cm_prepare_el3_exit(image_type);
} }
......
...@@ -55,14 +55,16 @@ void tsp_update_sync_fiq_stats(uint32_t type, uint64_t elr_el3) ...@@ -55,14 +55,16 @@ void tsp_update_sync_fiq_stats(uint32_t type, uint64_t elr_el3)
if (type == TSP_HANDLE_FIQ_AND_RETURN) if (type == TSP_HANDLE_FIQ_AND_RETURN)
tsp_stats[linear_id].sync_fiq_ret_count++; tsp_stats[linear_id].sync_fiq_ret_count++;
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("TSP: cpu 0x%x sync fiq request from 0x%llx \n\r", VERBOSE("TSP: cpu 0x%x sync fiq request from 0x%llx\n",
mpidr, elr_el3); mpidr, elr_el3);
INFO("cpu 0x%x: %d sync fiq requests, %d sync fiq returns\n", VERBOSE("TSP: cpu 0x%x: %d sync fiq requests, %d sync fiq returns\n",
mpidr, mpidr,
tsp_stats[linear_id].sync_fiq_count, tsp_stats[linear_id].sync_fiq_count,
tsp_stats[linear_id].sync_fiq_ret_count); tsp_stats[linear_id].sync_fiq_ret_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
} }
/******************************************************************************* /*******************************************************************************
...@@ -99,13 +101,14 @@ int32_t tsp_fiq_handler(void) ...@@ -99,13 +101,14 @@ int32_t tsp_fiq_handler(void)
/* Update the statistics and print some messages */ /* Update the statistics and print some messages */
tsp_stats[linear_id].fiq_count++; tsp_stats[linear_id].fiq_count++;
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("TSP: cpu 0x%x handled fiq %d \n\r", VERBOSE("TSP: cpu 0x%x handled fiq %d\n",
mpidr, id); mpidr, id);
INFO("cpu 0x%x: %d fiq requests \n", VERBOSE("TSP: cpu 0x%x: %d fiq requests\n",
mpidr, tsp_stats[linear_id].fiq_count); mpidr, tsp_stats[linear_id].fiq_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
return 0; return 0;
} }
...@@ -115,11 +118,12 @@ int32_t tsp_irq_received(void) ...@@ -115,11 +118,12 @@ int32_t tsp_irq_received(void)
uint32_t linear_id = platform_get_core_pos(mpidr); uint32_t linear_id = platform_get_core_pos(mpidr);
tsp_stats[linear_id].irq_count++; tsp_stats[linear_id].irq_count++;
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("TSP: cpu 0x%x received irq\n\r", mpidr); VERBOSE("TSP: cpu 0x%x received irq\n", mpidr);
INFO("cpu 0x%x: %d irq requests \n", VERBOSE("TSP: cpu 0x%x: %d irq requests\n",
mpidr, tsp_stats[linear_id].irq_count); mpidr, tsp_stats[linear_id].irq_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
return TSP_PREEMPTED; return TSP_PREEMPTED;
} }
...@@ -105,6 +105,12 @@ static tsp_args_t *set_smc_args(uint64_t arg0, ...@@ -105,6 +105,12 @@ static tsp_args_t *set_smc_args(uint64_t arg0,
******************************************************************************/ ******************************************************************************/
uint64_t tsp_main(void) uint64_t tsp_main(void)
{ {
NOTICE("TSP: %s\n", version_string);
NOTICE("TSP: %s\n", build_message);
INFO("TSP: Total memory base : 0x%x\n", (unsigned long)BL32_TOTAL_BASE);
INFO("TSP: Total memory size : 0x%x bytes\n",
(unsigned long)(BL32_TOTAL_LIMIT - BL32_TOTAL_BASE));
uint64_t mpidr = read_mpidr(); uint64_t mpidr = read_mpidr();
uint32_t linear_id = platform_get_core_pos(mpidr); uint32_t linear_id = platform_get_core_pos(mpidr);
...@@ -119,18 +125,14 @@ uint64_t tsp_main(void) ...@@ -119,18 +125,14 @@ uint64_t tsp_main(void)
tsp_stats[linear_id].eret_count++; tsp_stats[linear_id].eret_count++;
tsp_stats[linear_id].cpu_on_count++; tsp_stats[linear_id].cpu_on_count++;
#if LOG_LEVEL >= LOG_LEVEL_INFO
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("TSP %s\n", version_string); INFO("TSP: cpu 0x%x: %d smcs, %d erets %d cpu on requests\n", mpidr,
tf_printf("TSP %s\n", build_message);
INFO("Total memory base : 0x%x\n", (unsigned long)BL32_TOTAL_BASE);
INFO("Total memory size : 0x%x bytes\n",
(unsigned long)(BL32_TOTAL_LIMIT - BL32_TOTAL_BASE));
INFO("cpu 0x%x: %d smcs, %d erets %d cpu on requests\n", mpidr,
tsp_stats[linear_id].smc_count, tsp_stats[linear_id].smc_count,
tsp_stats[linear_id].eret_count, tsp_stats[linear_id].eret_count,
tsp_stats[linear_id].cpu_on_count); tsp_stats[linear_id].cpu_on_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
return (uint64_t) &tsp_vector_table; return (uint64_t) &tsp_vector_table;
} }
...@@ -152,14 +154,15 @@ tsp_args_t *tsp_cpu_on_main(void) ...@@ -152,14 +154,15 @@ tsp_args_t *tsp_cpu_on_main(void)
tsp_stats[linear_id].eret_count++; tsp_stats[linear_id].eret_count++;
tsp_stats[linear_id].cpu_on_count++; tsp_stats[linear_id].cpu_on_count++;
#if LOG_LEVEL >= LOG_LEVEL_INFO
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("SP: cpu 0x%x turned on\n\r", mpidr); INFO("TSP: cpu 0x%x turned on\n", mpidr);
INFO("cpu 0x%x: %d smcs, %d erets %d cpu on requests\n", mpidr, INFO("TSP: cpu 0x%x: %d smcs, %d erets %d cpu on requests\n", mpidr,
tsp_stats[linear_id].smc_count, tsp_stats[linear_id].smc_count,
tsp_stats[linear_id].eret_count, tsp_stats[linear_id].eret_count,
tsp_stats[linear_id].cpu_on_count); tsp_stats[linear_id].cpu_on_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
/* Indicate to the SPD that we have completed turned ourselves on */ /* Indicate to the SPD that we have completed turned ourselves on */
return set_smc_args(TSP_ON_DONE, 0, 0, 0, 0, 0, 0, 0); return set_smc_args(TSP_ON_DONE, 0, 0, 0, 0, 0, 0, 0);
} }
...@@ -192,14 +195,15 @@ tsp_args_t *tsp_cpu_off_main(uint64_t arg0, ...@@ -192,14 +195,15 @@ tsp_args_t *tsp_cpu_off_main(uint64_t arg0,
tsp_stats[linear_id].eret_count++; tsp_stats[linear_id].eret_count++;
tsp_stats[linear_id].cpu_off_count++; tsp_stats[linear_id].cpu_off_count++;
#if LOG_LEVEL >= LOG_LEVEL_INFO
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("SP: cpu 0x%x off request\n\r", mpidr); INFO("TSP: cpu 0x%x off request\n", mpidr);
INFO("cpu 0x%x: %d smcs, %d erets %d cpu off requests\n", mpidr, INFO("TSP: cpu 0x%x: %d smcs, %d erets %d cpu off requests\n", mpidr,
tsp_stats[linear_id].smc_count, tsp_stats[linear_id].smc_count,
tsp_stats[linear_id].eret_count, tsp_stats[linear_id].eret_count,
tsp_stats[linear_id].cpu_off_count); tsp_stats[linear_id].cpu_off_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
/* Indicate to the SPD that we have completed this request */ /* Indicate to the SPD that we have completed this request */
return set_smc_args(TSP_OFF_DONE, 0, 0, 0, 0, 0, 0, 0); return set_smc_args(TSP_OFF_DONE, 0, 0, 0, 0, 0, 0, 0);
...@@ -234,14 +238,17 @@ tsp_args_t *tsp_cpu_suspend_main(uint64_t power_state, ...@@ -234,14 +238,17 @@ tsp_args_t *tsp_cpu_suspend_main(uint64_t power_state,
tsp_stats[linear_id].eret_count++; tsp_stats[linear_id].eret_count++;
tsp_stats[linear_id].cpu_suspend_count++; tsp_stats[linear_id].cpu_suspend_count++;
#if LOG_LEVEL >= LOG_LEVEL_INFO
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("SP: cpu 0x%x suspend request. power state: 0x%x\n\r", INFO("TSP: cpu 0x%x suspend request. power state: 0x%x\n",
mpidr, power_state); mpidr, power_state);
INFO("cpu 0x%x: %d smcs, %d erets %d cpu suspend requests\n", mpidr, INFO("TSP: cpu 0x%x: %d smcs, %d erets %d cpu suspend requests\n",
tsp_stats[linear_id].smc_count, mpidr,
tsp_stats[linear_id].eret_count, tsp_stats[linear_id].smc_count,
tsp_stats[linear_id].cpu_suspend_count); tsp_stats[linear_id].eret_count,
tsp_stats[linear_id].cpu_suspend_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
/* Indicate to the SPD that we have completed this request */ /* Indicate to the SPD that we have completed this request */
return set_smc_args(TSP_SUSPEND_DONE, 0, 0, 0, 0, 0, 0, 0); return set_smc_args(TSP_SUSPEND_DONE, 0, 0, 0, 0, 0, 0, 0);
...@@ -272,15 +279,17 @@ tsp_args_t *tsp_cpu_resume_main(uint64_t suspend_level, ...@@ -272,15 +279,17 @@ tsp_args_t *tsp_cpu_resume_main(uint64_t suspend_level,
tsp_stats[linear_id].eret_count++; tsp_stats[linear_id].eret_count++;
tsp_stats[linear_id].cpu_resume_count++; tsp_stats[linear_id].cpu_resume_count++;
#if LOG_LEVEL >= LOG_LEVEL_INFO
spin_lock(&console_lock); spin_lock(&console_lock);
tf_printf("SP: cpu 0x%x resumed. suspend level %d \n\r", INFO("TSP: cpu 0x%x resumed. suspend level %d\n",
mpidr, suspend_level); mpidr, suspend_level);
INFO("cpu 0x%x: %d smcs, %d erets %d cpu suspend requests\n", mpidr, INFO("TSP: cpu 0x%x: %d smcs, %d erets %d cpu suspend requests\n",
tsp_stats[linear_id].smc_count, mpidr,
tsp_stats[linear_id].eret_count, tsp_stats[linear_id].smc_count,
tsp_stats[linear_id].cpu_suspend_count); tsp_stats[linear_id].eret_count,
tsp_stats[linear_id].cpu_suspend_count);
spin_unlock(&console_lock); spin_unlock(&console_lock);
#endif
/* Indicate to the SPD that we have completed this request */ /* Indicate to the SPD that we have completed this request */
return set_smc_args(TSP_RESUME_DONE, 0, 0, 0, 0, 0, 0, 0); return set_smc_args(TSP_RESUME_DONE, 0, 0, 0, 0, 0, 0, 0);
} }
...@@ -304,18 +313,17 @@ tsp_args_t *tsp_smc_handler(uint64_t func, ...@@ -304,18 +313,17 @@ tsp_args_t *tsp_smc_handler(uint64_t func,
uint64_t service_args[2]; uint64_t service_args[2];
uint64_t mpidr = read_mpidr(); uint64_t mpidr = read_mpidr();
uint32_t linear_id = platform_get_core_pos(mpidr); uint32_t linear_id = platform_get_core_pos(mpidr);
const char *smc_type;
/* Update this cpu's statistics */ /* Update this cpu's statistics */
tsp_stats[linear_id].smc_count++; tsp_stats[linear_id].smc_count++;
tsp_stats[linear_id].eret_count++; tsp_stats[linear_id].eret_count++;
smc_type = ((func >> 31) & 1) == 1 ? "fast" : "standard"; INFO("TSP: cpu 0x%x received %s smc 0x%x\n", read_mpidr(),
((func >> 31) & 1) == 1 ? "fast" : "standard",
tf_printf("SP: cpu 0x%x received %s smc 0x%x\n", read_mpidr(), smc_type, func); func);
INFO("cpu 0x%x: %d smcs, %d erets\n", mpidr, INFO("TSP: cpu 0x%x: %d smcs, %d erets\n", mpidr,
tsp_stats[linear_id].smc_count, tsp_stats[linear_id].smc_count,
tsp_stats[linear_id].eret_count); tsp_stats[linear_id].eret_count);
/* Render secure services and obtain results here */ /* Render secure services and obtain results here */
results[0] = arg1; results[0] = arg1;
......
...@@ -137,7 +137,7 @@ void reserve_mem(uint64_t *free_base, size_t *free_size, ...@@ -137,7 +137,7 @@ void reserve_mem(uint64_t *free_base, size_t *free_size,
if (pos == BOTTOM) if (pos == BOTTOM)
*free_base = addr + size; *free_base = addr + size;
INFO("Reserved %u bytes (discarded %u bytes %s)\n", VERBOSE("Reserved %u bytes (discarded %u bytes %s)\n",
reserved_size, discard_size, reserved_size, discard_size,
pos == TOP ? "above" : "below"); pos == TOP ? "above" : "below");
} }
...@@ -146,15 +146,13 @@ static void dump_load_info(unsigned long image_load_addr, ...@@ -146,15 +146,13 @@ static void dump_load_info(unsigned long image_load_addr,
unsigned long image_size, unsigned long image_size,
const meminfo_t *mem_layout) const meminfo_t *mem_layout)
{ {
#if DEBUG INFO("Trying to load image at address 0x%lx, size = 0x%lx\n",
tf_printf("Trying to load image at address 0x%lx, size = 0x%lx\r\n",
image_load_addr, image_size); image_load_addr, image_size);
tf_printf("Current memory layout:\r\n"); INFO("Current memory layout:\n");
tf_printf(" total region = [0x%lx, 0x%lx]\r\n", mem_layout->total_base, INFO(" total region = [0x%lx, 0x%lx]\n", mem_layout->total_base,
mem_layout->total_base + mem_layout->total_size); mem_layout->total_base + mem_layout->total_size);
tf_printf(" free region = [0x%lx, 0x%lx]\r\n", mem_layout->free_base, INFO(" free region = [0x%lx, 0x%lx]\n", mem_layout->free_base,
mem_layout->free_base + mem_layout->free_size); mem_layout->free_base + mem_layout->free_size);
#endif
} }
/* Generic function to return the size of an image */ /* Generic function to return the size of an image */
......
...@@ -215,7 +215,7 @@ static int fip_dev_init(io_dev_info_t *dev_info, const uintptr_t init_params) ...@@ -215,7 +215,7 @@ static int fip_dev_init(io_dev_info_t *dev_info, const uintptr_t init_params)
WARN("Firmware Image Package header check failed.\n"); WARN("Firmware Image Package header check failed.\n");
result = IO_FAIL; result = IO_FAIL;
} else { } else {
INFO("FIP header looks OK.\n"); VERBOSE("FIP header looks OK.\n");
} }
} }
......
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h> #include <debug.h>
/* /*
* This is a basic implementation. This could be improved. * This is a basic implementation. This could be improved.
*/ */
void abort (void) void abort (void)
{ {
printf("ABORT\n\r"); ERROR("ABORT\n");
while(1); panic();
} }
...@@ -36,6 +36,6 @@ ...@@ -36,6 +36,6 @@
void __assert (const char *function, const char *file, unsigned int line, void __assert (const char *function, const char *file, unsigned int line,
const char *assertion) const char *assertion)
{ {
tf_printf("ASSERT: %s <%d> : %s\n\r", function, line, assertion); tf_printf("ASSERT: %s <%d> : %s\n", function, line, assertion);
while(1); while(1);
} }
...@@ -87,9 +87,6 @@ void bl1_early_platform_setup(void) ...@@ -87,9 +87,6 @@ void bl1_early_platform_setup(void)
BL1_RAM_BASE, BL1_RAM_BASE,
bl1_size); bl1_size);
INFO("BL1: 0x%lx - 0x%lx [size = %u]\n", BL1_RAM_BASE, BL1_RAM_LIMIT,
bl1_size);
/* Initialize the platform config for future decision making */ /* Initialize the platform config for future decision making */
fvp_config_setup(); fvp_config_setup();
} }
......
...@@ -127,7 +127,7 @@ static int open_fip(const uintptr_t spec) ...@@ -127,7 +127,7 @@ static int open_fip(const uintptr_t spec)
/* See if a Firmware Image Package is available */ /* See if a Firmware Image Package is available */
result = io_dev_init(fip_dev_handle, (uintptr_t)FIP_IMAGE_NAME); result = io_dev_init(fip_dev_handle, (uintptr_t)FIP_IMAGE_NAME);
if (result == IO_SUCCESS) { if (result == IO_SUCCESS) {
INFO("Using FIP\n"); VERBOSE("Using FIP\n");
/*TODO: Check image defined in spec is present in FIP. */ /*TODO: Check image defined in spec is present in FIP. */
} }
return result; return result;
...@@ -143,7 +143,7 @@ static int open_memmap(const uintptr_t spec) ...@@ -143,7 +143,7 @@ static int open_memmap(const uintptr_t spec)
if (result == IO_SUCCESS) { if (result == IO_SUCCESS) {
result = io_open(memmap_dev_handle, spec, &local_image_handle); result = io_open(memmap_dev_handle, spec, &local_image_handle);
if (result == IO_SUCCESS) { if (result == IO_SUCCESS) {
/* INFO("Using Memmap IO\n"); */ VERBOSE("Using Memmap IO\n");
io_close(local_image_handle); io_close(local_image_handle);
} }
} }
...@@ -161,7 +161,7 @@ static int open_semihosting(const uintptr_t spec) ...@@ -161,7 +161,7 @@ static int open_semihosting(const uintptr_t spec)
if (result == IO_SUCCESS) { if (result == IO_SUCCESS) {
result = io_open(sh_dev_handle, spec, &local_image_handle); result = io_open(sh_dev_handle, spec, &local_image_handle);
if (result == IO_SUCCESS) { if (result == IO_SUCCESS) {
INFO("Using Semi-hosting IO\n"); VERBOSE("Using Semi-hosting IO\n");
io_close(local_image_handle); io_close(local_image_handle);
} }
} }
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/* Size of cacheable stacks */ /* Size of cacheable stacks */
#define PLATFORM_STACK_SIZE 0x800 #define PLATFORM_STACK_SIZE 0x800
#define FIRMWARE_WELCOME_STR "Booting trusted firmware boot loader stage 1\n\r" #define FIRMWARE_WELCOME_STR "Booting Trusted Firmware\n"
/* Trusted Boot Firmware BL2 */ /* Trusted Boot Firmware BL2 */
#define BL2_IMAGE_NAME "bl2.bin" #define BL2_IMAGE_NAME "bl2.bin"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment