Solved

Device driver to read/write CMOS memory?

Posted on 2002-07-29
8
662 Views
Last Modified: 2013-12-03
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
Comment
Question by:wfb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 7185312
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
 

Author Comment

by:wfb
ID: 7185393
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
 
LVL 86

Expert Comment

by:jkr
ID: 7185599
Hmm, maybe http://www.hollistech.com/Resources/Misc%20articles/getbusdata.htm ("Replacing HalGetBusData In windows 2000") will help :o)
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 86

Expert Comment

by:jkr
ID: 7196124
Are you still with us?
0
 

Author Comment

by:wfb
ID: 7196296
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
 
LVL 86

Expert Comment

by:jkr
ID: 7196339
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
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 7243149
wfb, are you still with us?
0
 

Author Comment

by:wfb
ID: 7246398
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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 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