Driver to access the IO mapped hardware

Hi,
I need to implement a windows driver to read and write to registers of IO mapped SM bus controller.This device does not have device and vendor ID but it is IO mapped. I do have the PCI configuration registers base address and offsets (this is how I assume the host controller is in PCI address space)as well as host controllers registers base address offsets.
I have gone through the portio sample and but I was not sure how to get resources for my driver since the host controller is seen on the device manager() .
How do I map my driver to the Controller resources?
Am I in the right direction? Any suggestions.
Any other sample drivers which would help me?

I appreciate your help.
Thanks
vbkr

>This device does not have device and vendor ID but it is IO mapped.
I believe that every PCI devices should have vendor/device ID’d. Otherwise it is not a proper way to design PCI hardware.

Igor Sharovar

> I need to implement a windows driver to read and write to registers of IO mapped SM bus

controller.This device does not have device and vendor ID but it is IO mapped. I do have the PCI
configuration registers

Is it PCI-connected? is it config space working? then why no vendor and device IDs?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi ,
Thanks for your time.
Because of NDA My client has given me only the following info
1.SMBus Controller have no Vendor ID and Device ID
2.SMbus host controller is in IO space belong to south bridge
3.Sent me SMbus host controller hardware registers mentioning that base address of the host controller is in PCI configuration registers.

I also have an .exe from cleint to verify that register read /writes from slave device(basically temperature sensor) on the SM bus controller with the my driver read/writes.

Sharovar,
the above info is what I got from the client

Maxim,
Is it PCI-connected? is it config space working? then why no vendor and device
IDs?
Based on the above info I assume to be in the PCI configuration space.
As of now I am unable to read these registers?

Do I need to have any additional info before I proceed further?

Thanks,
vbkr

A PCI device should be PnP capable. And only Device/Vendor ID’s provide PnP capability.
I am assuming that you need to write SMB Client driver which require to provide Hardware ID’s in *.inf file.
Ask your customer why their hardware doesn’t have Vendors/Device ID’s and how they think their hardware could be installed and work.

Igor Sharovar

Sharovar,
Thanks your reply.
I am using ViA VX855 chipset and believe that the sensor is attached to the motherboard.
I learned from message groups that microsoft supports only for ATI(is this true?) and provides smbclass.sys,smbhc.sys files.
Are these files generic?I think this is possible only if I have device and vendor IDs.

Is it a good idea to write a non pnp KMDF driver by knowing the base adresses of hardware registers ?Will it be a difficult approach?

Thanks,
vbkr

Where is Chris??? I bet he is going to love it -after all, legacy KMDF driver for PCI device without VID/DID in PCI Configuration space is not the kind of thing we come across every other day…

Anton Bassov

Does that chipset/media processor have documentation? I can’t find any.

You’ve got way too many unknowns going on here.

mm

bharat kumar v wrote:

I also have an .exe from cleint to verify that register read /writes
from slave device(basically temperature sensor) on the SM bus
controller with the my driver read/writes.

You what? What does that even mean? How can your .exe “verify” or actually do anything to your mystery PCI device without a driver? If it has a driver embedded in it, then what you are even bothering to do?

More questions than answers on this one…

>I am using ViA VX855 chipset and believe that the sensor is attached to the >motherboard.
For this chipset PCI Vendor ID is 1106 and Device ID is 0409
http://pci-ids.ucw.cz/read/PC/1106
You could use this pair Vendor/Device ID for your SBM Client.

Igor Sharovar

Chris,
Let me make you all clear of what I have and what customer asked me to do.

I have a embedded mini-PC with VX855 motherboard with windows embedded standard 7 OS on it.
Customer sent me an .exe called superBIOS.exe through which I can read and write to slave device(Basically Temperature controller) registers address on SMbus host controller.
Customer does not want to give any details about the .exe how it works because of confidentiality.
I do have a one datasheet ( “The intent of this datasheet is to make it easy for a direct user?a board designer, a system designer, or a BIOS developer?to use the VIA Nano processor”) and no other documents.

Since the above .exe is not user friendly,customer requirement is to have a simple GUI application along with windows driver to read and write the temperature thresholds from the slave device controller.

PNP manager doesnot show me SMbus controller on device manager as well.
I prepared to do non PNP driver to access the hardware registers of SM bus host controller but somwhow I am struggling to start on this.
Do you think that I need to have some information before I start to do ?
I would like to count on your experience .

Thanks,
vbkr

If .exe application could read/write to hardware it means that already exist a driver. Your first question should be about this driver.

Igor Sharovar

Sharovar,
Thanks for the your time.
I would query them about the driver.

Thanks
vbkr

xxxxx@hotmail.com wrote:

Where is Chris??? I bet he is going to love it -after all, legacy KMDF driver for PCI device without VID/DID in PCI Configuration space is not the kind of thing we come across every other day…

It’s an SMBus device. He said that in his very first description. Did
no one else notice this before turning on their sarcasm generators?

SMBus is a shadowy netherworld that exists somewhere between BIOS and
operating system. It was designed to be used from the BIOS. I thought
I understood from past messages that the Windows support for SMBus was
awkward at best. I think he really does need some low-level advice here.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I was trying to figure out how to phrase this without being totally
insulting.

Mark Roddy

On Mon, Apr 19, 2010 at 12:33 PM, Tim Roberts wrote:

> xxxxx@hotmail.com wrote:
> > Where is Chris??? I bet he is going to love it -after all, legacy
> KMDF driver for PCI device without VID/DID in PCI Configuration space is not
> the kind of thing we come across every other day…
> >
>
> It’s an SMBus device. He said that in his very first description. Did
> no one else notice this before turning on their sarcasm generators?
>
> SMBus is a shadowy netherworld that exists somewhere between BIOS and
> operating system. It was designed to be used from the BIOS. I thought
> I understood from past messages that the Windows support for SMBus was
> awkward at best. I think he really does need some low-level advice here.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> 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
>

> It’s an SMBus device. He said that in his very first description. Did no one else notice this

before turning on their sarcasm generators?

Actually, if I got it right, he is speaking about SMBus controller that appears in PCI configuration space in the form bus A -device X -function N, and,hence, is a subject to all rules that PCI devices have to meet (including reporting VID/DID in the configuration space at the specific offsets)…

I thought I understood from past messages that the Windows support for SMBus was awkward at best.

…which is hardly surprising, taking into account that SMBus is generally not supposed to be user configurable or accessible. At this point my “sarcasm generator” starts itching again, so that I would prefer to refrain from any further comments on the issue…

Anton Bassov

bharat kumar v wrote:

Customer sent me an .exe called superBIOS.exe through which I
can read and write to slave device(Basically Temperature controller)
registers address on SMbus host controller.

Customer does not want to give any details about the .exe how it
works because of confidentiality.

This is ridiculous: they want you to duplicate the .exe’s behavior, but won’t tell you how their version works? Assuming you succeed, won’t you learn how their .exe implicitly works anyway?

Also, couldn’t you just create a GUI that invokes SuperBIOS.exe rather than duplicate the effort of talking to the hardware?

I’m with Anton on this one, this whole thing reeks of a bogus project, I suggest you stop wasting your time on it unless they get serious w/ you…

Hi all,
Thanks for your inputs.
Atlast customer sent me the following assembly routines:
Read_SMBus,ResetSMBusHost,AccessSMBDevice,Write_SMBus.
He also mentions that the application is not going to be commercial.
Can any one advice me the best approach?Any sample driver to start with?

Thanks,
vbkr

Could you use these routines in your GUI application?
Or do you need something extra?

Igor Sharovar

Sharovar,
I can not use these routines in my GUI as they use previledged IN and OUT calls.
I am trying to use the portio sample by assigning the port base address(0x0400) and installed with the available genport.inf.I am using sample application gpdread.exe to read the port by sending the offset.I am basically trying to read the registers.

I get returned value for offset 0,1,2,3 but anything >3 number gives me error
"IOCTL failed error code 998 " which means “ERROR_NOACCESS - Invalid access to memory location”
Can anyone let me know why I am getting this error?
In genport .inf I see the following

[PortIO.LC0]
ConfigPriority=DESIRED
IOConfig=300-303(3ff::slight_smile: ; 10 bit decode ranging from 300 - 303

[PortIO.LC1]
ConfigPriority=NORMAL
IOConfig=4@300-3ff(3ff::slight_smile: ; 4 ports starting anywhere between 300 and 3fc

Is this the reason for the error I am seeing?

Thanks,
vkbr