how to define the port for communication

Hi All,
As a part of my job i have to develope one pci driver that is
supposed to work in legacy mode.
So for accomplishing that task i have to define one port which will be used
for communication by both of the driver ie kernel mode driver and user mode
driver.

so i want to know is there any standard way to define the port no by using
vendorid,deviceid,function no etc.if not then how i can define the port no
so that i can use it for coomunicating with the device as wel as with user
mode driver.

thanks for your help in advance.

Regards
Nayan


Best IT jobs on naukri.com
http://www.naukri.com/tieups/tieups.php?othersrcp=3246

What you do you mean by “port”? do you mean something that you can open
with CreateFile? Or a honest COM port that has very specific semantics
and behavior? If all you want is something that you can open from user
and kernel mode and send reads/writes/IOCTLs to, use a device interface.
You can get the list of existing device interfaces in both KM and UM and
both export a way to be asynchronously notified when an interface
arrives.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
Sent: Friday, July 21, 2006 9:12 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] how to define the port for communication

Hi All,
As a part of my job i have to develope one pci driver that is
supposed to work in legacy mode.
So for accomplishing that task i have to define one port which will be
used for communication by both of the driver ie kernel mode driver and
user mode driver.

so i want to know is there any standard way to define the port no by
using vendorid,deviceid,function no etc.if not then how i can define the
port no so that i can use it for coomunicating with the device as wel as
with user mode driver.

thanks for your help in advance.

Regards
Nayan


Best IT jobs on naukri.com
http://www.naukri.com/tieups/tieups.php?othersrcp=3246


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> so i want to know is there any standard way to define the port no by using

vendorid,deviceid,function no etc.if not then how i can define the port no

I think that any PCI card must have a config space, and thus Vendor ID and
Device ID.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

hi sir
thanks for your kind support.

i have to write configuration address port in the host/PCI bridge by useing
the function WRITE_PORT_ULONG. i have the bus,device and function id.now
what should i do for writting.

Thanks in advance.
Nayan

From: “Maxim S. Shatskih”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] how to define the port for communication
>Date: Fri, 21 Jul 2006 23:19:23 +0400
>
> > so i want to know is there any standard way to define the port no by
>using
> > vendorid,deviceid,function no etc.if not then how i can define the port
>no
>
>I think that any PCI card must have a config space, and thus Vendor ID and
>Device ID.
>
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>xxxxx@storagecraft.com
>http://www.storagecraft.com
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

_________________________________________________________________
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN
Search http://server1.msn.co.in/Profile/bipashabasu.asp

You do not do this, the OS handles setting up the configuration space for
you. We still need to know what do you mean by a “PORT”?


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“nayan kumar” wrote in message news:xxxxx@ntdev…
> hi sir
> thanks for your kind support.
>
> i have to write configuration address port in the host/PCI bridge by
> useing the function WRITE_PORT_ULONG. i have the bus,device and function
> id.now what should i do for writting.
>
> Thanks in advance.
> Nayan
>
>
>>From: “Maxim S. Shatskih”
>>Reply-To: “Windows System Software Devs Interest List”
>>
>>To: “Windows System Software Devs Interest List”
>>Subject: Re: [ntdev] how to define the port for communication
>>Date: Fri, 21 Jul 2006 23:19:23 +0400
>>
>> > so i want to know is there any standard way to define the port no by
>>using
>> > vendorid,deviceid,function no etc.if not then how i can define the port
>>no
>>
>>I think that any PCI card must have a config space, and thus Vendor ID and
>>Device ID.
>>
>>Maxim Shatskih, Windows DDK MVP
>>StorageCraft Corporation
>>xxxxx@storagecraft.com
>>http://www.storagecraft.com
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>
>>To unsubscribe, visit the List Server section of OSR Online at
>>http://www.osronline.com/page.cfm?name=ListServer
>
> _________________________________________________________________
> Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try
> MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
>
>

here port means I/O Space

From: “Don Burn”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: Re:[ntdev] how to define the port for communication
>Date: Sat, 22 Jul 2006 09:47:32 -0400
>
>You do not do this, the OS handles setting up the configuration space for
>you. We still need to know what do you mean by a “PORT”?
>
>
>–
>Don Burn (MVP, Windows DDK)
>Windows 2k/XP/2k3 Filesystem and Driver Consulting
>http://www.windrvr.com
>Remove StopSpam from the email to reply
>
>
>“nayan kumar” wrote in message
>news:xxxxx@ntdev…
> > hi sir
> > thanks for your kind support.
> >
> > i have to write configuration address port in the host/PCI bridge by
> > useing the function WRITE_PORT_ULONG. i have the bus,device and function
> > id.now what should i do for writting.
> >
> > Thanks in advance.
> > Nayan
> >
> >
> >>From: “Maxim S. Shatskih”
> >>Reply-To: “Windows System Software Devs Interest List”
> >>
> >>To: “Windows System Software Devs Interest List”
> >>Subject: Re: [ntdev] how to define the port for communication
> >>Date: Fri, 21 Jul 2006 23:19:23 +0400
> >>
> >> > so i want to know is there any standard way to define the port no by
> >>using
> >> > vendorid,deviceid,function no etc.if not then how i can define the
>port
> >>no
> >>
> >>I think that any PCI card must have a config space, and thus Vendor ID
>and
> >>Device ID.
> >>
> >>Maxim Shatskih, Windows DDK MVP
> >>StorageCraft Corporation
> >>xxxxx@storagecraft.com
> >>http://www.storagecraft.com
> >>
> >>
> >>—
> >>Questions? First check the Kernel Driver FAQ at
> >>http://www.osronline.com/article.cfm?id=256
> >>
> >>To unsubscribe, visit the List Server section of OSR Online at
> >>http://www.osronline.com/page.cfm?name=ListServer
> >
> >
> > Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try
> > MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
> >
> >
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer


Spice up your IM conversations. New, colorful and animated emoticons. Get
chatting! http://server1.msn.co.in/SP05/emoticons/

The OS will configure the ports for you and then as part of the
IRP_MJ_PNP/IRP_MN_START_DEVICE deliever the configuration to your driver.
Take a look at the PCIDRV sample in the DDK (looking for
IRP_MN_START_DEVICE) or better yet in KMDF look at the
PciDrvEvtDevicePrepareHardware routine for examples of what driver does with
the configuration data the OS provides.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“nayan kumar” wrote in message news:xxxxx@ntdev…
> here port means I/O Space
>
>
>>From: “Don Burn”
>>Reply-To: “Windows System Software Devs Interest List”
>>
>>To: “Windows System Software Devs Interest List”
>>Subject: Re:[ntdev] how to define the port for communication
>>Date: Sat, 22 Jul 2006 09:47:32 -0400
>>
>>You do not do this, the OS handles setting up the configuration space for
>>you. We still need to know what do you mean by a “PORT”?
>>
>>
>>–
>>Don Burn (MVP, Windows DDK)
>>Windows 2k/XP/2k3 Filesystem and Driver Consulting
>>http://www.windrvr.com
>>Remove StopSpam from the email to reply
>>
>>
>>“nayan kumar” wrote in message
>>news:xxxxx@ntdev…
>> > hi sir
>> > thanks for your kind support.
>> >
>> > i have to write configuration address port in the host/PCI bridge by
>> > useing the function WRITE_PORT_ULONG. i have the bus,device and
>> > function
>> > id.now what should i do for writting.
>> >
>> > Thanks in advance.
>> > Nayan
>> >
>> >
>> >>From: “Maxim S. Shatskih”
>> >>Reply-To: “Windows System Software Devs Interest List”
>> >>
>> >>To: “Windows System Software Devs Interest List”
>> >>Subject: Re: [ntdev] how to define the port for communication
>> >>Date: Fri, 21 Jul 2006 23:19:23 +0400
>> >>
>> >> > so i want to know is there any standard way to define the port no by
>> >>using
>> >> > vendorid,deviceid,function no etc.if not then how i can define the
>>port
>> >>no
>> >>
>> >>I think that any PCI card must have a config space, and thus Vendor ID
>>and
>> >>Device ID.
>> >>
>> >>Maxim Shatskih, Windows DDK MVP
>> >>StorageCraft Corporation
>> >>xxxxx@storagecraft.com
>> >>http://www.storagecraft.com
>> >>
>> >>
>> >>—
>> >>Questions? First check the Kernel Driver FAQ at
>> >>http://www.osronline.com/article.cfm?id=256
>> >>
>> >>To unsubscribe, visit the List Server section of OSR Online at
>> >>http://www.osronline.com/page.cfm?name=ListServer
>> >
>> >
>> > Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more.
>> > Try
>> > MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
>> >
>> >
>>
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>
>>To unsubscribe, visit the List Server section of OSR Online at
>>http://www.osronline.com/page.cfm?name=ListServer
>
>

> Spice up your IM conversations. New, colorful and animated emoticons. Get
> chatting! http://server1.msn.co.in/SP05/emoticons/
>
>

hi sir

As i told that i am not using wdm way. i am fetching all content from
user mode and pass it to kernel mode to read memory space or i/o space.i am
not using the pci function or pci bus stack to comunicate .

i am trying to read the headers as legacy way directly from hardware not
by using a wdm way to paas the request to my lower level driver…

Can i do this in PCI context…Please help me.

Thanks
Nayan

From: “Don Burn”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: Re:[ntdev] Re:how to define the port for communication
>Date: Sat, 22 Jul 2006 11:03:52 -0400
>
>The OS will configure the ports for you and then as part of the
>IRP_MJ_PNP/IRP_MN_START_DEVICE deliever the configuration to your driver.
>Take a look at the PCIDRV sample in the DDK (looking for
>IRP_MN_START_DEVICE) or better yet in KMDF look at the
>PciDrvEvtDevicePrepareHardware routine for examples of what driver does
>with
>the configuration data the OS provides.
>
>
>–
>Don Burn (MVP, Windows DDK)
>Windows 2k/XP/2k3 Filesystem and Driver Consulting
>http://www.windrvr.com
>Remove StopSpam from the email to reply
>
>
>
>
>“nayan kumar” wrote in message
>news:xxxxx@ntdev…
> > here port means I/O Space
> >
> >
> >>From: “Don Burn”
> >>Reply-To: “Windows System Software Devs Interest List”
> >>
> >>To: “Windows System Software Devs Interest List”
> >>Subject: Re:[ntdev] how to define the port for communication
> >>Date: Sat, 22 Jul 2006 09:47:32 -0400
> >>
> >>You do not do this, the OS handles setting up the configuration space
>for
> >>you. We still need to know what do you mean by a “PORT”?
> >>
> >>
> >>–
> >>Don Burn (MVP, Windows DDK)
> >>Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >>http://www.windrvr.com
> >>Remove StopSpam from the email to reply
> >>
> >>
> >>“nayan kumar” wrote in message
> >>news:xxxxx@ntdev…
> >> > hi sir
> >> > thanks for your kind support.
> >> >
> >> > i have to write configuration address port in the host/PCI bridge by
> >> > useing the function WRITE_PORT_ULONG. i have the bus,device and
> >> > function
> >> > id.now what should i do for writting.
> >> >
> >> > Thanks in advance.
> >> > Nayan
> >> >
> >> >
> >> >>From: “Maxim S. Shatskih”
> >> >>Reply-To: “Windows System Software Devs Interest List”
> >> >>
> >> >>To: “Windows System Software Devs Interest List”
>
> >> >>Subject: Re: [ntdev] how to define the port for communication
> >> >>Date: Fri, 21 Jul 2006 23:19:23 +0400
> >> >>
> >> >> > so i want to know is there any standard way to define the port no
>by
> >> >>using
> >> >> > vendorid,deviceid,function no etc.if not then how i can define the
> >>port
> >> >>no
> >> >>
> >> >>I think that any PCI card must have a config space, and thus Vendor
>ID
> >>and
> >> >>Device ID.
> >> >>
> >> >>Maxim Shatskih, Windows DDK MVP
> >> >>StorageCraft Corporation
> >> >>xxxxx@storagecraft.com
> >> >>http://www.storagecraft.com
> >> >>
> >> >>
> >> >>—
> >> >>Questions? First check the Kernel Driver FAQ at
> >> >>http://www.osronline.com/article.cfm?id=256
> >> >>
> >> >>To unsubscribe, visit the List Server section of OSR Online at
> >> >>http://www.osronline.com/page.cfm?name=ListServer
> >> >
> >> >
> >> > Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more.
> >> > Try
> >> > MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
> >> >
> >> >
> >>
> >>
> >>
> >>—
> >>Questions? First check the Kernel Driver FAQ at
> >>http://www.osronline.com/article.cfm?id=256
> >>
> >>To unsubscribe, visit the List Server section of OSR Online at
> >>http://www.osronline.com/page.cfm?name=ListServer
> >
> >

> > Spice up your IM conversations. New, colorful and animated emoticons.
>Get
> > chatting! http://server1.msn.co.in/SP05/emoticons/
> >
> >
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

_________________________________________________________________
Shah Rukh fan? Know all about the Baadshah of Bollywood. On MSN Search
http://server1.msn.co.in/profile/shahrukh.asp

You are going to need a driver no matter what, that driver for a PCI device
is going to have to comply with plug and play which means you need the start
device support code.

Now you should consider the fact that any efforts for direct access to the
hardware from user space are likely to create huge potential secuity holes
on any system you do this on. So you really should be thinking about a
driver that does the work for the application.

At this point, I think it would help if you could explain in general your
design, such things as:

  1. I believe the application needs to access the ports, because …
  2. The device is doing the following types of operations …
  3. The device has the following has … (where this is the hardware
    that will show up in the config space, i.e. ports, interrupts, memory
    spaces).


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“nayan kumar” wrote in message news:xxxxx@ntdev…
>
> hi sir
>
> As i told that i am not using wdm way. i am fetching all content from
> user mode and pass it to kernel mode to read memory space or i/o space.i
> am not using the pci function or pci bus stack to comunicate .
>
> i am trying to read the headers as legacy way directly from hardware not
> by using a wdm way to paas the request to my lower level driver…
>
> Can i do this in PCI context…Please help me.
>
> Thanks
> Nayan

Why do you think you have to “write configuration address port in the
host/PCI bridge” and what exactly do you mean by “configuration address
port”?

In general you should not be writing anything to the host/PCI bridge. If
you are referring to the PCI config space x86 platform IO ports CF8 and
friends, you are not allowed to access these IO ports, nor are you supposed
to configure your own PCI function’s regeister address mappings, the OS does
this for you.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
Sent: Saturday, July 22, 2006 10:53 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] how to define the port for communication

here port means I/O Space

>From: “Don Burn”
> >Reply-To: “Windows System Software Devs Interest List”
> >
> >To: “Windows System Software Devs Interest List”
>
> >Subject: Re:[ntdev] how to define the port for communication
> >Date: Sat, 22 Jul 2006 09:47:32 -0400
> >
> >You do not do this, the OS handles setting up the
> configuration space
> >for you. We still need to know what do you mean by a “PORT”?
> >
> >
> >–
> >Don Burn (MVP, Windows DDK)
> >Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >http://www.windrvr.com Remove StopSpam from the email to reply
> >
> >
> >“nayan kumar” wrote in message
> >news:xxxxx@ntdev…
> > > hi sir
> > > thanks for your kind support.
> > >
> > > i have to write configuration address port in the
> host/PCI bridge by
> > > useing the function WRITE_PORT_ULONG. i have the bus,device and
> > > function id.now what should i do for writting.
> > >
> > > Thanks in advance.
> > > Nayan
> > >
> > >
> > >>From: “Maxim S. Shatskih”
> > >>Reply-To: “Windows System Software Devs Interest List”
> > >>
> > >>To: “Windows System Software Devs Interest List”
> > >>
> > >>Subject: Re: [ntdev] how to define the port for communication
> > >>Date: Fri, 21 Jul 2006 23:19:23 +0400
> > >>
> > >> > so i want to know is there any standard way to define
> the port no
> > >> > by
> > >>using
> > >> > vendorid,deviceid,function no etc.if not then how i can define
> > >> > the
> >port
> > >>no
> > >>
> > >>I think that any PCI card must have a config space, and
> thus Vendor
> > >>ID
> >and
> > >>Device ID.
> > >>
> > >>Maxim Shatskih, Windows DDK MVP
> > >>StorageCraft Corporation
> > >>xxxxx@storagecraft.com
> > >>http://www.storagecraft.com
> > >>
> > >>
> > >>—
> > >>Questions? First check the Kernel Driver FAQ at
> > >>http://www.osronline.com/article.cfm?id=256
> > >>
> > >>To unsubscribe, visit the List Server section of OSR Online at
> > >>http://www.osronline.com/page.cfm?name=ListServer
> > >
> > >
> > > Sexy, sultry, sensuous. - see why Bipasha Basu is all
> that and more.
> > > Try MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
> > >
> > >
> >
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> >
> >To unsubscribe, visit the List Server section of OSR Online at
> >http://www.osronline.com/page.cfm?name=ListServer
>
>

> Spice up your IM conversations. New, colorful and animated
> emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer
>

hi sir heartly thanks for your help.

now can i follow thse steps…

  1. will read the value form cf8 and will put it on any temp variable.
  2. then we will write our data on cf8…
    3.then after we will write that temp value to cf8…

I think this will not crash our system and our writting will happen…
Is this a good way to write in legacy way.do you agree with my approch

Thanks
Nayan

From: “Mark Roddy”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: RE: [ntdev] how to define the port for communication
>Date: Sat, 22 Jul 2006 12:25:52 -0400
>
>Why do you think you have to “write configuration address port in the
>host/PCI bridge” and what exactly do you mean by “configuration address
>port”?
>
>In general you should not be writing anything to the host/PCI bridge. If
>you are referring to the PCI config space x86 platform IO ports CF8 and
>friends, you are not allowed to access these IO ports, nor are you supposed
>to configure your own PCI function’s regeister address mappings, the OS
>does
>this for you.
>
>=====================
>Mark Roddy DDK MVP
>Windows 2003/XP/2000 Consulting
>Hollis Technology Solutions 603-321-1032
>www.hollistech.com
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
> > Sent: Saturday, July 22, 2006 10:53 AM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] how to define the port for communication
> >
> > here port means I/O Space
> >
> >
> > >From: “Don Burn”
> > >Reply-To: “Windows System Software Devs Interest List”
> > >
> > >To: “Windows System Software Devs Interest List”
> >
> > >Subject: Re:[ntdev] how to define the port for communication
> > >Date: Sat, 22 Jul 2006 09:47:32 -0400
> > >
> > >You do not do this, the OS handles setting up the
> > configuration space
> > >for you. We still need to know what do you mean by a “PORT”?
> > >
> > >
> > >–
> > >Don Burn (MVP, Windows DDK)
> > >Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > >http://www.windrvr.com Remove StopSpam from the email to reply
> > >
> > >
> > >“nayan kumar” wrote in message
> > >news:xxxxx@ntdev…
> > > > hi sir
> > > > thanks for your kind support.
> > > >
> > > > i have to write configuration address port in the
> > host/PCI bridge by
> > > > useing the function WRITE_PORT_ULONG. i have the bus,device and
> > > > function id.now what should i do for writting.
> > > >
> > > > Thanks in advance.
> > > > Nayan
> > > >
> > > >
> > > >>From: “Maxim S. Shatskih”
> > > >>Reply-To: “Windows System Software Devs Interest List”
> > > >>
> > > >>To: “Windows System Software Devs Interest List”
> > > >>
> > > >>Subject: Re: [ntdev] how to define the port for communication
> > > >>Date: Fri, 21 Jul 2006 23:19:23 +0400
> > > >>
> > > >> > so i want to know is there any standard way to define
> > the port no
> > > >> > by
> > > >>using
> > > >> > vendorid,deviceid,function no etc.if not then how i can define
> > > >> > the
> > >port
> > > >>no
> > > >>
> > > >>I think that any PCI card must have a config space, and
> > thus Vendor
> > > >>ID
> > >and
> > > >>Device ID.
> > > >>
> > > >>Maxim Shatskih, Windows DDK MVP
> > > >>StorageCraft Corporation
> > > >>xxxxx@storagecraft.com
> > > >>http://www.storagecraft.com
> > > >>
> > > >>
> > > >>—
> > > >>Questions? First check the Kernel Driver FAQ at
> > > >>http://www.osronline.com/article.cfm?id=256
> > > >>
> > > >>To unsubscribe, visit the List Server section of OSR Online at
> > > >>http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > > >
> > > > Sexy, sultry, sensuous. - see why Bipasha Basu is all
> > that and more.
> > > > Try MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
> > > >
> > > >
> > >
> > >
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
> > >http://www.osronline.com/article.cfm?id=256
> > >
> > >To unsubscribe, visit the List Server section of OSR Online at
> > >http://www.osronline.com/page.cfm?name=ListServer
> >
> >

> > Spice up your IM conversations. New, colorful and animated
> > emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online
> > at http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

_________________________________________________________________
Who will win Bollywood’s most coveted IIFA awards? You decide! Cast your
vote! http://server1.msn.co.in/sp06/IIFA2006/static/weekend.asp

> i am trying to read the headers as legacy way directly from hardware not

by using a wdm way to paas the request to my lower level driver…

Can i do this in PCI context…Please help me.

No, you cannot, since you will disturb PCI.SYS and hang the OS.

Modern days, all hardware drivers must be WDM.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

> 1. will read the value form cf8 and will put it on any temp variable.

You cannot access port 0xcf8 in Windows, period. Only PCI.SYS is allowed to do
this.

Write a WDM driver, and use the features provided by PCI.SYS to do such things.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

No it is not a good way to do this. None of us are quite sure what exactly
you are trying to do, but we are strongly urging you to not continue down
the path you are going.

You should never be using the legacy PCI config space. You cannot access
these registers from user mode and doing so from kernel mode is very likely
to cause the system to malfunction.

If you want to control a pci function you need to write a pci function
driver. If you want to control pci configuration in general, this is not
something that the windows os supports.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
Sent: Saturday, July 22, 2006 2:27 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] how to define the port for communication

hi sir heartly thanks for your help.

now can i follow thse steps…

  1. will read the value form cf8 and will put it on any
    temp variable.
  2. then we will write our data on cf8…
    3.then after we will write that temp value to cf8…

I think this will not crash our system and our writting
will happen…
Is this a good way to write in legacy way.do you agree with my approch

Thanks
Nayan

>From: “Mark Roddy”
> >Reply-To: “Windows System Software Devs Interest List”
> >
> >To: “Windows System Software Devs Interest List”
>
> >Subject: RE: [ntdev] how to define the port for communication
> >Date: Sat, 22 Jul 2006 12:25:52 -0400
> >
> >Why do you think you have to “write configuration address
> port in the
> >host/PCI bridge” and what exactly do you mean by
> “configuration address
> >port”?
> >
> >In general you should not be writing anything to the
> host/PCI bridge.
> >If you are referring to the PCI config space x86 platform IO
> ports CF8
> >and friends, you are not allowed to access these IO ports,
> nor are you
> >supposed to configure your own PCI function’s regeister address
> >mappings, the OS does this for you.
> >
> >=====================
> >Mark Roddy DDK MVP
> >Windows 2003/XP/2000 Consulting
> >Hollis Technology Solutions 603-321-1032 www.hollistech.com
> >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
> > > Sent: Saturday, July 22, 2006 10:53 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: Re:[ntdev] how to define the port for communication
> > >
> > > here port means I/O Space
> > >
> > >
> > > >From: “Don Burn”
> > > >Reply-To: “Windows System Software Devs Interest List”
> > > >
> > > >To: “Windows System Software Devs Interest List”
> > >
> > > >Subject: Re:[ntdev] how to define the port for communication
> > > >Date: Sat, 22 Jul 2006 09:47:32 -0400
> > > >
> > > >You do not do this, the OS handles setting up the
> > > configuration space
> > > >for you. We still need to know what do you mean by a “PORT”?
> > > >
> > > >
> > > >–
> > > >Don Burn (MVP, Windows DDK)
> > > >Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > > >http://www.windrvr.com Remove StopSpam from the email to reply
> > > >
> > > >
> > > >“nayan kumar” wrote in message
> > > >news:xxxxx@ntdev…
> > > > > hi sir
> > > > > thanks for your kind support.
> > > > >
> > > > > i have to write configuration address port in the
> > > host/PCI bridge by
> > > > > useing the function WRITE_PORT_ULONG. i have the
> bus,device and
> > > > > function id.now what should i do for writting.
> > > > >
> > > > > Thanks in advance.
> > > > > Nayan
> > > > >
> > > > >
> > > > >>From: “Maxim S. Shatskih”
> > > > >>Reply-To: “Windows System Software Devs Interest List”
> > > > >>
> > > > >>To: “Windows System Software Devs Interest List”
> > > > >>
> > > > >>Subject: Re: [ntdev] how to define the port for communication
> > > > >>Date: Fri, 21 Jul 2006 23:19:23 +0400
> > > > >>
> > > > >> > so i want to know is there any standard way to define
> > > the port no
> > > > >> > by
> > > > >>using
> > > > >> > vendorid,deviceid,function no etc.if not then how i can
> > > > >> > define the
> > > >port
> > > > >>no
> > > > >>
> > > > >>I think that any PCI card must have a config space, and
> > > thus Vendor
> > > > >>ID
> > > >and
> > > > >>Device ID.
> > > > >>
> > > > >>Maxim Shatskih, Windows DDK MVP
> > > > >>StorageCraft Corporation
> > > > >>xxxxx@storagecraft.com
> > > > >>http://www.storagecraft.com
> > > > >>
> > > > >>
> > > > >>—
> > > > >>Questions? First check the Kernel Driver FAQ at
> > > > >>http://www.osronline.com/article.cfm?id=256
> > > > >>
> > > > >>To unsubscribe, visit the List Server section of OSR
> Online at
> > > > >>http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > > >
>
> > > > > _ Sexy, sultry, sensuous. - see why Bipasha Basu is all
> > > that and more.
> > > > > Try MSN Search
> http://server1.msn.co.in/Profile/bipashabasu.asp
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >—
> > > >Questions? First check the Kernel Driver FAQ at
> > > >http://www.osronline.com/article.cfm?id=256
> > > >
> > > >To unsubscribe, visit the List Server section of OSR Online at
> > > >http://www.osronline.com/page.cfm?name=ListServer
> > >
> > >
_
> > > Spice up your IM conversations. New, colorful and animated
> > > emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
> >http://www.osronline.com/article.cfm?id=256
> >
> >To unsubscribe, visit the List Server section of OSR Online at
> >http://www.osronline.com/page.cfm?name=ListServer
>
> _________________________________________________________________
> Who will win Bollywood’s most coveted IIFA awards? You
> decide! Cast your vote!
> http://server1.msn.co.in/sp06/IIFA2006/static/weekend.asp
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer
>

Hi All,
Thanks for your valuable suggession.i will follow the WDM approch
for my work.

Thanks
Nayan

From: “Maxim S. Shatskih”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] how to define the port for communication
>Date: Sat, 22 Jul 2006 23:14:26 +0400
>
> > 1. will read the value form cf8 and will put it on any temp variable.
>
>You cannot access port 0xcf8 in Windows, period. Only PCI.SYS is allowed to
>do
>this.
>
>Write a WDM driver, and use the features provided by PCI.SYS to do such
>things.
>
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>xxxxx@storagecraft.com
>http://www.storagecraft.com
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

_________________________________________________________________
One and only Ash. Find out all about her. Only on MSN Search
http://server1.msn.co.in/profile/aishwarya.asp

What if another processor, (or just another thread,) happens to run code in
pci.sys between steps 1 & 3? Then you’ve just corrupted something
somewhere.

  • Jake Oshins

“nayan kumar” wrote in message news:xxxxx@ntdev…
> hi sir heartly thanks for your help.
>
> now can i follow thse steps…
>
> 1. will read the value form cf8 and will put it on any temp variable.
> 2. then we will write our data on cf8…
> 3.then after we will write that temp value to cf8…
>
> I think this will not crash our system and our writting will happen…
> Is this a good way to write in legacy way.do you agree with my approch
>
> Thanks
> Nayan
>
>
>>From: “Mark Roddy”
>>Reply-To: “Windows System Software Devs Interest List”
>>
>>To: “Windows System Software Devs Interest List”
>>Subject: RE: [ntdev] how to define the port for communication
>>Date: Sat, 22 Jul 2006 12:25:52 -0400
>>
>>Why do you think you have to “write configuration address port in the
>>host/PCI bridge” and what exactly do you mean by “configuration address
>>port”?
>>
>>In general you should not be writing anything to the host/PCI bridge. If
>>you are referring to the PCI config space x86 platform IO ports CF8 and
>>friends, you are not allowed to access these IO ports, nor are you
>>supposed
>>to configure your own PCI function’s regeister address mappings, the OS
>>does
>>this for you.
>>
>>=====================
>>Mark Roddy DDK MVP
>>Windows 2003/XP/2000 Consulting
>>Hollis Technology Solutions 603-321-1032
>>www.hollistech.com
>>
>> > -----Original Message-----
>> > From: xxxxx@lists.osr.com
>> > [mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
>> > Sent: Saturday, July 22, 2006 10:53 AM
>> > To: Windows System Software Devs Interest List
>> > Subject: Re:[ntdev] how to define the port for communication
>> >
>> > here port means I/O Space
>> >
>> >
>> > >From: “Don Burn”
>> > >Reply-To: “Windows System Software Devs Interest List”
>> > >
>> > >To: “Windows System Software Devs Interest List”
>> >
>> > >Subject: Re:[ntdev] how to define the port for communication
>> > >Date: Sat, 22 Jul 2006 09:47:32 -0400
>> > >
>> > >You do not do this, the OS handles setting up the
>> > configuration space
>> > >for you. We still need to know what do you mean by a “PORT”?
>> > >
>> > >
>> > >–
>> > >Don Burn (MVP, Windows DDK)
>> > >Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> > >http://www.windrvr.com Remove StopSpam from the email to reply
>> > >
>> > >
>> > >“nayan kumar” wrote in message
>> > >news:xxxxx@ntdev…
>> > > > hi sir
>> > > > thanks for your kind support.
>> > > >
>> > > > i have to write configuration address port in the
>> > host/PCI bridge by
>> > > > useing the function WRITE_PORT_ULONG. i have the bus,device and
>> > > > function id.now what should i do for writting.
>> > > >
>> > > > Thanks in advance.
>> > > > Nayan
>> > > >
>> > > >
>> > > >>From: “Maxim S. Shatskih”
>> > > >>Reply-To: “Windows System Software Devs Interest List”
>> > > >>
>> > > >>To: “Windows System Software Devs Interest List”
>> > > >>
>> > > >>Subject: Re: [ntdev] how to define the port for communication
>> > > >>Date: Fri, 21 Jul 2006 23:19:23 +0400
>> > > >>
>> > > >> > so i want to know is there any standard way to define
>> > the port no
>> > > >> > by
>> > > >>using
>> > > >> > vendorid,deviceid,function no etc.if not then how i can define
>> > > >> > the
>> > >port
>> > > >>no
>> > > >>
>> > > >>I think that any PCI card must have a config space, and
>> > thus Vendor
>> > > >>ID
>> > >and
>> > > >>Device ID.
>> > > >>
>> > > >>Maxim Shatskih, Windows DDK MVP
>> > > >>StorageCraft Corporation
>> > > >>xxxxx@storagecraft.com
>> > > >>http://www.storagecraft.com
>> > > >>
>> > > >>
>> > > >>—
>> > > >>Questions? First check the Kernel Driver FAQ at
>> > > >>http://www.osronline.com/article.cfm?id=256
>> > > >>
>> > > >>To unsubscribe, visit the List Server section of OSR Online at
>> > > >>http://www.osronline.com/page.cfm?name=ListServer
>> > > >
>> > > >
>> > > > Sexy, sultry, sensuous. - see why Bipasha Basu is all
>> > that and more.
>> > > > Try MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > >—
>> > >Questions? First check the Kernel Driver FAQ at
>> > >http://www.osronline.com/article.cfm?id=256
>> > >
>> > >To unsubscribe, visit the List Server section of OSR Online at
>> > >http://www.osronline.com/page.cfm?name=ListServer
>> >
>> >

>> > Spice up your IM conversations. New, colorful and animated
>> > emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/
>> >
>> >
>> > —
>> > Questions? First check the Kernel Driver FAQ at
>> > http://www.osronline.com/article.cfm?id=256
>> >
>> > To unsubscribe, visit the List Server section of OSR Online
>> > at http://www.osronline.com/page.cfm?name=ListServer
>> >
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>
>>To unsubscribe, visit the List Server section of OSR Online at
>>http://www.osronline.com/page.cfm?name=ListServer
>
> _________________________________________________________________
> Who will win Bollywood’s most coveted IIFA awards? You decide! Cast your
> vote! http://server1.msn.co.in/sp06/IIFA2006/static/weekend.asp
>
>

What Jake, and Mark, and Don are saying is that there are documented ways
to access the PCI information. CF8 belongs to PCI.SYS. It is not yours,
nor can you acquire the spinlock or other sync mechanisms that control
access to it. Since you cannot intelligently access that resource,
attempting to brute force it verges on system insanity.

Your real problem arises not with those of us who insist on playing by the
rules and accessing the PCI registers using the proper, documented means,
but in other rogues and wildcatters, such as yourself, who have decided
that “We are to good to abide by the rules, and we will do what we want
when we want.” That is by definition, a train wreck.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jake Oshins
Sent: Monday, July 24, 2006 5:37 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] how to define the port for communication

What if another processor, (or just another thread,) happens to run code
in
pci.sys between steps 1 & 3? Then you’ve just corrupted something
somewhere.

  • Jake Oshins

“nayan kumar” wrote in message
news:xxxxx@ntdev…
> hi sir heartly thanks for your help.
>
> now can i follow thse steps…
>
> 1. will read the value form cf8 and will put it on any temp variable.
> 2. then we will write our data on cf8…
> 3.then after we will write that temp value to cf8…
>
> I think this will not crash our system and our writting will
happen…
> Is this a good way to write in legacy way.do you agree with my approch
>
> Thanks
> Nayan
>
>
>>From: “Mark Roddy”
>>Reply-To: “Windows System Software Devs Interest List”
>>
>>To: “Windows System Software Devs Interest List”
>>Subject: RE: [ntdev] how to define the port for communication
>>Date: Sat, 22 Jul 2006 12:25:52 -0400
>>
>>Why do you think you have to “write configuration address port in the
>>host/PCI bridge” and what exactly do you mean by “configuration address
>>port”?
>>
>>In general you should not be writing anything to the host/PCI bridge. If
>>you are referring to the PCI config space x86 platform IO ports CF8 and
>>friends, you are not allowed to access these IO ports, nor are you
>>supposed
>>to configure your own PCI function’s regeister address mappings, the OS
>>does
>>this for you.
>>
>>=====================
>>Mark Roddy DDK MVP
>>Windows 2003/XP/2000 Consulting
>>Hollis Technology Solutions 603-321-1032
>>www.hollistech.com
>>
>> > -----Original Message-----
>> > From: xxxxx@lists.osr.com
>> > [mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
>> > Sent: Saturday, July 22, 2006 10:53 AM
>> > To: Windows System Software Devs Interest List
>> > Subject: Re:[ntdev] how to define the port for communication
>> >
>> > here port means I/O Space
>> >
>> >
>> > >From: “Don Burn”
>> > >Reply-To: “Windows System Software Devs Interest List”
>> > >
>> > >To: “Windows System Software Devs Interest List”
>> >
>> > >Subject: Re:[ntdev] how to define the port for communication
>> > >Date: Sat, 22 Jul 2006 09:47:32 -0400
>> > >
>> > >You do not do this, the OS handles setting up the
>> > configuration space
>> > >for you. We still need to know what do you mean by a “PORT”?
>> > >
>> > >
>> > >–
>> > >Don Burn (MVP, Windows DDK)
>> > >Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> > >http://www.windrvr.com Remove StopSpam from the email to reply
>> > >
>> > >
>> > >“nayan kumar” wrote in message
>> > >news:xxxxx@ntdev…
>> > > > hi sir
>> > > > thanks for your kind support.
>> > > >
>> > > > i have to write configuration address port in the
>> > host/PCI bridge by
>> > > > useing the function WRITE_PORT_ULONG. i have the bus,device and
>> > > > function id.now what should i do for writting.
>> > > >
>> > > > Thanks in advance.
>> > > > Nayan
>> > > >
>> > > >
>> > > >>From: “Maxim S. Shatskih”
>> > > >>Reply-To: “Windows System Software Devs Interest List”
>> > > >>
>> > > >>To: “Windows System Software Devs Interest List”
>> > > >>
>> > > >>Subject: Re: [ntdev] how to define the port for communication
>> > > >>Date: Fri, 21 Jul 2006 23:19:23 +0400
>> > > >>
>> > > >> > so i want to know is there any standard way to define
>> > the port no
>> > > >> > by
>> > > >>using
>> > > >> > vendorid,deviceid,function no etc.if not then how i can define
>> > > >> > the
>> > >port
>> > > >>no
>> > > >>
>> > > >>I think that any PCI card must have a config space, and
>> > thus Vendor
>> > > >>ID
>> > >and
>> > > >>Device ID.
>> > > >>
>> > > >>Maxim Shatskih, Windows DDK MVP
>> > > >>StorageCraft Corporation
>> > > >>xxxxx@storagecraft.com
>> > > >>http://www.storagecraft.com
>> > > >>
>> > > >>
>> > > >>—
>> > > >>Questions? First check the Kernel Driver FAQ at
>> > > >>http://www.osronline.com/article.cfm?id=256
>> > > >>
>> > > >>To unsubscribe, visit the List Server section of OSR Online at
>> > > >>http://www.osronline.com/page.cfm?name=ListServer
>> > > >
>> > > >
>> > > > Sexy, sultry, sensuous. - see why Bipasha Basu is all
>> > that and more.
>> > > > Try MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > >—
>> > >Questions? First check the Kernel Driver FAQ at
>> > >http://www.osronline.com/article.cfm?id=256
>> > >
>> > >To unsubscribe, visit the List Server section of OSR Online at
>> > >http://www.osronline.com/page.cfm?name=ListServer
>> >
>> >

>> > Spice up your IM conversations. New, colorful and animated
>> > emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/
>> >
>> >
>> > —
>> > Questions? First check the Kernel Driver FAQ at
>> > http://www.osronline.com/article.cfm?id=256
>> >
>> > To unsubscribe, visit the List Server section of OSR Online
>> > at http://www.osronline.com/page.cfm?name=ListServer
>> >
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>
>>To unsubscribe, visit the List Server section of OSR Online at
>>http://www.osronline.com/page.cfm?name=ListServer
>
> _________________________________________________________________
> Who will win Bollywood’s most coveted IIFA awards? You decide! Cast your

> vote! http://server1.msn.co.in/sp06/IIFA2006/static/weekend.asp
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer