OSDev.org
https://forum.osdev.org/

Announcing POSIX-UEFI
https://forum.osdev.org/viewtopic.php?f=2&t=40387
Page 7 of 7

Author:  Octocontrabass [ Thu Oct 14, 2021 8:27 pm ]
Post subject:  Re: Announcing POSIX-UEFI

codyd51 wrote:
Code:
    exit_bs();
    return 0;

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

Author:  codyd51 [ Thu Oct 21, 2021 10:40 am ]
Post subject:  Re: Announcing POSIX-UEFI

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.

Author:  codyd51 [ Tue Nov 02, 2021 5:41 pm ]
Post subject:  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!

Author:  kzinti [ Tue Nov 02, 2021 7:28 pm ]
Post subject:  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.

Author:  codyd51 [ Wed Nov 03, 2021 3:57 am ]
Post subject:  Re: Announcing POSIX-UEFI

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.

Author:  codyd51 [ Wed Nov 03, 2021 4:10 am ]
Post subject:  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:
Code:
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:
qemu-system-x86_64 [...] -cdrom {image_name.as_posix()} [...]

Author:  Ethin [ Thu Nov 04, 2021 8:54 pm ]
Post subject:  Re: Announcing POSIX-UEFI

Try adding -device qemu-xhci and see if that's slow -- it shouldn't be.

Author:  codyd51 [ Tue Nov 09, 2021 9:43 am ]
Post subject:  Re: Announcing POSIX-UEFI

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!

Page 7 of 7 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/