Announcing POSIX-UEFI

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Octocontrabass
Member
Member
Posts: 5534
Joined: Mon Mar 25, 2013 7:01 pm

Re: Announcing POSIX-UEFI

Post by Octocontrabass »

codyd51 wrote:

Code: Select all

    exit_bs();
    return 0;
You can't return from main() after you exit boot services!
codyd51
Member
Member
Posts: 77
Joined: Fri May 20, 2016 2:29 pm
Location: London, UK
GitHub: https://github.com/codyd51
Contact:

Re: Announcing POSIX-UEFI

Post 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.
codyd51
Member
Member
Posts: 77
Joined: Fri May 20, 2016 2:29 pm
Location: London, UK
GitHub: https://github.com/codyd51
Contact:

Re: Announcing POSIX-UEFI

Post 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!
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: Announcing POSIX-UEFI

Post 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.
codyd51
Member
Member
Posts: 77
Joined: Fri May 20, 2016 2:29 pm
Location: London, UK
GitHub: https://github.com/codyd51
Contact:

Re: Announcing POSIX-UEFI

Post 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.
codyd51
Member
Member
Posts: 77
Joined: Fri May 20, 2016 2:29 pm
Location: London, UK
GitHub: https://github.com/codyd51
Contact:

Re: Announcing POSIX-UEFI

Post 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()} [...]
Ethin
Member
Member
Posts: 625
Joined: Sun Jun 23, 2019 5:36 pm
Location: North Dakota, United States

Re: Announcing POSIX-UEFI

Post by Ethin »

Try adding -device qemu-xhci and see if that's slow -- it shouldn't be.
codyd51
Member
Member
Posts: 77
Joined: Fri May 20, 2016 2:29 pm
Location: London, UK
GitHub: https://github.com/codyd51
Contact:

Re: Announcing POSIX-UEFI

Post 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!
Post Reply