- I don't know if it's a Cygwin thing, but my gcc setup doesn't seem to like "org" without a "." before it.
- I think Qemu fixed the binary loading issue. The latest version loads the binary at 0x8000.
- Using Qemu's "raspi2" (and, I'm guessing, using an actual PI 2) gives you a 32-bit ARM with 4 cores, even if you override the cpu setting (and it rejects any number of cores below 4). There isn't any code for shutting off the extra cores, and letting them run can crash or mess up the kernel, so I rewrote the ARM64 cores code to work with raspi2's cortex-A7 (and also my 4-core arm1176 setup):
This goes right after "_start:" in the ARM32 code and replaces the "mov sp, #0x8000" line.
Code: Select all
mrc p15, 0, r5, c0, c0, 5 and r5, r5, #3 cmp r5, #0 bne halt ldr r5, =_start mov sp, r5
Some notes on PI development
-
- Posts: 2
- Joined: Sat Feb 09, 2019 8:43 pm
Some notes on PI development
Hello everyone! This is my first post on the forum, but I've been using the Pi development page for a while, and it's helped me a lot. Since then I've made a good amount of progress, and I wanted to share what I've found:
Re: Some notes on PI development
Don't think so. Keywords should be keywords under Cygwin too, so there should be a ".".AndrewIsOffline wrote:Hello everyone! This is my first post on the forum, but I've been using the Pi development page for a while, and it's helped me a lot. Since then I've made a good amount of progress, and I wanted to share what I've found:
- I don't know if it's a Cygwin thing, but my gcc setup doesn't seem to like "org" without a "." before it.
Yes, and I have also fixed the ARM64 loading issue with "raspi3". Thanks to Pekka, now it's in the qemu mainline, since 2.12.[*]I think Qemu fixed the binary loading issue. The latest version loads the binary at 0x8000.
You can't override the cpu setting because number of cores is fixed on the real machine. There is no way to use less cores on real hw, and qemu emulates that (correctly).[*]Using Qemu's "raspi2" (and, I'm guessing, using an actual PI 2) gives you a 32-bit ARM with 4 cores, even if you override the cpu setting (and it rejects any number of cores below 4).
Yes, that's needed, because ARM32 uses 4 cores now too.There isn't any code for shutting off the extra cores, and letting them run can crash or mess up the kernel, so I rewrote the ARM64 cores code to work with raspi2's cortex-A7 (and also my 4-core arm1176 setup): ... This goes right after "_start:" in the ARM32 code and replaces the "mov sp, #0x8000" line.[/list]
I'm sure it will help people. I'd say go ahead, update the wiki. We always welcome contributions!I hope this helps people here! I would post it on the wiki, but since I'm new I wanted to get feedback first.
Cheers,
bzt
-
- Posts: 2
- Joined: Sat Feb 09, 2019 8:43 pm
Re: Some notes on PI development
Okay, I'll post the changes. Thanks!
Also, the reason for my weird setup is because I'm using a Pi Zero for this project, so I tried to emulate as close to that. Right now I'm using raspi2 and overriding the cpu with the Pi Zero's cpu.
Also, the reason for my weird setup is because I'm using a Pi Zero for this project, so I tried to emulate as close to that. Right now I'm using raspi2 and overriding the cpu with the Pi Zero's cpu.