Ok. A few things:
1. What are you trying to do with the DOS utility? There might be a Linux tool that does the same thing, and Linux can be booted from EFI.
2. What would happen if you just left it in BIOS mode all the time?
3. You might be able to switch the firmware mode from within the operating system, such as by writing to /dev/mem. If it's possible to do the switch from within an OS, that can be automated.
4. What hardware do you need DOS to access? If you ran DOS in Xen, would PCI passthrough be sufficient?
Sent from my iPhone
Thanks for the help Jake. I'm trying to automate a process of flipping between actual DOS and EFI. Unfortunately, it sounds like there's no way to get to DOS From EFI so I'll have to work something else out. DOSBox/VM solution won't work for me since I need direct access to the hardware due to the code I'm trying to execute. I appreciate your detailed response.
On Sun, Jul 22, 2012 at 6:33 PM, Jake Thomas <address@hidden>
What's wrong with going in and switching the firmware to BIOS mode when you need to boot into DOS, and then switching it back to EFI mode when you're done?
The times when you need DOS to see all your real hardware and/or your real machine's firmware should be so few and far between, that those rare switches won't be much of an inconvenience.
In cases where you don't need DOS to see your real hardware and/or firmware, simply use DOSBox or run DOS in some other virtual machine.
If you need DOS to see a real hard drive, you can probably share the hard drive with DOS through a hypervisor such as QEMU.
Other hardware sharing options include Xen's PCI passthrough. Though at this point I'd just switch the firmware mode and boot DOS.
For something like flashing the BIOS, that can be done from within Linux, which can be booted from EFI. Certainly DOS games can be ran in DOSBox in Linux booted from EFI. Low-level DOS hard drive utilities might be able to work on a hard drive if DOS is running in a hypervisor where the hypervisor is giving DOS access to the hard drives. The hypervisor itself can be booted from EFI if it's its own OS (called a baremetal hypervisor), or you can run a hypervisor in Linux booted from EFI. Either way, the hypervisor supplies DOS with a BIOS.
Yes, DOS is one of the few (that I know of) operating systems that never (or at most rarely, as far as I know) communicates to hardware. Instead, it asks the processor to run a program to communicate to hardware _for_ it. These programs are a part of the BIOS specification and are in memory. Either the chip on the motherboard containing the BIOS has memory addresses pointing to it to get to the programs, or the programs have been copied to RAM (called shadow RAM). Therefore DOS really does need a BIOS in its full glory.
Sent from my iPhone