Skip to content

Strange GDB behaviour when modifying MMIO #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mchack-work opened this issue Jun 12, 2024 · 0 comments
Open

Strange GDB behaviour when modifying MMIO #22

mchack-work opened this issue Jun 12, 2024 · 0 comments

Comments

@mchack-work
Copy link
Member

When attaching GDB to the running qemu, for instance started with -s and -S, I expect to be able to examine and write to the memory mapped to hardware functions, too. Maybe this is a misunderstanding that it's possible? Or did we forget something? Let's investigate.

For instance:

(gdb) set *0x40000000 = 0xabababab
(gdb) x/4b 0x40000000
0x40000000:	0xab	0xab	0xab	0xab
(gdb) set *0xd0000000 = 0xabababab
(gdb) x/4b 0xd0000000
0xd0000000:	0x00	0x00	0x00	0x00

What? Here I'm modifying RAM at 0x40000000. That works OK. Then I'm trying to change FW_RAM at 0xd0000000. Nope.

I added debug prints to tk1_mmio_read() and _write(). Only read() is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant