Solved

How to extract "native mode" BIOS settings in Windows

Posted on 2008-10-27
10
810 Views
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.

Thanks.
0
Comment
Question by:swsbuyer
  • 6
  • 3
10 Comments
 
LVL 41

Expert Comment

by:graye
Comment Utility
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?
 
0
 

Author Comment

by:swsbuyer
Comment Utility
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.
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
An interesting question.  Some background:
   BIOS Settings for Native-Mode-Capable ATA Controllers
   http://www.microsoft.com/whdc/device/storage/Native-modeATA.mspx
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.
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
I think there's a hint here:
   IDE_CHANNEL_CONFIGURATION
   http://msdn.microsoft.com/en-us/library/ms807614.aspx
    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"
0
 

Author Comment

by:swsbuyer
Comment Utility
I will check this out in the morning, then let you know.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:swsbuyer
Comment Utility
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.
0
 

Author Comment

by:swsbuyer
Comment Utility
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...
0
 

Author Comment

by:swsbuyer
Comment Utility
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.
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 500 total points
Comment Utility
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
http://support.microsoft.com/kb/253232
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
0
 

Author Comment

by:swsbuyer
Comment Utility
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.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now