Strontium wrote:
> I haven't seen any Cortex A8 activity on the list, lately, so I wonder 
> if anyone has come across these issues.
>
> See attached script:
>
> I tried implementing the functions described in the Cortex A8 TRM.  I 
> was trying to see if I could read CPU ARM registers.
>
> The code seems to mostly work.
>
> Except for weird Cortex A8 things that don't seem to be documented, at 
> least I cant find them.
>
> 1. If I set bit 1 to 1, on a write to the DSCR the core restarts ??
Yes
> 2. If I write an instruction to the ITR, the "Execute Instruction 
> Enable" and "Halting debug-mode" bits in the DSCR randomly clear?
No,  Halting debug mode is dont care for debugging from the dap debug 
interface. We generate halting debug events anyway.
If the Execute Instruction Enable is not set AND the core is not halted, 
nothing happens, otherwise the instruction is fed into the core.
> 3. Even though DTRXfull in DSCR is set after writing the instruction 
> to ITR (as expected), reading the DTRTX returns invalid data (it seems 
> to be the data of the last write to ANY other debug register), BUT the 
> DTRXfull flag in the DSCR is cleared, indicating the register was 
> actually read?
>
Not for me :)
> Anyone have any ideas?  Anyone managed to read an ARM register through 
> this interface?
>
Yes it works.  It is also necessary to make sure taht the instruction 
has finised before issuing next instruction.
> I am obviously missing something important, but a days worth of 
> hacking and re-reading the cortex a8 TRM has bought me no closer.
# Halt
mww 0x54011090 1
# Instr enable
mww 0x54011088 0x2000
# check
mdw 0x54011080 4


# cspr
mww 0x54011084  0xE10F0000
# staus read and wait for instr completion
mdw 0x54011088
mww 0x54011084  0xEE000E15
mdw 0x54011080 4

# r1
mww 0x54011084  0xEE001E15
mdw 0x54011080 4

# pc
mww 0x54011084  0xE1A0000F
# staus read and wait for instr completion
mdw 0x54011088
mww 0x54011084  0xEE000E15
mdw 0x54011080 4


# r12
mww 0x54011084  0xEE00CE15
mdw 0x54011080 4


_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to