How to extract "native mode" BIOS settings in Windows

Posted on 2008-10-27
Medium Priority
Last Modified: 2013-12-04
Windows allows the IDE driver to work wither in "compatible" or in "native" mode. There is a BIOS setting usually called "Native Mode" or "Native Mode Option". It is by default set to "Auto" or "Compatible". However, it can be changed to "SATA" or "Parallel ATA" in the BIOS.

When in Windows, I need to extract the value of this settings. Any idea how can I do that. I tries using WMI to get all sorts of BIOS & IDE settings, but could not see this specific setting. As far as I know only IDE device drive uses this setting to get into native / compatible modes. maybe somebody with device driver background knows the answer.

Much appreciate your response.

Question by:swsbuyer
  • 6
  • 3
LVL 41

Expert Comment

ID: 22824792
I'd think that getting that kind of information out of the BIOS setting would not be the way to go...  And, the fact that Windows uses a "unified" driver for both PATA and SATA, makes using "driver detection" a poor choice.   So that pretty much leaves using a low-level API probe of the device driver.  
Things might be a bit easier if the BIOS and drives support SMART... is that an option for you?

Author Comment

ID: 22826877
I dont think SMART is a choice here. Your suggestion of using a low-level API probe to drive is an intriguing option. I dont know much about device drive API. Can you point me to the right place. Thanks.
LVL 49

Expert Comment

ID: 22827382
An interesting question.  Some background:
   BIOS Settings for Native-Mode-Capable ATA Controllers
It would appear that if one could read the "operating mode bits of the Programming Interface" then one could know this status value.  I'm continuing research.
A couple of things:
  • The BIOS setting is probably irrelevant.  Windows basically supplies a complete replacement for the BIOS, so only the settings of the Windows device drivers count here.  
  • This is a setting related to how the PCI handes the drive, so in addition to researching IDE drives,  I suggest focussing on PCI-related configuation information.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 49

Expert Comment

ID: 22827537
I think there's a hint here:
    ChannelNumber...... For non-native mode controllers, the primary channel will always
    be assigned 0 and the secondary channel will always be assigned 1.
If there is a WMI key for IDE channel number, then perhaps you could see if the values are 0 and 1.  If not, then the setting is "native"

Author Comment

ID: 22828726
I will check this out in the morning, then let you know.

Author Comment

ID: 22833361
Hmm! I am unable to find any WMI key for IDE channel number. Looking at some of the windows device driver API, I am not sure that we can enumerate IDE_CHANNEL_CONFIGURATION for all the IDE devices. It could be input argument for some device functions.

Author Comment

ID: 22834011
Found some more information:

from: http://www.microsoft.com/whdc/device/storage/Native-modeATA.mspx

"If all of the above prerequisites are met, the BIOS/platform must indicate its ability to handle switching the controller by providing an ACPI control method named NATA on the parent device of the PCI ATA controller. The control method must evaluate to a list of _ADR style package of integers that indicate which controllers can safely be switched to native mode."

So, looks like if I can get hold of NATA control method on ACPI, I will be in good shape. However, looks like the ACPI tables are accessed by Windows during boot. is it even possible to access this information after Windows has booted. I would guess that Windows is keeping this information somewhere...

Author Comment

ID: 22835449
Another option could be to probe the ATA driver to see if it is in "native" mode. Am trying to find out if ATA driver can be probed. Any ideas would be welcome.
LVL 49

Accepted Solution

DanRollins earned 1500 total points
ID: 22836189
Found in a Compaq service guide:

Legacy Mode
The Legacy mode is used to access devices attached to the embedded IDE controllers. Each channel requires two fixed I/O address ranges and an IRQ for each.
 Primary Channel
  Command block: 1F0h - 1F7h
  Control block: 3F6h
  IRQ: 14
Secondary Channel
  Command block: 170h - 177h
  Control block: 376h
  IRQ: 15

Native Mode
devices attached to add-in cards and is not supported by many legacy operating systems. Addresses are assigned by PCI Plug-n-Play BIOS and the IRQ is shared with multiple controllers. Base Address Registers for the Command and Control Block are found in the PCI Configuration Space.
 Offset 10h - Primary Command base address
 Offset 14h - Primary Control base address
 Offset 18h - Secondary Command base address
 Offset 1Ch - Secondary Control base address The native mode is used to access
I don't have time to look at this more today, but this looks promising: If you can learn if the device is using IRQ 14/15 then it is probably in compatibility (or "legacy") mode. If not, then it's in "native" mode.
How to get the configuration and location information of a PCI device
BTW: Why do you need to know this? From what I've read, it would be a pretty old machine to not support (and implement) native mode.
-- Dan

Author Comment

ID: 22836443
I will try this as soon as I can. The microsoft KB link you sent is for writing device driver. I dont think a Win32 app will have access to the API's. However, I can check if IRQ 14/15 are being used at all and by which device.

You ask a valid question about the reason to find this information. Our product runs on a cluster of computers. We have found out that if the BIOS setting for ATA devices is set to the native mode (Parallel ATA), the performance improves significantly. Before we install our product, we need to check for correct BIOS setting on each and every computer. This is a painful process for 1000's of computers. Hence we are writing a "pre-install" utility that could test the readyness of the target machines.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question