crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
bq has quit [Remote host closed the connection]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
zjason has quit [Read error: Connection reset by peer]
noperator[m] has quit [Quit: You have been kicked for being idle]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Write error: Connection reset by peer]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
Phil has joined #openocd
Phil is now known as dinkelhacker
<dinkelhacker>
t
<dinkelhacker>
Hello, I'm experiencing sonme difference between the output of mdd and read_memory that I don't understand. `mdd 0x4001ad7000 1` prints `0x4001ad7000: 0000000001ad8003` which is what I expected. When I use `read_memory 0x4001ad7000 64 1` I get `0x7ffb01ad8003`.
<dinkelhacker>
So in the read_memory version the expected mempory content is actually present but I don't get where the 0x7bff in the beginning is coming from.
<dinkelhacker>
I even noticed that when I restart openocd those bytes change.
<borneoa_>
dinkelhacker: hello. What is the target CPU?
<dinkelhacker>
cortex-a72/aarch64 (raspberry pi4)
<dinkelhacker>
After restarting it I got -> read_memory 0x4001ad7000 64 1 0x7f0801ad8003 So now I have 0x7f08 in the beginning. It stays consistent during invocations of openocd.
<borneoa_>
dinkelhacker: if you are on Linux or Mac PC, can you try running OpenOCD in valgrind?
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
<dinkelhacker>
I'm on linux. Can you point me to any documentation on how to do that? Never heard of valgrind.
<dinkelhacker>
Oh and btw. I have build this patch of openocd https://review.openocd.org/c/openocd/+/5003 because I also need the msr command it provides. I don't know it it could be related.
dinkelhacker has quit [Remote host closed the connection]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #openocd
dinkelhacker has joined #openocd
dinkelhacker has quit [Quit: Client closed]
crabbedhaloablut has quit [Remote host closed the connection]
dinkelhacker has joined #openocd
dinkelhacker has quit [Client Quit]
crabbedhaloablut has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
wingsorc has quit [Ping timeout: 256 seconds]
dinkelhacker has joined #openocd
dinkelhacker has quit [Quit: Client closed]
Hawk777 has joined #openocd
dinkelhacker has joined #openocd
<dinkelhacker>
borneoa_: I've run it through valgrind and this is what I got https://pastebin.com/UpZj0nY9. Last call before it goes to libc is at `target_jim_read_memory (target.c:4721)`. I don't know if there is an obvious problem with the code at that part.
<dinkelhacker>
borneoa_: Also I noticed that this only happens with the 64 bit width. If I choose any of the other (8,16,32) everything is fine. I'll try to track this down but if you have any hint what's going on please let me know.
nerozero has quit [Ping timeout: 256 seconds]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
dinkelhacker has quit [Remote host closed the connection]
Hawk777 has quit [Quit: Leaving.]
<borneoa_>
dinkelhacker: you have already left IRC. I will reply again when you are back. In mean time, here is the answer.
<borneoa_>
dinkelhacker: both mdd and read_memory use similar code. The issue is in aarch64_read_cpu_memory() that does not handle at all 64 bits and falls back to 32 bits read. Then mdd allocates the buffer with calloc() so the MSB not read are zero. Instead read_memory uses malloc() and you get a not initialized MSB. Thanks for reporting it
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #openocd
wingsorc has joined #openocd
urja has quit [Ping timeout: 260 seconds]
urja has joined #openocd
crabbedhaloablut has quit [Remote host closed the connection]