write progbuf via DMI

compliance_dev
Gleb Gagarin 2018-02-22 14:27:25 -08:00
parent e73d82e3d6
commit 353cf212bd
1 changed files with 8 additions and 1 deletions

View File

@ -2227,7 +2227,14 @@ int riscv013_test_compliance(struct target *target) {
LOG_INFO("Trying to write zeroes into Debug ROM"); LOG_INFO("Trying to write zeroes into Debug ROM");
uint8_t b[256] = {}; uint8_t b[256] = {};
write_memory(target, 0x800, 4, 24, b); write_memory(target, 0x800, 4, 24, b);
write_memory(target, 0x280, 4, 40, b);
for (int i = 0; i < 16; i++) {
dmi_write(target, 0x20 + i, 0);
}
for (int i = 0; i < 16; i++) {
dmi_write(target, 0x20 + i, 0xffffffff);
}
dmcontrol = set_field(dmcontrol_orig, hartsel_mask(target), RISCV_MAX_HARTS-1); dmcontrol = set_field(dmcontrol_orig, hartsel_mask(target), RISCV_MAX_HARTS-1);
dmi_write(target, DMI_DMCONTROL, dmcontrol); dmi_write(target, DMI_DMCONTROL, dmcontrol);