The other issue is that the BIOS is expecting to use the SMBus controller through a firmware interface, so taking over the controller in a driver could end up hosing the BIOS. Best to handle this through the BIOS.
-p
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Thursday, September 29, 2011 11:16 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] SMBus driver and Windows XP - recommended reading?
For the record, I don’t consider Windows approach to the SMBUS “unstable close to the hardware hackery” as Max apparently does.
Well, it’s to avoid a yellow bang in device manager, really.
No… there IS no code in Windows that talks to the SMBUS host controller. Like I said earlier, Windows leaves this to the BIOS.
Like I told you in my first post: “Windows expects the BIOS to be the one that talks to the SMBus.” I’m not guessing here. I work in this area a lot.
There was a very narrowly defined class driver API back in Windows XP. To the best of my knowledge, it never worked properly, and was only used in two very specific implementations.
All the Intel SMBUS host registers in the ICH/PCH are pretty much the same. So, ICH8, ICH11, whatever… no change.
So, if you really wanted to you could uninstall the Intel SMBUS “driver” (which, as you said, is no driver at all) and install your own. The problem with this, of course, is that you’d need some way to ensure that nobody else tried to do this at the same time. For this to work, you need to be sure that the SMBUS host controller is configured to generate “normal” IRQs and not SMIs or whatever.
Bottom line: Windows really considers the SMBUS to be the province of the BIOS. This is because in most PCs the SMBUS is actually used for a wide variety of things, from configuring the memory to reporting POST codes to interfacing with the network card at power down/up. None of these things is under Windows control, so Windows just stays out of the world of SMBUS.
Therefore, the recommended solution would most typically be to change the BIOS code to do what you want. That could include surfacing a device via ACPI with methods that you can then invoke via IOCTL_ACPI_EVAL_METHOD.
On the other hand you COULD write a Windows driver that talks to the SMBUS host controller in the ICH/PCH. The main problem with that approach is suppose YOU want to talk to the SMBUS host controller, and somebody ELSE’s driver wants to talk to the SMBUS host controller.
I guess it depends on what you want to do, what you’re connecting, and who your client is. If you’re writing a driver for a big OEM, changing the BIOS is no big thing. If you’re writing a driver for some little vendor who thinks they’ve thought of a clever idea by connecting their device via the SMBUS, that might be a good thing or not, depending.
Peter
OSR
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer