From 1518ba54a484f64ed8461e4af7ead093d1c97e86 Mon Sep 17 00:00:00 2001 From: rjkm Date: Fri, 20 Aug 2021 14:27:36 +0200 Subject: [PATCH] hexdump complete BIST info for debugging --- apps/ddinfo.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/ddinfo.c b/apps/ddinfo.c index 5cbe77a..c8bb6f0 100644 --- a/apps/ddinfo.c +++ b/apps/ddinfo.c @@ -30,6 +30,21 @@ char *Rolloff[8] = { "rsvd", }; +void dump(const uint8_t *b, int l) +{ + int i, j; + + for (j = 0; j < l; j += 16, b += 16) { + printf("%04x: ", j); + for (i = 0; i < 16; i++) + if (i + j < l) + printf("%02x ", b[i]); + else + printf(" "); + printf("\n"); + } +} + void print_temp(struct mci_result *res) { printf("Die temperature = %u\n", res->sx8_bist.temperature); @@ -55,6 +70,9 @@ int temp_info(int dev, uint32_t link) } print_temp(&msg.res); + printf("BIST info dump: "); + dump((uint8_t *) &msg.res, 16); + return ret; }