Jump to content

AHCI and Windows 9x


rloew

Recommended Posts

I have been doing some further research on using Hard Disk Controllers in AHCI Mode with Windows 9x.

First I have a warning.

On at least two Computer, I observed that Disk I/O is corrupted when running on a Computer with AHCI enabled and an odd Start Address is requested while in Virtual Mode. I have not seen corruption but the risk is there.

IOS.VXD does two Reads in Virtual Mode. One to check it's Safe List and one while loading DRVSPACX.VXD. These occur during Boot.

EMM386 cannot be used with AHCI Enabled as COMMAND.COM will crash.

I have written a small mitigation Program to correct this issue.

There are a number of possible AHCI scenarios which I have listed as follows:

1. AHCI Only Controller with Direct Protected Memory Interface.

The Marvell based HighPoint card, I previously posted about, falls into this category.

As is, no Windows 9x recognizeable Drives can be present. Windows 9x will crash before it even has a chance to load Drivers.

If the BIOS or Card can be modified to use Interrupt 15 or other supported Method then it may be more useable. See Scenario #2.

The HighPoint Card had a Patchable Option ROM so I could modify it.

Otherwise a compatable MBR or DOS DDO AHCI Driver is needed to allow Windows to Boot. I do not know if any exist.

2. AHCI Only Controller with Compatable Protected Memory Interface.

An AHCI Controller of this type can boot Windows 9x, but see Warning above.

I know of no AHCI Driver for Windows 9x so it will run in Compatability Mode at best

Also, I have noticed that some of the earlier AHCI Drivers miscompute the size of the Hard Drive if it is larger than 2TiB and can lockout parts of the Drive well below the 2TiB limit.

3. Switchable AHCI Controller with Direct Protected Memory Interface.

As in Scenario #1, Windows will not boot using this Mode as is. Otherwise read Scenario #4.

4. Switchable AHCI Controller with Compatable Protected Memory Interface.

If the BIOS allows you to switch to Native Mode and you can do so without causing unresolvable issues with other OSes, do so, it will make things much easier and safer.

Many newer Motherboards use AHCI when in RAID Mode so this may not help.

If there is no BIOS Option or you will mess up another OS continue reading.

This is the Scenario for my Warning above.

If your Computer is not at risk, or you use my mitigation program, you may be able to run Windows 9x in Compatability Mode.

I have developed a DOS DDO that switches the Controller to Native Mode and replaces the BIOS Driver. I am still running tests so I have not published it yet.

In conjunction with my SATA Patch and a modified INF File, I have been able to run Windows 98SE in Protected Mode from a Motherboard started in AHCI Mode.

5. Switchable AHCI Controller with Native Mode Default.

If it correctly reports the Native Mode Class Code then it can be treated like any other SATA Controller.

If it reports the AHCI Class Code, as at least one JMicron PCI-E SATA Card does, a modified INF File will be needed.

Either way, my SATA Patch will be needed for proper operation with Windows 9x unless a specific Driver is available.

EDIT: I have reduced the severity of my Warning as the serious corruption issue I originally warned about was traced to a TeraByte Plus Patch I was using for my 6TB Test Drive. I have corrected the Patch and haven't seen corruption even without mitigation.

Edited by rloew
Link to comment
Share on other sites


Is there any value in running (or attempting to run) win-9x on a motherboard with AHCI bios, given the likely situation that there will almost certainly be no win-9x drivers for (some/most/many/all) motherboard components - north/south bridge, onboard graphics, PCIe video cards and other controllers, etc. ?

Link to comment
Share on other sites

Is the ESDI_506.PDR working correctly in your experiments? Is this what you mean by Protected Mode?

Yes.

Running in Protected Mode means using a Windows Driver, in this case my Modified ESDI_506.PDR, rather than Virtualizing the BIOS or DOS Driver.

@Nomen

Someone using Multiple OSes or using an Add-On Card may need AHCI support even in systems with better 9x support.

Link to comment
Share on other sites

Sorry - I was confusing AHCI with UEFI - along the lines of a motherboard with UEFI bios (or operating in UEFI mode instead of regular "BIOS" mode - what-ever that's called) would be very incompatible with Win-98 in a number of ways.

Regarding AHCI - would it be correct to say that if on any given system running 9x/me, that if access to a connected SATA drive is NOT facilitated by ESDI_506.PDR, then that *must mean* the SATA controller is operating in AHCI mode?

Does AHCI mean that the SATA drive is not appearing to the system as an IDE/PATA drive?

If so, then what exactly is the problem with Win-98 and AHCI? Are there problems if the controller is a SIL3112 or 3114? Or any other SATA-1 type controller?

Or does this quest to improve Win-98 compatibility with AHCI pertain only when the SATA controller in question is a type 2 or 3?

Link to comment
Share on other sites

UEFI is out of the question. It runs in 64-Bit Mode or in 32-Bit Mode is some systems. It doesn't support Real Mode. A CSM (Compatability Support Module) is needed to run Windows 9x in a UEFI System. The other issue is GPT. It should be possible to modify DOS and Windows 9x to use GPT but CSMs generally do not support it so there is little need.

The original ESDI_506.PDR only supports "Legacy Mode" which is used in Motherboard PATA Controllers and sometimes SATA Ports 4 and 5.

My modified ESDI_506.PDR supports "Native Mode" using I/O Registers. SATA Controllers normally use Native Mode whether in IDE, RAID or AHCI Mode.

IDE and older RAID Modes use I/O Registers so they are compatable with my modified ESDI_506.PDR.

AHCI and Newer RAID Modes use FIS structures in DMA Memory. A significant Driver rewrite would be needed to support this.

My new project allows me to start up in AHCI Mode, switch the Controller to use I/O Registers, and replace the BIOS Code to support the change.

To not use ESDI_506.PDR, either a system is running in Compatability Mode or it is using a specific Driver.

Even old IDE PATA Systems may use a specific Driver. VIA provides their own Drivers for their Chipsets. I've already found bugs in their Miniport Driver.

Since the Class Code is supposed to be different for Controllers in AHCI Mode, Windows 9x will not normally detect any Drives connected to it.

The warning I posted in Post #1 relates to Compatabilty Mode operation.

My project includes an INF File that allows Windows 9x to recognize these Drives.

I don't think the type of SATA Controller is an issue. AHCI provides enhanced performance in newer Operating Systems that support it.

By providing better support in Windows 9x and avoiding crashes or corruption, I make it possible to Multi-Boot without having to switch Modes when switching OSes.

There are also BIOSes that force AHCI Mode even though the Controller is switchable.

Edited by rloew
Link to comment
Share on other sites

I'm simply asking if by using the on-motherboard SATA controller in "Native" or "Sata" mode (and NOT in IDE/legacy/PATA mode) - is that the same as saying "AHCI" mode. ?

Or to ask that question another way: If I know that I am NOT using ESDI_506 to access my SATA drives in Win98, does that mean I therefore must be using AHCI mode. ?

Link to comment
Share on other sites

The terminology used in BIOS Setup can be ambiguous.

PATA vs. SATA is the Physical Interface. It cannot be changed.

Legacy vs. Native is the Controller I/O Interface. Legacy Mode uses known fixed Ports and Two Interrupts, so only one can exist. Native Mode uses variable Ports and One Interrupt.

IDE vs. AHCI determine the mode of access, I/O Register vs. FIS Memory Structure. RAID is an usage indicator and may be either Register or FIS based but is listed as a separate Mode.

If an option is listed, it must be AHCI or possibly RAID for the AHCI FIS Structures to be used. Native Mode does not imply AHCI.

I answered your Second question before. You can be in ANY Mode and still not use ESDI_506.PDR.

Link to comment
Share on other sites

> If an option is listed, it must be AHCI or possibly RAID for the AHCI FIS Structures to be used.

> Native Mode does not imply AHCI.

In a situation where Native Mode does not imply or does not mean AHCI, then what else can it mean other than emulated IDE/PATA? Is there a third meaning or interface type?

> I answered your Second question before. You can be in ANY Mode and still not use ESDI_506.PDR.

How can a SATA controller be set in the BIOS to emulated/PATA mode, and NOT be accessed through ESDI_506 by win-98? (other than the obvious case where you removed the file from use by win-98). Regardless if the original or a modified version of ESDI_506 is availble to the OS, in what circumstance would win-98 choose to use another driver to access a SATA drive if the SATA interface is set to Emulated/PATA mode in the bios?

Can the Intel SATA drivers (from the IIA package) be used if the bios is set to Emulated/PATA mode?

I'm trying to understand how a Native/Sata mode bios setting does not imply (or is not equivalent to) AHCI mode.

Can AHCI be utilized or invoked even if the bios is set to emulated/PATA/legacy mode?

Link to comment
Share on other sites

Well for me, on a netbook with AHCI enhanced mode, windows 9x boots fine without problems. Im dual booting with xp.

 

Intel ich7 sata controller (There is no driver for 98, win 98 recognizes it as Standard ide).

Link to comment
Share on other sites

@Nomen

There is no "Emulated" Mode. SATA uses a superset of the PATA Protocols.

You cannot choose between PATA and SATA. They use separate connectors and Controllers.

Legacy Mode and Native Mode determine the Port assignments. It is not an interface type. The Class Code is not changed.

There are two Interface types. IDE and AHCI. RAID uses a third Class Code but appears to work as either IDE or AHCI depending upon BIOS.

Unmodified Windows 9x will use ESDI_506.PDR for all drives in IDE Mode. ESDI_506.PDR does not properly handle Native Mode so it can crash or hang.

If you add a more specific INF File, then Windows will use that driver.

I'm not familiar with the IIA Package. The IAA Package has drivers for specific Controllers. I don't know if any SATA Controllers are included. If so, read the documentation.

AHCI uses Memory Mapped I/O so it technically is neither Legacy nor Native but a limited Native Mode Register set is usually present. Either Legacy or Native Mode can be used for IDE.

The available combinations are as follows:

PATA Drives:

Legacy IDE

Legacy RAID (IDE Interface)

Native IDE

Native RAID (IDE Interface)

SATA Drives:

Legacy IDE

Legacy RAID (IDE Interface)

Native IDE

Native RAID (IDE Interface)

AHCI

RAID (AHCI Interface)

Only one Legacy Dual Controller (4 Drives) is allowed. This can be PATA, SATA or one Channel of each.

BIOSes will often limit your choices.

BIOSes generally use the term "Native" to refer to Native IDE Mode usually when there is a Legacy Option. They explicitly use "AHCI" for AHCI Mode.

BIOS Options are one word so the context determines the actual mode.

"RAID" is ambiguous. You have to actually test to see if it uses AHCI or not.

If a Controller is switchable, it is possible to write a Driver that can switch it to AHCI Mode.

I have done the reverse.

Edited by rloew
Link to comment
Share on other sites

Well for me, on a netbook with AHCI enhanced mode, windows 9x boots fine without problems. Im dual booting with xp.

Intel ich7 sata controller (There is no driver for 98, win 98 recognizes it as Standard ide).

You are running in Compatability Mode. This is useable but performance is reduced.

Apparently your BIOS does not have the bug that corrupted my Hard Drive.

Link to comment
Share on other sites

You are running in Compatability Mode. This is useable but performance is reduced.

Apparently your BIOS does not have the bug that corrupted my Hard Drive.

Can you provide an application (runnable in true DOS) to identify that bug?

There's a lot of users nowadays running in Compatability Mode.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...