feipoa wrote:I need to boot into DOS first so that I can setup the CPU registers of the SXL CPU and setup the PS/2 mouse function. Apparently GRUB4DOS allows this, but I cannot figure out how to make it work.
I have been monitoring this thread for a while as well as the other. It seems that things aren't going right as patching NTDETECT binary may not be a good option at all. Why GRUB4DOS and not the official GNU GRUB2 version 2.04? Actually, you don't really need to boot into DOS to do the stuffs you need. With the official GRUB2, you can do it with GRUB module. I am not sure how proficient you are at C programming, GRUB module is actually quite manageable and there are quite a number of examples for reference. And, the good thing is, it is 32-bit C flat memory model, so it does not complicate stuffs with near/far pointers and the need for setting up protected mode.
Another option is SYSLINUX 3.86, at this specific version. Since most legacy Microsoft OS'es boot through chain-loading of the OS-specific boot sector, SYSLINUX chain-loading support is provided by COM32 module in source code chain.c, which you can modify freely to implement the stuffs you need before invoking the chain-loading. COM32 is also 32-bit C flat memory model.
If you are comfortable with C coding, then you need to setup a Linux/GCC environment for compiling GRUB2 or SYSLINUX.
Personally, I prefer GRUB2 since the GRUB module is portable and the ABI is stable. And, I suppose you know very well the exact steps required to implement the stuffs you need, GRUB2 scripting support in/out, memory read/write, PCI read/write and RDMSR/WRMSR through scripting. If the required steps can be supported with those accesses, then you don't even need to write GRUB module. All you need is implementing the function within GRUB boot scripting in GRUB.CFG.