Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Accesiing the IO space of SMbus host controller

Reply
Thread Tools Display Modes

Accesiing the IO space of SMbus host controller

 
 
vbkr
Guest
Posts: n/a

 
      04-27-2010
Hi,
I need to develop a driver to read and write to a SMbus host controller.
I have VIA VX855 chipset.My device is in the IO space of PCI bus 0 device 17
function 0.
My device is in the motherboard so it is always connected.so it is not shown
in the device manager.

I looked into portIO driver but I am not sure how to get the base address of
my device in the driver since it is not plug and play?

Can anyone suggest me what should be my approach towards this?

Thanks,
vbkr



Do I need to write a PCI function driver or portIO driver

 
Reply With Quote
 
 
 
 
Tim Roberts
Guest
Posts: n/a

 
      04-28-2010
vbkr <> wrote:
>
>I need to develop a driver to read and write to a SMbus host controller.
>I have VIA VX855 chipset.My device is in the IO space of PCI bus 0 device 17
>function 0.
>My device is in the motherboard so it is always connected.so it is not shown
>in the device manager.
>
>I looked into portIO driver but I am not sure how to get the base address of
>my device in the driver since it is not plug and play?
>
>Can anyone suggest me what should be my approach towards this?
>
>Do I need to write a PCI function driver or portIO driver


We've just had a rather frustrating exchange on the NTDEV list about this.
SMbus is a shadowy world that has a visceral existence somewhere between
BIOS and kernel, and that makes it rather difficult to access reliably.

Why do you need to read and write this space? What do you need to
accomplish?

If you know the I/O address, you can use portIO to access it. But if you
need to use PCI configuration space to find the I/O port number, that's a
more difficult problem. You can use HalGetBusData, although that's not
guaranteed safe.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
vbkr
Guest
Posts: n/a

 
      04-28-2010
Hi Tim,
I have tried to read the PCI config space but I get 0xffff as the return
value.
I have written a filter driver to PCIbus and a function driver which is run
as a service.
I have used IRP_MN_QUERY_INTERFACE ,ReadConfig and WriteConfig routines to
access it.
I also tried to read different PCI devices VID and DID but I get the same
0xffff as return value.

I am trying this on windows 7.

Any suggestions?

Thanks,
vbkr

"Tim Roberts" wrote:

> vbkr <> wrote:
> >
> >I need to develop a driver to read and write to a SMbus host controller.
> >I have VIA VX855 chipset.My device is in the IO space of PCI bus 0 device 17
> >function 0.
> >My device is in the motherboard so it is always connected.so it is not shown
> >in the device manager.
> >
> >I looked into portIO driver but I am not sure how to get the base address of
> >my device in the driver since it is not plug and play?
> >
> >Can anyone suggest me what should be my approach towards this?
> >
> >Do I need to write a PCI function driver or portIO driver

>
> We've just had a rather frustrating exchange on the NTDEV list about this.
> SMbus is a shadowy world that has a visceral existence somewhere between
> BIOS and kernel, and that makes it rather difficult to access reliably.
>
> Why do you need to read and write this space? What do you need to
> accomplish?
>
> If you know the I/O address, you can use portIO to access it. But if you
> need to use PCI configuration space to find the I/O port number, that's a
> more difficult problem. You can use HalGetBusData, although that's not
> guaranteed safe.
> --
> Tim Roberts,
> Providenza & Boekelheide, Inc.
> .
>

 
Reply With Quote
 
vbkr
Guest
Posts: n/a

 
      04-30-2010
Hi Tim,
My basic aim was to read and write to IO address 0x400.
When I try to see in the device manager view by type.I did see that the
port IO address is shown as motherboard resources(0x400-0x41F).
This is only for prototype environment.

how do I access this address and assign these resources to my port driver?

I would appreciate your help and time you spend.
Thanks,
vbkr

"vbkr" wrote:

> Hi Tim,
> I have tried to read the PCI config space but I get 0xffff as the return
> value.
> I have written a filter driver to PCIbus and a function driver which is run
> as a service.
> I have used IRP_MN_QUERY_INTERFACE ,ReadConfig and WriteConfig routines to
> access it.
> I also tried to read different PCI devices VID and DID but I get the same
> 0xffff as return value.
>
> I am trying this on windows 7.
>
> Any suggestions?
>
> Thanks,
> vbkr
>
> "Tim Roberts" wrote:
>
> > vbkr <> wrote:
> > >
> > >I need to develop a driver to read and write to a SMbus host controller.
> > >I have VIA VX855 chipset.My device is in the IO space of PCI bus 0 device 17
> > >function 0.
> > >My device is in the motherboard so it is always connected.so it is not shown
> > >in the device manager.
> > >
> > >I looked into portIO driver but I am not sure how to get the base address of
> > >my device in the driver since it is not plug and play?
> > >
> > >Can anyone suggest me what should be my approach towards this?
> > >
> > >Do I need to write a PCI function driver or portIO driver

> >
> > We've just had a rather frustrating exchange on the NTDEV list about this.
> > SMbus is a shadowy world that has a visceral existence somewhere between
> > BIOS and kernel, and that makes it rather difficult to access reliably.
> >
> > Why do you need to read and write this space? What do you need to
> > accomplish?
> >
> > If you know the I/O address, you can use portIO to access it. But if you
> > need to use PCI configuration space to find the I/O port number, that's a
> > more difficult problem. You can use HalGetBusData, although that's not
> > guaranteed safe.
> > --
> > Tim Roberts,
> > Providenza & Boekelheide, Inc.
> > .
> >

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      05-01-2010
vbkr <> wrote:
>
>My basic aim was to read and write to IO address 0x400.
>When I try to see in the device manager view by type.I did see that the
>port IO address is shown as motherboard resources(0x400-0x41F).
>This is only for prototype environment.
>
>how do I access this address and assign these resources to my port driver?


From a driver, if you know that's the address you need, you just call
READ_PORT_ULONG (or USHORT or UCHAR) with register number 0x400. You don't
actually need a reservation to access the port.

Now, you need to understand that you're stepping on a port that belongs to
another driver. That's not safe. But if you're just experimenting, have
at it.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Defrag increases "used space" as reported by command-line defrag - mwhiting001@hotmail.com.NO_SPAM Windows Vista Performance 15 06-19-2009 08:34 PM
Slow Vista startup Jedi940 Windows Vista Performance 1 01-13-2008 08:50 PM
My PnP Monitor is seen as Non PnP??? Colin Windows Vista Hardware 1 11-29-2007 05:01 PM
cannot install Vista ACPI error Salsakidd Windows Vista Installation 6 10-10-2007 10:12 AM
NVIDIA GeForece 6800 and Vista w2m Windows Vista Hardware 19 06-11-2007 11:34 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59