What is the best, proper way to pass informations to the OS?
What is the best, proper way to pass informations to the OS?
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.
Re: What is the best, proper way to pass informations to the
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.
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
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.