What is the best, proper way to pass informations to the OS?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
robschia
Posts: 5
Joined: Fri Dec 26, 2014 3:28 pm

What is the best, proper way to pass informations to the OS?

Post by robschia »

And what do you think are the mandatory and recommended ones on a UEFI x64 platform?
I'm not a native English speaker, feel free to correct me.
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: What is the best, proper way to pass informations to the

Post by jnc100 »

There is no official 'proper' way to pass information from a UEFI bootloader to the OS. You'd usually want to use a structure in memory and pass its address as an argument to your kernel main function. Your structure could follow the multiboot format if you like (then your kernel could be booted unmodified from multiboot-compliant loaders too) or could be of your own design.

Things you would definitely want to include:
- a memory map
- locations of modules (if any)
- framebuffer properties (if you don't immediately start using a native graphics driver in your OS)
- some sort of flag to identify this as a UEFI system (and therefore legacy devices and the BIOS may not be available)

Optional things:
- ACPI/SMBIOS/PXE table locations (UEFI provides these so you don't need to search for them and in addition the ACPI spec only guarantees their locations in low memory/EBDA for PC-BIOS systems anyway)
- UEFI path of the device containing the bootloader image
- Current system time (before you synchronize with NTP etc)

Regards,
John.
robschia
Posts: 5
Joined: Fri Dec 26, 2014 3:28 pm

Re: What is the best, proper way to pass informations to the

Post by robschia »

Thank you jnc, always the first one to reply when we ask UEFI-related questions!
I'm not a native English speaker, feel free to correct me.
Post Reply