summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2019-02-11 07:48:45 -0500
committerTom St Denis <tom.stdenis@amd.com>2019-02-11 07:57:53 -0500
commit1a547e039c9795a2b520bd2a5c05f6352578ff7b (patch)
treeb4dbd1e643f56b932f2b2a56f05c140aa2e46dce
parent48f68b1eb172d436720b9e35fec8fa187fc3fdf5 (diff)
Also print waves that have a fatal_halt condition.
Based on a patch by Nicolai Hähnle <nicolai.haehnle@amd.com> that was accepted on an internal branch. Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
-rw-r--r--src/app/print_waves.c8
-rw-r--r--src/lib/lowlevel/linux/wave_status.c5
-rw-r--r--src/umr.h2
3 files changed, 8 insertions, 7 deletions
diff --git a/src/app/print_waves.c b/src/app/print_waves.c
index 8717093..dfce332 100644
--- a/src/app/print_waves.c
+++ b/src/app/print_waves.c
@@ -85,7 +85,7 @@ void umr_print_waves(struct umr_asic *asic)
(unsigned long)wd->ws.hw_id.value, (unsigned long)wd->ws.gpr_alloc.value, (unsigned long)wd->ws.lds_alloc.value, (unsigned long)wd->ws.trapsts.value, (unsigned long)wd->ws.ib_sts.value,
(unsigned long)wd->ws.tba_hi, (unsigned long)wd->ws.tba_lo, (unsigned long)wd->ws.tma_hi, (unsigned long)wd->ws.tma_lo, (unsigned long)wd->ws.ib_dbg0, (unsigned long)wd->ws.m0
);
- if (wd->ws.wave_status.halt) {
+ if (wd->ws.wave_status.halt || wd->ws.wave_status.fatal_halt) {
for (x = 0; x < ((wd->ws.gpr_alloc.sgpr_size + 1) << shift); x += 4)
printf(">SGPRS[%s%u%s..%s%u%s] = { %s%08lx%s, %s%08lx%s, %s%08lx%s, %s%08lx%s }\n",
YELLOW, (unsigned)(x), RST,
@@ -113,7 +113,7 @@ void umr_print_waves(struct umr_asic *asic)
}
}
}
- if (ring_halted && wd->ws.wave_status.halt) {
+ if (ring_halted && (wd->ws.wave_status.halt || wd->ws.wave_status.fatal_halt)) {
pgm_addr = (((uint64_t)wd->ws.pc_hi << 32) | wd->ws.pc_lo) - (NUM_OPCODE_WORDS*4)/2;
umr_vm_disasm(asic, wd->ws.hw_id.vm_id, pgm_addr, (((uint64_t)wd->ws.pc_hi << 32) | wd->ws.pc_lo), NUM_OPCODE_WORDS*4, 0, NULL);
}
@@ -180,7 +180,7 @@ void umr_print_waves(struct umr_asic *asic)
PP(gpr_alloc, sgpr_base);
PP(gpr_alloc, sgpr_size);
- if (wd->ws.wave_status.halt) {
+ if (wd->ws.wave_status.halt || wd->ws.wave_status.fatal_halt) {
printf("\n\nSGPRS:\n");
for (x = 0; x < ((wd->ws.gpr_alloc.sgpr_size + 1) << shift); x += 4)
printf("\t[%s%4u%s..%s%4u%s] = { %s%08lx%s, %s%08lx%s, %s%08lx%s, %s%08lx%s }\n",
@@ -236,7 +236,7 @@ void umr_print_waves(struct umr_asic *asic)
}
}
- if (ring_halted && wd->ws.wave_status.halt) {
+ if (ring_halted && (wd->ws.wave_status.halt || wd->ws.wave_status.fatal_halt)) {
printf("\n\nPGM_MEM:");
pgm_addr = (((uint64_t)wd->ws.pc_hi << 32) | wd->ws.pc_lo);
if (stream)
diff --git a/src/lib/lowlevel/linux/wave_status.c b/src/lib/lowlevel/linux/wave_status.c
index 1d48fb3..2e7f55b 100644
--- a/src/lib/lowlevel/linux/wave_status.c
+++ b/src/lib/lowlevel/linux/wave_status.c
@@ -258,9 +258,8 @@ static int umr_get_wave_status_ai(struct umr_asic *asic, unsigned se, unsigned s
ws->wave_status.perf_en = (value >> 0x13) & 1;
ws->wave_status.cond_dbg_user = (value >> 0x14) & 1;
ws->wave_status.cond_dbg_sys = (value >> 0x15) & 1;
- ws->wave_status.data_atc = (value >> 0x16) & 1;
- ws->wave_status.inst_atc = (value >> 0x17) & 1;
- ws->wave_status.dispatch_cache_ctrl = (value >> 0x18) & 3;
+ ws->wave_status.allow_replay = (value >> 0x16) & 1;
+ ws->wave_status.fatal_halt = (value >> 0x17) & 1;
ws->wave_status.must_export = (value >> 0x1b) & 1;
ws->pc_lo = buf[x++];
diff --git a/src/umr.h b/src/umr.h
index 07e49b1..71c067c 100644
--- a/src/umr.h
+++ b/src/umr.h
@@ -325,6 +325,8 @@ struct umr_wave_status {
perf_en,
cond_dbg_user,
cond_dbg_sys,
+ allow_replay,
+ fatal_halt,
data_atc,
inst_atc,
dispatch_cache_ctrl,