Accesiing the IO space of SMbus host controller

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
 
0
Utf
4/27/2010 6:18:01 AM
development.device.drivers 941 articles. 0 followers. Follow

4 Replies
1143 Views

Similar Articles

[PageSpeed] 0

vbkr <vbkr@discussions.microsoft.com> 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, timr@probo.com
Providenza & Boekelheide, Inc.
0
Tim
4/28/2010 6:06:07 AM
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 <vbkr@discussions.microsoft.com> 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, timr@probo.com
> Providenza & Boekelheide, Inc.
> .
> 
0
Utf
4/28/2010 4:33:01 PM
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 <vbkr@discussions.microsoft.com> 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, timr@probo.com
> > Providenza & Boekelheide, Inc.
> > .
> > 
0
Utf
4/30/2010 5:31:02 PM
vbkr <vbkr@discussions.microsoft.com> 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, timr@probo.com
Providenza & Boekelheide, Inc.
0
Tim
5/1/2010 3:15:24 AM
Reply:

Similar Artilces:

Spaces in telephone numbers?? Why?
Outlook appears to have some strange behaviour. When importing contacts from my Pocket PC or when creating new ones there are spaces inserted into the phone numbers. I'm living in Germany (international number prefix 0049 or +49) and all my German numbers being in this format +4912345678 get converted to this: +49 12345678 Any number from any other country (say america 001 or spain 0034) just stays like it is: +112345678 +3412345678 This strange behavious must have something to do with me living in Germany and having the country specific settings. No other program does this, only Outlook...

Why doesn't my puctuation show until I type the next space?
When I type with punctuation marks(quotes, apostrophes) they do not show until I type the next letter. Why? How can I alter this? Check that your Windows regional settings keyboard layout is set to the layout which you actually have. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>...

XmlSerializer, System.IO.FileNotFoundException
Hello, I am attempting to have a class that I have written serialize so that it can be both passed as a parameter or return value for a webservice, and also be serialized to disk using the XmlSerializer. When this class is decalred as a return value for a WebMethod in an XML WebService I receive the following exception: System.IO.FileNotFoundException: File or assembly name rexz5r1o.dll, or one of its dependencies, was not found. File name: "rexz5r1o.dll".... I searched the newgroups for other people that experienced this problem and found there to be many - with most of the fixe...

insufficient privilege to control the folder
Hello, Has anyone seen anything like this before? A short time ago my Outlook INBOX suddenly became empty. I had clicked on an email to delete it. When I attempted to delete it said that I had insufficient privilege to control the folder. Then all emails disappeared. Email still comes in but I can't find all the other email I had in my INBOX in the deleted items or any other folder. Thanks, Dan ...

Problem Spaces
Hi, I'm comparing the string values in a column of Dealer Names to those stored in an Array of Dealer Names. My code isn't finding any matches (although there are plenty) & I think it is something to do with this; When debug it & step through, I notice that the value of the string in my array looks something like this; "Joe Bloggs & Sons Ltd" but the variable is returning Dealer names from the column that look something like this; "Joe Bloggs & Sons Ltd " I'm guessing the amount spaces between the last letter of the string &...

Serial IO
I wanted to ping the group and see if someone could quick describe the proper way to read/write to a serial port handle in C++. What I have developed thus far is a CSerialIO class that when its Open() method is invoked, a background worker thread is created similar to the following code block: BOOL CSerialIO::Open(... parameters here) { // open file handle to comport // GetCommState() called // update flags and comm state // SetCommState() called // PurgeComm() called for TXCLEAR and RXCLEAR // SetCommMask() called m_hCommThread = CreateThread(NULL,0,CSeria...

Edit Control read only mode.
Hi, I have this edit control in a dialog which I want in a read only mode. In my program, I set the text in this control. But frustrating thing is, the text is always highligted when the dialog shows up. Is there any way to clear this highlighting? Also, is there a way to keep the background white even if it is readonly? Thanks, -PJ "pj" <praneshrj@gmail.com> wrote in message news:1181174120.387283.225960@a26g2000pre.googlegroups.com... > Hi, > > I have this edit control in a dialog which I want in a read only mode. > In my program, I set the text in this cont...

Control color skin
Hello, I am updating an old legacy application (5 years old). I was able to get the application to compile with VC++2008. However, I noticed, that the button controls are still the old style (tan), and not the new colors, which are white with a blue trim. In the resource editor, the controls are disiplayed with the new colors, but after I compile the applications, and then run the program, the old colors are displayed. What changes do I have to make, to the code, libraries.., to be able to see the new control colors? TIA, -jc Do you have an old style manifest compiling i...

Space.
Hello, I need know if variable contents space, for example: myvar = "da tas" if myvar (contens space) then .... Thanks Tom Hi Tom myvar = "da tas" If InStr(1, myvar , " ") Then MsgBox "Space" End If ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore! Free Excel Forum http://www.ozgrid.com/forum *** ...

Control Toolbox
How can I keep Control Toolbox from opening every time I open an e-mail for printing. Thanks! ...

Set default for line spacing
How can I change the default of single line spacing to 1.5 lines as my default? See http://word.mvps.org/FAQs/Customization/CustomizeNormalTemplate.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "gilloz" <gilloz@discussions.microsoft.com> wrote in message news:159A68A5-A502-4FE3-BCFF-1B3E5C047913@microsoft.com... > How can I change the default of single line spacing to 1.5 lines as my > default? > WORD 2007 Home tab / Paragraph group / click on arrow in lower right hand corner / P...

extra line spaces from Word to Apple Mail
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Hello, I use Word 2008 and Apple Mail 3.6. When I copy text from Word 2008 to Apple Mail I get extra line spaces that I cannot figure out how to remove. Nothing I do in Word seems to help and I'm stumped. How do I do this? <br><br>Thanks, Steve Hi Steve: Check the formatting of the Style applied to the text in Word. It's probably "space after". Cheers On 16/03/10 1:23 AM, in article 59bb5406.-1@webcrossing.JaKIaxP2ac0, "karlhar@officeformac.com" <karlhar@o...

line spacing vs paragraph spacing
I understand paragraph spacing. When i write I like to delineate points by using short sentences within a paragraph. Like the old typewriter carriage return - 1 for line, two for paragraph. So how do i set up a line return key so it maintains the same spacing as if word automatically wrapped? I'm using 2007. thanks One way I've worked around is to set enter/paragraph key to 0 spacing before & after & single line. Then it's press once for line & twice for paragraph. "WebWalker" wrote: > I understand paragraph spacing. When i write I like...

Like Criteria Question using a control from a Form
I am trying to do a like criteria with 2 wildcards using a text box as the parameter. The original data comes from our ERP system that I ODBC to. Everything I read tells me I am writing the criteria correctly but it will not pull any data or I get an ODBC fail message. But if I take out the Form control as the parameter and just type the parameter it works. Here is my criteria Like"*" & [Forms]![NewBlockForm]![Text0] & "*" Does anyone have any suggestions as why this is not working. I am trying to filter down the results that the production pe...

I can't back space more than one character or repeat a character,
I was prompted while filing out a form to have duplicate key strokes stopped. I made the mistke of accepting and now I can't type any dupe characters without difficulty (must pause momentarilly) and I can't back space without the same pause. I also cannot find how to disable the thing. This happens in all typing situations, including here. You've probably enabled FilterKeys, one of the Accessibility Options. You can turn it off in Windows Control Panel and at the same time disable the shortcut key that you pressed to enable it. -- Suzanne S. Barnhill Microsoft M...

Files with ^Spaces^ in the path or name won't open...
When I doubleclick on a file that has a space in it's name or a space at some point in the path it will not open properly in Excel... for a file with the following path 'c:\WINNT\Profiles\rjenkin9\Desktop\Person\File Name.xls. Excel gives the following message: 'c:\WINNT\Profiles\rjenkin9\Desktop\Person\File.xls could not be found. Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved, or deleted. If ...

Accesiing the IO space of SMbus host controller
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 vbkr <vbkr@discussions.microsoft.c...

Access 2007 where's the spacing tool?
Hi all, I'm using Access 2007 for the first time (always have used 2000) and I'm designing a form, and I can't seem to find the spacing tool (horizontal, vertical make equal increase decrease). Googling turns up only info on 2003 - PLEASE tell me this functionality was not dropped - manually setting labels et al to be equidistant is incredibly time consuming!! TIA, -- SusanV It's on the Arrange tab of the ribbon (right hand end.) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rat...

Connection/Refresh Control unavailable for imported XML data
Hello, I'm using Excel 2007, and I'm experimenting with the XML capabilities of Excel (that exist for Excel 2003 if I'm correct, since I have followed Excel 2007 doc and installed an Office Excel 2003 XML Tools Add-in). In particular, I have a sheet that is populated from an external XML file (created by exporting the range). When the XML file has been updated, I can update the data range in the Excel sheet by manually refreshing the data (right-click/Refresh, or menu Data/RefreshAll). However, I can't turn on the refresh options: when I select "Connections/<the conne...

Hosting Microsoft CRM 3.0
Hi Does any body knows, if it would be possible to create a real ASP solution, with the next version of Microsoft CRM. Would it be possible to do this with both the web and Outlook version? Thanks /Jakob Hi, Yes, it is possible to create an application using web-services or by SDK. mail me for more details on mscrmexpert@gmail.com -- Microsoft CRM Expert - CRM & .Net All about Microsoft CRM 3.0- read http://microsoftcrm3.blogspot.com "Jakob Benediktson" wrote: > Hi > Does any body knows, if it would be possible to create a real ASP solution, > with the n...

Removing CEdit controls from CDialog!
I am creating texboxes at runtime and placing it on a CDialog the CEdit objects are stored in a CObArray and used in later point of reference. As I am creating textboxes at runtime i want to remove the controls from the CDialog at runtime. For e.g., When a button is clicked 10 textboxes are displayed and in another button click i want the textboxes to be removed from the CDialog. Please guide me how to acheive it. Do you want to destroy the edit boxes or just hide them? "Iyappan" <iyappanekp@hotmail.com> wrote in message news:050901c370e4$f49a4070$a101280a@phx.gbl... ...

find a space; replace w/no space?
I have a very large dataset with a "Name" field that people have been using with this format: Lastname, Firstname. (Note the space after the comma.) I want to reconfigure the table with 2 separate fields, one for First Name and one for Last Name, so I did the "Text to Columns" thing and split the data into two fields. However, all of the new entries for First Name are now preceded by a space, inherited from the previous format. We're talking thousands of entries here, so not really feasible to manually go into each record and remove the leading space. (I'm...

ActiveX Control Setting
When opening a new CRM Email in Sales for Outlook client, I receive the following message: "Your current security settings prohibit running ActiveX controls on this page. As a result, the page may not display correctly." I do have a custom signature with an image attached when sending all emails, but I do not receive this error when opening a new NONCRM email. Any advice? This is an Outlook security setting. Go into your Outlook Options, and on the Security settings tab, modify your existing security to allow ActiveX controls for your CRM site in the Zone settings area. Als...

Problem with creating controls dynamically
Hi to All, I have an dialog based application in which i am creating controls(button) dynamically. My problem is whenever i launch my application, i see some controls are not coming quickly as soon as the dialog is launched. I am creating the controls in the onInitDialog(), and using Visual Studio 6.0. Thanks in advance, You need to show some code. Note that creating buttons dynamically is something that ideally should be avoided if possible (it isn't always possible, but in general remember that it is easier to make an existing button invisible than to create a new one). ...

Word 2003 Calendar Controls on User Form and Word 2007
I have some templates that were created in Word 2003 which has a form that has a calendar control on it. The calendar control won't load within the form in Word 2007 any more. I get an error message which reads: "Microsoft Form Could not load an object because it is not available on this machine". The calendar control within the form won't load on my PC however if I go into our Citrix Network environment, the form works perfectly (the calendar control loads within the form). Any ideas on how to get the calendar control to load within the form on my PC? ...