Page 1 of 1

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

Posted: Fri Feb 27, 2015 3:53 pm
by robschia
And what do you think are the mandatory and recommended ones on a UEFI x64 platform?

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

Posted: Fri Feb 27, 2015 7:10 pm
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.

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

Posted: Sun Mar 01, 2015 12:17 pm
by robschia
Thank you jnc, always the first one to reply when we ask UEFI-related questions!