5 ms·
As far as I know it would be hard to do it outside of the boot firmware's own compatibility options (which most systems currently have AFAIK, but is probably on
by fredoralive 5y ago
As far as I know it would be hard to do it outside of the boot firmware's own compatibility options (which most systems currently have AFAIK, but is probably on the way out). Whilst the old BIOS starts external code in Real Mode, with UEFI it sets the CPU into the operating mode. This means with most systems you'll be in 64 bit / Long Mode, and you can't leave that once entered.
You could have fun with hypervisors etc., but I guess we're thinking bare metal here?
- leeter 5y agoYou can absolutely leave long mode once entered; it's just annoying and silly. In fact one of the plausible options for running a DOS on UEFI would be downgrading the mode to 'unreal' mode. But you'd still have to put BIOS replacement code in memory to manage that part. However the better option IMO is to allow the DOS kernel to just virtualize the applications using the virtualization extensions on almost all modern CPUs. Then you could do something like adding an emu.ini file next to the exe/com that sets things like memory and emulated hardware settings. Furthermore virtual machine BIOS code already exists for things like qemu etc. so there is a place to start on that too.
- zozbot234 5y ago> Then you could do something like adding an emu.ini file next to the exe/com that sets things like memory and emulated hardware settings. The standard DOS-extender feature for setting these modes is a Program Information File (.PIF extension).
- leeter 5y agoHonestly I was thinking similar but not exactly the same. More something with a VT-d memory map/port map so that the DOS application could potentially directly interface with legacy hardware without interfering or making the PIF incompatible. This has applications particularly in factories where they still use ISA interface cards with tooling etc. At the same time it would allow setting things like EGA/CGA compatibility requirements. Could you do it in the PIF? Probably, but I'd rather not risk breaking compatibility if possible. It's an idea only and would require research anyway assuming I actually had the time and energy to implement.
- anthk 5y agoJust boot BiEFIrcate from UEFI and chainload FreeDOS from there. https://github.com/tkchia/biefircate https://github.com/tkchia/biefircate