From 5cb58ec85476d253addb52856feb8fa000f1cdd1 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Mon, 17 Jun 2024 16:31:04 +0200 Subject: [PATCH] Import XTLDR documentation --- content/documentation/xtldr.md | 63 ++++++++++++++++++++++ static/images/exectos/xtldr_boot_menu.png | Bin 0 -> 7269 bytes 2 files changed, 63 insertions(+) create mode 100644 content/documentation/xtldr.md create mode 100644 static/images/exectos/xtldr_boot_menu.png diff --git a/content/documentation/xtldr.md b/content/documentation/xtldr.md new file mode 100644 index 0000000..9c0105a --- /dev/null +++ b/content/documentation/xtldr.md @@ -0,0 +1,63 @@ ++++ +title = 'XT Boot Loader' +date = 2024-06-16T23:43:56+02:00 +draft = true ++++ +XTLDR (abbreviation of XT Loader) is the boot loader dedicated for XTOS. It is the first program launched by the Unified +Extensible Firmware Interface (UEFI) of the computer and is responsible for loading the rest of ExectOS. The procedure is +quite different for UEFI and BIOS systems. However currently, legacy BIOS boot procedure is not supported by ExectOS. + +### UEFI +The Unified Extensible Firmware Interface (UEFI) has support for reading both the partition table as well as file systems. +UEFI does not launch any boot code from the Master Boot Record (MBR) whether it exists or not, instead booting relies on +boot entries in the NVRAM. The UEFI specification mandates support for the FAT12, FAT16, and FAT32 file systems, as well +as ISO9660 for optical discs. Any conformant vendor can optionally add support for additional file systems. + +UEFI launches EFI applications, e.g. boot loaders, boot managers, UEFI shell, etc. These applications are usually stored +as files in the EFI system partition (ESP). The applications can be launched by adding a boot entry to the NVRAM or from +the UEFI shell. + +### Startup Process +When a PC is powered on its UEFI firmware initializes the hardware components of the system. This includes CPU, memory, +and device initialization. Firmware has its own boot manager, which is responsible for loading UEFI applications stored +in the EFI System Partition (ESP), a dedicated partition on a data storage device, formatted with any from the supported +filesystem and attempts to load the selected EFI application (usually an OS bootloader) into memory and transfers control +to it. + +XTLDR accesses the file system on the ESP partition and reads the xtldr.ini file to determine what Operating Systems are +present. Also additional configuration, like debugging options is loaded. Afterwards, XTLDR loads additional modules, in +order to extend its functionality as well as to support additional file systems, that are normally not supported by UEFI. +This allows to boot Operating System kernel from the partition other to ESP. Then boot loader menu is presented to the +user. + +![XTLDR Boot Menu](/images/exectos/xtldr_boot_menu.png) + +After a user choose the position from the list, or timeout exceeded, XTLDR continues with loading additional modules, +specific to the chosen Operating System. If a non XTOS is selected, XTLDR loads the associated kernel file listed in the +configuration file and gives it control. Otherwise, if XTOS is selected, boot loader loads registry HIVE data, kernel +and boot drivers. Finally, starts the kernel, passing to it all the necessary information. + +### XTLDR Configuration +XTLDR's first action is to read the xtldr.ini file. It describes whole configuration for the boot loader as well as allows +the user to choose which Operating System to boot from at the menu. it also allows the user to pass preconfigured options +to the kernel. Regardless an OS, the location of the Operating System is written as an ARC (Advanced RISC Computing) path. +Below is an example of the xtldr.ini file: +``` +[XTLDR] +Debug=COM1,115200 +Default=ExectOS +KeepLastBoot=TRUE +Modules=beep +Timeout=10 +Tune=400 880 2 988 2 783 2 392 2 587 3 + +[ExectOS] +SystemName="ExectOS Operating System" +SystemType=XTOS +BootModules=xtos_o +SystemPath=multi(0)disk(0)rdisk(0)partition(1)/ExectOS +KernelFile=xtoskrnl.exe +Parameters=DEBUG=COM1,115200 +``` +A full list of configuration options with their descriptions can be found in the [example configuration](https://git.codingworkshop.eu.org/xt-sys/exectos/src/branch/master/bootdata/xtldr/xtldr.ini) +file in project's GIT repository. diff --git a/static/images/exectos/xtldr_boot_menu.png b/static/images/exectos/xtldr_boot_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..231bcc2afd95973ff6e3fa6bbf6934c8cd51758b GIT binary patch literal 7269 zcmeHMX;f3^y50^|Y#oZWSQ)L9q7pzwu}DL#$|NcUv|$RUltD0rL7*lip{>=nN>Y?j zgs6y!m_!LAL`-5;CZog%1R*4`h7cfxXvkoOo!od%?^);mIqR;oZqKj#W3Ro|Uf+7x zx1R5NhWFjSe0?Bv+53*~0|2lrJZw)i0L(uN0P~*MEwX)KCBI6ty_V#J#pMIQ@<;EU zc@cPbbFc0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