OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:47 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Announcing Tosaithe (2023), a new bootloader protocol
PostPosted: Mon Oct 09, 2023 5:19 am 
Offline
Member
Member

Joined: Mon Jul 05, 2021 6:57 pm
Posts: 118
Hi all,

I have been working for some time now on an x86-64 UEFI bootloader and a new boot protocol to go with it. I call it (the loader) Tosaithe and the protocol is TSBP (for Tosaithe Boot Protocol).

It is now at a stage where I am ready to formally announce it here, and request comments from members of the OSdev community.


Key features of the Tosaithe Boot Protocol:
  • ELF format kernels.
  • Currently 64-bit (x86-64) only.
  • Supports typical features: firmware info and memory map passed to kernel, framebuffer, command line, ram disk image.

The protocol is intended to be firmware agnostic, but the reference implementation (Tosaithe) is currently UEFI-only.

In contrast to other protocols:
  • Compared to multiboot (2), has native support for 64-bit kernels
  • Compared to LImine, it is (in my opinion) slightly simpler, but has all the essential features. It also has better support for using UEFI runtime services (i.e. provides a memory map that can be used to set up mapping via SetVirtualAddressMap() UEFI call). On the other hand, it is x86-64 only and the Tosaithe bootloader is much more primitive than Limine.

Please let me know if you have any feedback regarding the protocol, specification, or example. I am not so much seeking examples on the bootloader itself; I know that it is quite primitive. I would prefer constructive feedback - not bikeshedding! - and I welcome fair criticism.

Thanks!


Top
 Profile  
 
 Post subject: Re: Announcing Tosaithe (2023), a new bootloader protocol
PostPosted: Mon Oct 09, 2023 8:29 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Quote:
The CS/DS/SS descriptors select 64-bit segments.

There's no such thing as a 64-bit data segment, your DS/SS descriptors are probably actually 16-bit data segments. If you're not trying to provide segment descriptors that will be useful outside of 64-bit mode, you don't need any data segments at all - you can load DS and SS with null segments and be done with it.

Where will the GDT be located? It's not very clear.

What values will fields hold if they're not available? Some aren't specified.

How should the OS determine whether it was booted using UEFI or legacy BIOS?


Top
 Profile  
 
 Post subject: Re: Announcing Tosaithe (2023), a new bootloader protocol
PostPosted: Tue Oct 10, 2023 6:05 am 
Offline
Member
Member

Joined: Mon Jul 05, 2021 6:57 pm
Posts: 118
Thanks Octocontrabass - good points.

Re the segment descriptors, I have even complained about the same thing in Limine so it's funny that I implied a 64-bit data segment. It is actually (as implemented at the moment) a 32-bit data segment, but I think I will take your suggestion and simply not have a data/stack segment and use null descriptors instead.

The GDT will be in "bootloader reclaimable" memory. The spec does say it is recommended that the kernel establish its own GDT early" but there's no reason not to be more specific so I will amend it.

I guess by the "not available fields" you mean pointers to things that might not be available (eg command line, ACPI RDSP?) In that case: if they are not available, they will be null. I will clarify this. Note that for the framebuffer fields it is specified that "fields are set to 0 if there is no framebuffer available". If the spec doesn't say "if available" or similar then the value is not optional, but I think I will amend this for the command line and allow null value if there is no command line.

In terms of how the kernel should determine whether it was booted by UEFI or legacy bios - if the UEFI memory map and UEFI system table are present, it was booted by UEFI. (They will either both be present or both not be present, since "if available" for both is dependent on whether it's a UEFI boot).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: x64 and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group