Solved

How to extract "native mode" BIOS settings in Windows

Posted on 2008-10-27
10
812 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
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?
 
0
 

Author Comment

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

Expert Comment

by:DanRollins
ID: 22827382
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
ID: 22827537
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
ID: 22828726
I will check this out in the morning, then let you know.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

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

Author Comment

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

Author Comment

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

Accepted Solution

by:
DanRollins earned 500 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
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
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

26 Experts available now in Live!

Get 1:1 Help Now