diff options
| author | Michael Neuling <mikey@neuling.org> | 2018-06-07 16:54:36 +1000 |
|---|---|---|
| committer | Alistair Popple <alistair@popple.id.au> | 2018-06-15 14:31:44 +1000 |
| commit | 08eef521d374c6fc46d7adb02f2958c10323086f (patch) | |
| tree | 71b2f594d5ddb51095ea0ed0d203b7370c6bb6c3 | |
| parent | 1d65f71ea32a722b221707e1d3a9f7a108c37be5 (diff) | |
| download | pdbg-08eef521d374c6fc46d7adb02f2958c10323086f.tar.gz pdbg-08eef521d374c6fc46d7adb02f2958c10323086f.zip | |
htm: Cleanup status output
Actually print something in status output. Drop some of the more
esoteric details to PR_INFO()
Signed-off-by: Michael Neuling <mikey@neuling.org>
| -rw-r--r-- | libpdbg/htm.c | 41 | ||||
| -rw-r--r-- | src/htm.c | 3 |
2 files changed, 21 insertions, 23 deletions
diff --git a/libpdbg/htm.c b/libpdbg/htm.c index 3a6187e..7009c40 100644 --- a/libpdbg/htm.c +++ b/libpdbg/htm.c @@ -789,18 +789,16 @@ static int do_htm_status(struct htm *htm) if (dt_node_is_compatible(&htm->target, "ibm,power9-nhtm")) regs++; - PR_DEBUG("HTM register dump:\n"); + PR_INFO("HTM register dump:\n"); for (i = 0; i < regs; i++) { if (HTM_ERR(pib_read(&htm->target, i, &val))) { PR_ERROR("Couldn't read HTM reg: %d\n", i); continue; } - PR_DEBUG(" %d: 0x%016" PRIx64 "\n", i, val); + PR_INFO(" %d: 0x%016" PRIx64 "\n", i, val); } - putchar('\n'); - PR_INFO("* Checking HTM status...\n"); if (HTM_ERR(get_status(htm, &status))) return -1; @@ -815,47 +813,48 @@ static int do_htm_status(struct htm *htm) } PR_DEBUG("HTM status : 0x%016" PRIx64 "\n", status.raw); - PR_INFO("State: "); + printf("State: "); switch (status.state) { case INIT: - PR_INFO("INIT"); + printf("INIT"); break; case PREREQ: - PR_INFO("PREREQ"); + printf("PREREQ"); break; case READY: - PR_INFO("READY"); + printf("READY"); break; case TRACING: - PR_INFO("TRACING"); + printf("TRACING"); break; case PAUSED: - PR_INFO("PAUSED"); + printf("PAUSED"); break; case FLUSH: - PR_INFO("FLUSH"); + printf("FLUSH"); break; case COMPLETE: - PR_INFO("COMPLETE"); + printf("COMPLETE"); break; case ENABLE: - PR_INFO("ENABLE"); + printf("ENABLE"); break; case STAMP: - PR_INFO("STAMP"); + printf("STAMP"); break; default: - PR_INFO("UNINITIALIZED"); + printf("UNINITIALIZED"); } - PR_INFO("\n"); + printf("\n"); - PR_INFO("HTM base addr : 0x%016" PRIx64 ", size: 0x%016" PRIx64 " ", - status.mem_base, total << 20); + printf("addr:0x%016" PRIx64 "\n", status.mem_base); + printf("size:0x%016" PRIx64 " ", total << 20); if (total > 512) - PR_INFO("[ %" PRIu64 "GB ]", total >> 10); + printf("[ %" PRIu64 "GB ]", total >> 10); else - PR_INFO("[ %" PRIu64 "MB ]", total); - PR_INFO("\n"); + printf("[ %" PRIu64 "MB ]", total); + printf("\n"); + printf("curr:0x%016" PRIx64 "\n", status.mem_last); return 1; } @@ -141,14 +141,13 @@ static int run_status(enum htm_type type, int optind, int argc, char *argv[]) if (target_is_disabled(target)) continue; - printf("HTM@"); + printf("Status HTM@"); print_htm_address(type, target); if (htm_status(target) != 1) { printf("Couldn't get HTM@"); print_htm_address(type, target); } rc++; - printf("\n\n"); } return rc; |

