• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 694
  • Last Modified:

Device driver to read/write CMOS memory?

Folks,

I'm trying to find a device driver for WinNT/2000/XP that will allow me to SAFELY read/write from/to CMOS memory. I'm familiar with the 'giveio' driver which allows port I/O instructions to be executed under these operating systems, but using this approach might cause trouble (or so it seems) if an interrupt were to occur between outputting to port 0x70 and inputting from port 0x71.

I would like an approach which uses the HAL (hardware abstraction layer) to access the CMOS in a safe and "approved" manner. If possible, I'd like to find a ready-to-use device driver that will allow such access, but a source-code version (with 'build' and 'installation' instructions) would be acceptable. I'm willing to pay a modest amount of money for a ready-to-use driver, assuming that that driver can be included in my program(s) without any royalty payments.

Alternatively, I'd be happy if someone can convince me that the 'giveio' approach is safe under all normal circumstances (i.e. safe enought to incorporate into a program that is being shipped to a large number of users).

Thanks,

Wayne
0
wfb
Asked:
wfb
  • 5
  • 3
1 Solution
 
jkrCommented:
Check out http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0398/driver.htm&nav=/msj/0398/newnav.htm ("Pop Open a Privileged Set of APIs with Windows NT Kernel Mode Drivers ") and http://www.microsoft.com/msj/0398/drivertextfigs.htm#fig12 - it comes with sample code on how to do that using a custom IOCTL_MSJDRVR_READ_CMOS (http://www.microsoft.com/msj/0398/code/driver.exe)

0
 
wfbAuthor Commented:
jkr,

Sorry, I should have mentioned that I HAD SEEN the Microsoft articles that you referenced. After reading those items, I looked up the Microsoft documentation on 'HalGetBusData' and found that:

"HalGetBusData is obsolete and is exported only to support existing drivers. Use the PnP Manager's IRP_MN_QUERY_INTERFACE and IRP_MN_READ_CONFIG requests instead."

It would seem, then, that using 'HalGetBusData' might not be the best idea, particularly with Win2000 and WinXP.

Do you know of any device drivers that use the suggested approach (i.e. IRP_MN_QUERY_INTERFACE and IRP_MN_READ_CONFIG requests)?

Thanks,

Wayne
0
 
jkrCommented:
Hmm, maybe http://www.hollistech.com/Resources/Misc%20articles/getbusdata.htm ("Replacing HalGetBusData In windows 2000") will help :o)
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
jkrCommented:
Are you still with us?
0
 
wfbAuthor Commented:
jkr,

Thanks for the reference! That article confirmed my fear that using 'HalGetBusData', etc. is probably not a good long-term solution to the problem of reading/writing to CMOS memory.

I'm afraid that I am not enough of a "driver expert" to put the information in that article to immediate use. I was hoping to find, if possible, a complete driver for "safe" access to CMOS.

By the way, I couldn't really tell from the article if this new approach would work under NT4...

Wayne
0
 
jkrCommented:
Hmm, "createBusInterface()" should allow you to achieve what you want - unfortunately I cannot test it, as I am "on the road" with just my laptop, and you can bet that I am not gonna use a test driver here :o)

>>that using 'HalGetBusData', etc. is probably not a good
>>long-term solution to the problem of reading/writing to
>>CMOS memory

That depends on your definition of "long term" - knowing MS, this is probably still gonna be supported until 2005. If you are targetting W2k/XP, I would consider it to be safe to use.
0
 
jkrCommented:
wfb, are you still with us?
0
 
wfbAuthor Commented:
jkr,

After all is said and done, I believe that using 'HalGetBusData', etc. is probably the best solution for now. Hopefully, you are correct and that MicroSoft will be supporting that function for some time yet...

Thanks very much for your help!

Wayne
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now