Solved

Device driver to read/write CMOS memory?

Posted on 2002-07-29
8
655 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
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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