mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-23 13:36:05 +00:00
Bug fix: Protect TSP prints with lock
CPUs use console to print debug/info messages. This critical section must be guarded by locks to avoid overlaps in messages from multiple CPUs. Change-Id: I786bf90072c1ed73c4f53d8c950979d95255e67e Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
This commit is contained in:
parent
c979685271
commit
ae7b922d87
1 changed files with 4 additions and 0 deletions
|
@ -371,12 +371,16 @@ tsp_args_t *tsp_smc_handler(uint64_t func,
|
||||||
tsp_stats[linear_id].smc_count++;
|
tsp_stats[linear_id].smc_count++;
|
||||||
tsp_stats[linear_id].eret_count++;
|
tsp_stats[linear_id].eret_count++;
|
||||||
|
|
||||||
|
#if LOG_LEVEL >= LOG_LEVEL_INFO
|
||||||
|
spin_lock(&console_lock);
|
||||||
INFO("TSP: cpu 0x%lx received %s smc 0x%llx\n", read_mpidr(),
|
INFO("TSP: cpu 0x%lx received %s smc 0x%llx\n", read_mpidr(),
|
||||||
((func >> 31) & 1) == 1 ? "fast" : "yielding",
|
((func >> 31) & 1) == 1 ? "fast" : "yielding",
|
||||||
func);
|
func);
|
||||||
INFO("TSP: cpu 0x%lx: %d smcs, %d erets\n", read_mpidr(),
|
INFO("TSP: cpu 0x%lx: %d smcs, %d erets\n", read_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);
|
||||||
|
spin_unlock(&console_lock);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Render secure services and obtain results here */
|
/* Render secure services and obtain results here */
|
||||||
results[0] = arg1;
|
results[0] = arg1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue