Don't set abstractauto at the start

__archive__
Palmer Dabbelt 2017-03-23 14:50:40 -07:00
parent 84fa7aa916
commit 03fa9d22c4
1 changed files with 2 additions and 1 deletions

View File

@ -1859,11 +1859,12 @@ static int read_memory(struct target *target, uint32_t address,
return ERROR_FAIL;
}
dmi_write(target, DMI_ABSTRACTCS, DMI_ABSTRACTCS_CMDERR);
dmi_write(target, DMI_ABSTRACTAUTO, 0x1 << DMI_ABSTRACTAUTO_AUTOEXECDATA_OFFSET);
uint32_t abstractcs;
for (uint32_t i = 0; i < count; i++) {
uint32_t value = dmi_read(target, DMI_DATA0);
if (i == 0)
dmi_write(target, DMI_ABSTRACTAUTO, 0x1 << DMI_ABSTRACTAUTO_AUTOEXECDATA_OFFSET);
switch (size) {
case 1:
buffer[i] = value;