From 50b9fc3b839a19725b0ddecd6b9500b5c317d91d Mon Sep 17 00:00:00 2001 From: Emmanuel Blot Date: Fri, 18 Aug 2023 19:28:47 +0200 Subject: [PATCH] [ot] hw/opentitan: fix trace levels: not an error if try function fails Signed-off-by: Emmanuel Blot --- hw/opentitan/ot_edn.c | 4 ++-- hw/opentitan/trace-events | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/opentitan/ot_edn.c b/hw/opentitan/ot_edn.c index fb8ec6580dcb..149ec7f25e38 100644 --- a/hw/opentitan/ot_edn.c +++ b/hw/opentitan/ot_edn.c @@ -563,7 +563,7 @@ static void ot_edn_try_auto_instantiate(OtEDNState *s) if (ot_fifo32_is_empty(&c->sw_cmd_fifo)) { /* instantiate command not yet loaded into the SW_CMD_REQ */ - xtrace_ot_edn_error(c->appid, "no SW cmd in FIFO"); + xtrace_ot_edn_xinfo(c->appid, "no SW cmd in FIFO", 0); return; } @@ -571,7 +571,7 @@ static void ot_edn_try_auto_instantiate(OtEDNState *s) uint32_t length = FIELD_EX32(command, OT_CSNRG_CMD, CLEN) + 1u; if (ot_fifo32_num_used(&c->sw_cmd_fifo) < length) { /* instantiate command not fully loaded into the SW_CMD_REQ */ - xtrace_ot_edn_error(c->appid, "SW cmd FIFO incomplete"); + xtrace_ot_edn_xinfo(c->appid, "SW cmd FIFO incomplete", 0); return; } diff --git a/hw/opentitan/trace-events b/hw/opentitan/trace-events index a8a3331028f4..4c3933357b01 100644 --- a/hw/opentitan/trace-events +++ b/hw/opentitan/trace-events @@ -100,7 +100,7 @@ ot_entropy_src_info(const char *msg) "%s" ot_entropy_src_init_ongoing(const char *state, int st) "entropy source still initializing in [%s:%u]" ot_entropy_src_io_read_out(unsigned int addr, const char * regname, uint64_t val, uint64_t pc) "addr=0x%02x (%s), val=0x%" PRIx64 ", pc=0x%" PRIx64 ot_entropy_src_io_write(unsigned int addr, const char * regname, uint64_t val, uint64_t pc) "addr=0x%02x (%s), val=0x%" PRIx64 ", pc=0x%" PRIx64 -ot_entropy_src_is_fips_capable(bool en, bool es_route, bool es_type, bool rng_bit_en, bool res) "en:%u rt:%u tp:%u rb:%u => %u" +ot_entropy_src_is_fips_capable(bool en, bool es_route, bool es_type, bool rng_bit_en, bool res) "en:%u rt:%u tp:%u !rb:%u => %u" ot_entropy_src_no_entropy(unsigned count) "only %u words available" ot_entropy_src_obs_fifo(unsigned level, unsigned thold) "level %u, threshold %u" ot_entropy_src_otp_conf(bool fw_read, bool fw_over) "fw_read %u, fw_over %u"