X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETARM7.py;h=21f4fe7438d46276326d7838ec094dabd1c23a4e;hp=83fc5160e1412911bc0b6495b460087e3ed790aa;hb=46911acb1c879cf7f43f2ac0ae56478a1b4fee24;hpb=3fbd4830f8d8dc3011415f1aab574561f603cd6e diff --git a/client/GoodFETARM7.py b/client/GoodFETARM7.py index 83fc516..21f4fe7 100644 --- a/client/GoodFETARM7.py +++ b/client/GoodFETARM7.py @@ -133,7 +133,8 @@ ARM_INSTR_STR_R1_r0_4 = 0xe4801004L ARM_WRITE_MEM = ARM_INSTR_STR_R1_r0_4 ARM_INSTR_MRS_R0_CPSR = 0xe10f0000L ARM_INSTR_MSR_cpsr_cxsf_R0 =0xe12ff000L -ARM_INSTR_STMIA_R14_r0_rx = 0xE88E0000L # add up to 65k to indicate which registers... +ARM_INSTR_STMIA_R14_r0_rx = 0xE88e0000L # add up to 65k to indicate which registers... +ARM_INSTR_LDMIA_R14_r0_rx = 0xE89e0000L # add up to 65k to indicate which registers... ARM_STORE_MULTIPLE = ARM_INSTR_STMIA_R14_r0_rx ARM_INSTR_SKANKREGS = 0xE88F7fffL ARM_INSTR_CLOBBEREGS = 0xE89F7fffL @@ -183,6 +184,7 @@ DBGCTRLBITS = { 1< 0): + count = (wordcount, 0xe)[wordcount>0xd] + bitmask = LDM_BITMASKS[count] + self.ARMset_register(14,adr) + self.ARM_nop(1) + self.ARMdebuginstr(ARM_INSTR_LDMIA_R14_r0_rx | bitmask ,0) + #FIXME: do we need the extra nop here? + self.ARMrestart() + self.ARMwaitDBG() + output.extend([self.ARMget_register(x) for x in xrange(count)]) + wordcount -= count + adr += count*4 + print hex(adr) + # FIXME: handle the rest of the wordcount here. + return output def ARMwriteMem(self, adr, wordarray): r0 = self.ARMget_register(0); # store R0 and R1 r1 = self.ARMget_register(1);