Try to zero out ROM

compliance_dev
Gleb Gagarin 2018-02-21 16:20:12 -08:00
parent 1b37f60969
commit f97e4b53e4
1 changed files with 4 additions and 0 deletions

View File

@ -2224,6 +2224,10 @@ int riscv013_test_compliance(struct target *target) {
uint32_t testvar;
riscv_reg_t value;
LOG_INFO("Trying to write zeroes into Debug ROM");
uint8_t b[100] = {};
write_memory(target, 0x800, 4, 24, b);
dmcontrol = set_field(dmcontrol_orig, hartsel_mask(target), RISCV_MAX_HARTS-1);
dmi_write(target, DMI_DMCONTROL, dmcontrol);
dmcontrol = dmi_read(target, DMI_DMCONTROL);