[SOLVED] ARM (Raspi) w/QEMU and ELF: Registers not set
Posted: Sun Jan 17, 2016 11:17 am
Hey guys! It's been a long time since I've posted here. I recently became interested in writing a fresh OS, this time for ARM (specifically Raspberry Pi), having previously done x86 and x86_64 systems.
I followed the bare bones stuff on the wiki and I am able to run it with the raspi fork of QEMU as shown at the very bottom.
However, the registers r1 and r2 are not getting set to the expected values (0xC42 and start of ATAGS, respectively). Browsing through the source code for QEMU I can definitely see stuff for setting up ATAGS, so why aren't I seeing it?
I realize that this is stuff that's normally done by a bootloader and I'm not really using a bootloader if I'm loading my kernel as an ELF directly with QEMU, but I thought it would pretend to be a bootloader in that case and get that all setup, as it appears to do in its source.
Anyone have any experience with this? Ideas?
Thanks!
I followed the bare bones stuff on the wiki and I am able to run it with the raspi fork of QEMU as shown at the very bottom.
However, the registers r1 and r2 are not getting set to the expected values (0xC42 and start of ATAGS, respectively). Browsing through the source code for QEMU I can definitely see stuff for setting up ATAGS, so why aren't I seeing it?
I realize that this is stuff that's normally done by a bootloader and I'm not really using a bootloader if I'm loading my kernel as an ELF directly with QEMU, but I thought it would pretend to be a bootloader in that case and get that all setup, as it appears to do in its source.
Anyone have any experience with this? Ideas?
Thanks!