Commit 6881f7be authored by Madhukar Pappireddy's avatar Madhukar Pappireddy Committed by TrustedFirmware Code Review
Browse files

Merge changes Ic7579b60,I05414ca1 into integration

* changes:
  fix(plat/ea_handler): print newline before fatal abort error message
  feat(common/debug): add new macro ERROR_NL() to print just a newline
parents 6ea1a75d a5fea810
......@@ -49,6 +49,20 @@ void tf_log(const char *fmt, ...)
va_end(args);
}
void tf_log_newline(const char log_fmt[2])
{
unsigned int log_level = log_fmt[0];
/* Verify that log_level is one of LOG_MARKER_* macro defined in debug.h */
assert((log_level > 0U) && (log_level <= LOG_LEVEL_VERBOSE));
assert((log_level % 10U) == 0U);
if (log_level > max_log_level)
return;
putchar('\n');
}
/*
* The helper function to set the log level dynamically by platform. The
* maximum log level is determined by `LOG_LEVEL` build flag at compile time
......
......@@ -61,8 +61,10 @@
#if LOG_LEVEL >= LOG_LEVEL_ERROR
# define ERROR(...) tf_log(LOG_MARKER_ERROR __VA_ARGS__)
# define ERROR_NL() tf_log_newline(LOG_MARKER_ERROR)
#else
# define ERROR(...) no_tf_log(LOG_MARKER_ERROR __VA_ARGS__)
# define ERROR_NL()
#endif
#if LOG_LEVEL >= LOG_LEVEL_NOTICE
......@@ -109,6 +111,7 @@ void __dead2 do_panic(void);
void __dead2 __stack_chk_fail(void);
void tf_log(const char *fmt, ...) __printflike(1, 2);
void tf_log_newline(const char log_fmt[2]);
void tf_log_set_max_level(unsigned int log_level);
#endif /* __ASSEMBLER__ */
......
......@@ -90,6 +90,7 @@ void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
#endif
unsigned int level = (unsigned int)GET_EL(read_spsr_el3());
ERROR_NL();
ERROR("Unhandled External Abort received on 0x%lx from %s\n",
read_mpidr_el1(), get_el_str(level));
ERROR("exception reason=%u syndrome=0x%llx\n", ea_reason, syndrome);
......
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