Page 7 of 7

Re: Announcing POSIX-UEFI

Posted: Thu Oct 14, 2021 8:27 pm
by Octocontrabass
codyd51 wrote:

Code: Select all

    exit_bs();
    return 0;
You can't return from main() after you exit boot services!

Re: Announcing POSIX-UEFI

Posted: Thu Oct 21, 2021 10:40 am
by codyd51
Ah, of course! I was a bit hasty there :D 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.

Re: Announcing POSIX-UEFI

Posted: Tue Nov 02, 2021 5:41 pm
by codyd51
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

Posted: Tue Nov 02, 2021 7:28 pm
by kzinti
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.

Re: Announcing POSIX-UEFI

Posted: Wed Nov 03, 2021 3:57 am
by codyd51
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.
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.

Re: Announcing POSIX-UEFI

Posted: Wed Nov 03, 2021 4:10 am
by codyd51
Fixed! It looks as though QEMU's emulated USB is much slower than its emulated CD.

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 [...]
Bootloader runtime of ~2 seconds:

Code: Select all

qemu-system-x86_64 [...] -cdrom {image_name.as_posix()} [...]

Re: Announcing POSIX-UEFI

Posted: Thu Nov 04, 2021 8:54 pm
by Ethin
Try adding -device qemu-xhci and see if that's slow -- it shouldn't be.

Re: Announcing POSIX-UEFI

Posted: Tue Nov 09, 2021 9:43 am
by codyd51
Ethin wrote:Try adding -device qemu-xhci and see if that's slow -- it shouldn't be.
This does indeed make USB super speedy (sub-second speeds) - nice one!