Skip to content

Commit

Permalink
soc_qemu: update UART support
Browse files Browse the repository at this point in the history
This commit adds missing DEBUG trace_id for QEMU UART driver.

Signed-off-by: Stephany Gamiz <quic_sgamiz@quicinc.com>
  • Loading branch information
quic-sgamiz authored and quic-cvanscha committed Oct 27, 2021
1 parent 0579fe3 commit 808b386
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions hyp/interfaces/trace/trace.tc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ define trace_class enumeration() {
define trace_id enumeration(explicit) {
INFO = 0;
WARN = 1;
DEBUG = 3;
};

#if defined(HYPERCALLS)
Expand Down
2 changes: 1 addition & 1 deletion hyp/misc/log_standard/src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ log_standard_handle_trace_log(trace_id_t id, trace_action_t action,
arg3, arg4);
if (ret.e == ERROR_STRING_TRUNCATED) {
size = LOG_TEMP_BUFFER_SIZE;
} else if (ret.e == ERROR_STRING_MISSING_ARGUMENT) {
} else if ((ret.e == ERROR_STRING_MISSING_ARGUMENT) || (ret.r == 0U)) {
goto out;
} else {
size = ret.r + 1;
Expand Down
6 changes: 1 addition & 5 deletions hyp/platform/soc_qemu/src/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ soc_qemu_handle_log_message(trace_id_t id, const char *str)
soc_qemu_console_puts(str);
#else
if ((id == TRACE_ID_WARN) || (id == TRACE_ID_PANIC) ||
(id == TRACE_ID_ASSERT_FAILED) ||
#if defined(INTERFACE_TESTS)
(id == TRACE_ID_TEST) ||
#endif
(id == TRACE_ID_DEBUG)) {
(id == TRACE_ID_ASSERT_FAILED) || (id == TRACE_ID_DEBUG)) {
soc_qemu_console_puts(str);
}
#endif
Expand Down

0 comments on commit 808b386

Please sign in to comment.