You can't return from main() after you exit boot services!codyd51 wrote:Code: Select all
exit_bs(); return 0;
Announcing POSIX-UEFI
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Announcing POSIX-UEFI
-
- Member
- Posts: 77
- Joined: Fri May 20, 2016 2:29 pm
- Location: London, UK
- GitHub: https://github.com/codyd51
- Contact:
Re: Announcing POSIX-UEFI
Ah, of course! I was a bit hasty there thanks.
I've squashed some bugs and cleaned up the code and this issue has gone away, so it's safe to say this was all me.
Thanks again.
I've squashed some bugs and cleaned up the code and this issue has gone away, so it's safe to say this was all me.
Thanks again.
-
- Member
- Posts: 77
- Joined: Fri May 20, 2016 2:29 pm
- Location: London, UK
- GitHub: https://github.com/codyd51
- Contact:
Re: Announcing POSIX-UEFI
I've noticed file reads taking much, much longer using UEFI's Read API than GRUB would take to map my ramdisk. I'm seeing read speeds of around 1mb/s in QEMU, which is really hurting my tweak-test-repeat workflow as my ramdisk is upwards of 20mb. I'm now thinking of decompressing my ramdisk at boot time, but I'd really like to avoid this if possible. I'm wondering if anyone else can corroborate this or knows of a fix. Thanks!
Re: Announcing POSIX-UEFI
A ramdisk is supposed to be in memory. That's why it is called a "ram disk". Load your whole file in memory at once and then access it in RAM. It will be just as fast.
-
- Member
- Posts: 77
- Joined: Fri May 20, 2016 2:29 pm
- Location: London, UK
- GitHub: https://github.com/codyd51
- Contact:
Re: Announcing POSIX-UEFI
I am referring to loading the ramdisk into memory =) at 1mb/s it takes upwards of 20 seconds before control is passed from my bootloder to the kernel.kzinti wrote:A ramdisk is supposed to be in memory. That's why it is called a "ram disk". Load your whole file in memory at once and then access it in RAM. It will be just as fast.
-
- Member
- Posts: 77
- Joined: Fri May 20, 2016 2:29 pm
- Location: London, UK
- GitHub: https://github.com/codyd51
- Contact:
Re: Announcing POSIX-UEFI
Fixed! It looks as though QEMU's emulated USB is much slower than its emulated CD.
Bootloader runtime of ~25 seconds:
Bootloader runtime of ~2 seconds:
Bootloader runtime of ~25 seconds:
Code: Select all
qemu-system-x86_64 [...] -usb -drive if=none,id=stick,format=raw,file={image_name.as_posix()} -device usb-storage,drive=stick [...]
Code: Select all
qemu-system-x86_64 [...] -cdrom {image_name.as_posix()} [...]
Re: Announcing POSIX-UEFI
Try adding -device qemu-xhci and see if that's slow -- it shouldn't be.
-
- Member
- Posts: 77
- Joined: Fri May 20, 2016 2:29 pm
- Location: London, UK
- GitHub: https://github.com/codyd51
- Contact:
Re: Announcing POSIX-UEFI
This does indeed make USB super speedy (sub-second speeds) - nice one!Ethin wrote:Try adding -device qemu-xhci and see if that's slow -- it shouldn't be.