I made my own DOS implementation (Announce)
> UEFI doesn't mean that you have to handle all the HW by yourself. UEFI
> offers runtime services and drivers for accessing storage (HDD, USB),
> keyboard and framebuffer.
> https://wiki.osdev.org/Using_UEFI_Runtime_Services_in_your_Kernel
Those UEFI runtime services are listed in the OSDev article:
Efi_Get_Time GetTime;
Efi_Set_Time SetTime;
Efi_Get_Wakeup_Time GetWakeupTime;
Efi_Set_Wakeup_Time SetWakeupTime;
Efi_Set_Virtual_Address_Map SetVirtualAddressMap;
Efi_Convert_Pointer ConvertPointer;
Efi_Get_Variable GetVariable;
Efi_Get_Next_Variable_Name GetNextVariableName;
Efi_Set_Variable SetVariable;
Efi_Get_Next_High_Mono_Count GetNextHighMonotonicCount;
Efi_Reset_System ResetSystem;
Efi_Update_Capsule UpdateCapsule;
Efi_Query_Capsule_Capabilities QueryCapsuleCapabilities;
Efi_Query_Variable_Info QueryVariableInfo;
I don't see anything related to disk or console I/O.
> But problem is that UEFI starts in 64-bit long mode (old 32-bit UEFI are
> probably no longer developed and supported) that makes it problematic to
> cooperate with realmode DOS (not sure if possible do some 16-64b mode
> switches safely without destrying UEFI structures).
UEFI does not have a standardized memory map like BIOS does. UEFI has only a limited set of functions that do not alter the memory map - the only boot services that are guaranteed to NOT alter the memory map are ExitBootServices() and GetMemoryMap() (if I remember their names correctly). BIOS-based operating systems, on the other hand, assume that everything starting from memory address ~60:0 to the kilobyte count in address 40:13 is safe to be used by the kernel. If there happens to be UEFI code or UEFI structures in that memory area, it will create problems.
UEFI has been designed (probably on purpose) in such way that it is NOT possible to create a universal "BIOS shim" that would work with every operating system that uses BIOS. Of course it would be possible to create something that uses the virtual-86 mode of x86 processors and run the DOS operating system inside that, but it would then be extremely hard to implement an environment that could also run DOS extenders and other 32-bit DOS applications. Most likely it would also have problems with accessing many I/O ports and handling interrupts. And also that "shim" would need to support every piece of hardware separately.
On top of that, UEFI cannot boot anything if the boot disk does not have a GPT partitioning table. The bootable binary (usually the bootloader of the operating system) must be a PE-formatted file in a FAT32 filesystem - also known as the "EFI partition". Most operating systems aren't even compatible with GPT partitioning, which isn't even a good partitioning scheme to begin with.
Complete thread:
- I made my own DOS implementation - samwdpckr, 07.12.2023, 05:07 (Announce)
- I made my own DOS implementation - CandyMan, 07.12.2023, 22:17
- I made my own DOS implementation - Zyzzle, 07.12.2023, 23:58
- I made my own DOS implementation - samwdpckr, 08.12.2023, 02:43
- I made my own DOS implementation - tom, 08.12.2023, 15:52
- I made my own DOS implementation - samwdpckr, 08.12.2023, 22:11
- I made my own DOS implementation - tom, 09.12.2023, 01:46
- I made my own DOS implementation - marcov, 09.12.2023, 11:29
- I made my own DOS implementation - nico7550, 16.12.2023, 14:17
- I made my own DOS implementation - samwdpckr, 27.12.2023, 17:59
- I made my own DOS implementation - nico7550, 28.12.2023, 08:31
- I made my own DOS implementation - 0ffer, 30.12.2023, 09:35
- I made my own DOS implementation - samwdpckr, 27.12.2023, 17:59
- I made my own DOS implementation - nico7550, 16.12.2023, 14:17
- I made my own DOS implementation - samwdpckr, 08.12.2023, 22:11
- I made my own DOS implementation - Zyzzle, 08.12.2023, 15:56
- I made my own DOS implementation - tom, 08.12.2023, 15:52
- I made my own DOS implementation - samwdpckr, 08.12.2023, 02:43
- I made my own DOS implementation - Zyzzle, 07.12.2023, 23:58
- I made my own DOS implementation - SuperIlu, 07.12.2023, 23:24
- I made my own DOS implementation - 0ffer, 25.12.2023, 20:31
- I made my own DOS implementation - RayeR, 31.01.2024, 17:13
- I made my own DOS implementation - tom, 31.01.2024, 22:02
- I made my own DOS implementation - Japheth, 01.02.2024, 08:32
- I made my own DOS implementation - samwdpckr, 01.02.2024, 15:36
- I made my own DOS implementation - RayeR, 01.02.2024, 19:01
- I made my own DOS implementation - samwdpckr, 01.02.2024, 19:09
- I made my own DOS implementation - RayeR, 02.02.2024, 05:22
- I made my own DOS implementation - KormaX, 02.02.2024, 11:11
- I made my own DOS implementation - samwdpckr, 02.02.2024, 20:20
- I made my own DOS implementation - RayeR, 11.02.2024, 15:52
- I made my own DOS implementation - samwdpckr, 02.02.2024, 20:20
- I made my own DOS implementation - KormaX, 02.02.2024, 11:11
- I made my own DOS implementation - RayeR, 02.02.2024, 05:22
- I made my own DOS implementation - samwdpckr, 01.02.2024, 19:09
- I made my own DOS implementation - RayeR, 01.02.2024, 19:01
- I made my own DOS implementation - tom, 31.01.2024, 22:02
- I made my own DOS implementation - samwdpckr, 12.03.2024, 22:56
- I made my own DOS implementation - fritz.mueller, 15.03.2024, 14:49
- I made my own DOS implementation - samwdpckr, 15.03.2024, 20:46
- I made my own DOS implementation - fritz.mueller, 16.03.2024, 20:01
- I made my own DOS implementation - samwdpckr, 16.03.2024, 23:11
- I made my own DOS implementation - samwdpckr, 18.03.2024, 01:52
- I made my own DOS implementation - fritz.mueller, 18.03.2024, 13:25
- I made my own DOS implementation - samwdpckr, 18.03.2024, 22:22
- I made my own DOS implementation - fritz.mueller, 20.03.2024, 15:56
- I made my own DOS implementation - samwdpckr, 21.03.2024, 18:06
- I made my own DOS implementation - tom, 21.03.2024, 19:32
- I made my own DOS implementation - samwdpckr, 21.03.2024, 19:56
- I made my own DOS implementation - fritz.mueller, 21.03.2024, 22:14
- I made my own DOS implementation - samwdpckr, 21.03.2024, 22:21
- I made my own DOS implementation - ecm, 22.03.2024, 00:21
- I made my own DOS implementation - samwdpckr, 22.03.2024, 02:06
- I made my own DOS implementation - ecm, 22.03.2024, 07:31
- I made my own DOS implementation - tom, 22.03.2024, 10:58
- I made my own DOS implementation - tom, 22.03.2024, 11:22
- I made my own DOS implementation - samwdpckr, 22.03.2024, 13:14
- I made my own DOS implementation - tom, 22.03.2024, 14:12
- I made my own DOS implementation - samwdpckr, 22.03.2024, 16:21
- I made my own DOS implementation - tom, 22.03.2024, 17:32
- I made my own DOS implementation - samwdpckr, 23.03.2024, 08:10
- I made my own DOS implementation - ecm, 23.03.2024, 09:58
- I made my own DOS implementation - tom, 23.03.2024, 12:20
- I made my own DOS implementation - samwdpckr, 23.03.2024, 20:32
- I made my own DOS implementation - samwdpckr, 26.03.2024, 04:36
- I made my own DOS implementation - samwdpckr, 27.03.2024, 23:29
- I made my own DOS implementation - Rugxulo, 28.03.2024, 01:29
- I made my own DOS implementation - samwdpckr, 28.03.2024, 04:15
- I made my own DOS implementation - fritz.mueller, 28.03.2024, 21:19
- I made my own DOS implementation - samwdpckr, 29.03.2024, 18:00
- I made my own DOS implementation - Rugxulo, 29.03.2024, 22:01
- I made my own DOS implementation - samwdpckr, 29.03.2024, 22:31
- I made my own DOS implementation - Rugxulo, 08.04.2024, 03:19
- I made my own DOS implementation - fritz.mueller, 17.05.2024, 12:49
- I made my own DOS implementation - Rugxulo, 08.04.2024, 03:19
- I made my own DOS implementation - samwdpckr, 29.03.2024, 22:31
- I made my own DOS implementation - Rugxulo, 29.03.2024, 22:01
- I made my own DOS implementation - samwdpckr, 29.03.2024, 18:00
- I made my own DOS implementation - Rugxulo, 29.03.2024, 02:53
- I made my own DOS implementation - Rugxulo, 30.03.2024, 10:16
- I made my own DOS implementation - samwdpckr, 30.03.2024, 20:09
- I made my own DOS implementation - Oso2k, 31.03.2024, 21:22
- I made my own DOS implementation - Rugxulo, 31.03.2024, 22:59
- I made my own DOS implementation - samwdpckr, 01.04.2024, 16:31
- I made my own DOS implementation - Oso2k, 31.03.2024, 21:22
- I made my own DOS implementation - samwdpckr, 30.03.2024, 20:09
- I made my own DOS implementation - fritz.mueller, 28.03.2024, 21:19
- I made my own DOS implementation - samwdpckr, 28.03.2024, 04:15
- I made my own DOS implementation - Rugxulo, 28.03.2024, 01:29
- I made my own DOS implementation - samwdpckr, 27.03.2024, 23:29
- I made my own DOS implementation - samwdpckr, 08.09.2024, 01:32
- I made my own DOS implementation - samwdpckr, 31.10.2024, 22:29
- I made my own DOS implementation - samwdpckr, 26.03.2024, 04:36
- I made my own DOS implementation - samwdpckr, 23.03.2024, 20:32
- I made my own DOS implementation - samwdpckr, 23.03.2024, 08:10
- I made my own DOS implementation - tom, 22.03.2024, 17:32
- I made my own DOS implementation - samwdpckr, 22.03.2024, 16:21
- I made my own DOS implementation - tom, 22.03.2024, 14:12
- I made my own DOS implementation - samwdpckr, 22.03.2024, 13:14
- I made my own DOS implementation - samwdpckr, 22.03.2024, 02:06
- I made my own DOS implementation - ecm, 22.03.2024, 00:21
- I made my own DOS implementation - samwdpckr, 21.03.2024, 19:56
- I made my own DOS implementation - tom, 21.03.2024, 19:32
- I made my own DOS implementation - samwdpckr, 21.03.2024, 18:06
- I made my own DOS implementation - fritz.mueller, 20.03.2024, 15:56
- I made my own DOS implementation - samwdpckr, 18.03.2024, 22:22
- I made my own DOS implementation - fritz.mueller, 18.03.2024, 13:25
- I made my own DOS implementation - samwdpckr, 18.03.2024, 01:52
- I made my own DOS implementation - samwdpckr, 16.03.2024, 23:11
- I made my own DOS implementation - fritz.mueller, 16.03.2024, 20:01
- I made my own DOS implementation - samwdpckr, 15.03.2024, 20:46
- I made my own DOS implementation - fritz.mueller, 15.03.2024, 14:49
- I made my own DOS implementation - CandyMan, 07.12.2023, 22:17