How to acess pci configuration space from application

Hi,
I want to write a win8 application to read pci BAR address from pci configuration space. But I can not find a api for it. Is there any ideas about it?

Thanks

No APIs for it. what bigger problem are you trying to solve? The PCI bar address belongs to the device, anyone reading it that is not the device driver has built in race conditions

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of ??
Sent: Thursday, November 20, 2014 6:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to acess pci configuration space from application

Hi,
I want to write a win8 application to read pci BAR address from pci configuration space. But I can not find a api for it. Is there any ideas about it?

Thanks

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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

Thanks for your response.
We want to operate SPI that addressed in a bar space in pci board from application. If so, we needs to write a driver to do that.

Thanks

At 2014-11-21 10:30:27, “Doron Holan” wrote:

No APIs for it. what bigger problem are you trying to solve? The PCI bar address belongs to the device, anyone reading it that is not the device driver has built in race conditions

From:xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of ??
Sent: Thursday, November 20, 2014 6:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to acess pci configuration space from application

Hi,

I want to write a win8 application to read pci BAR address from pci configuration space. But I can not find a api for it. Is there any ideas about it?

Thanks

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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

If the spi is enumerated as a distinct device, it is safe to write a driver that provides an ioctl interface to the hardware. Don’t provide raw access to the hw itself to user mode. If the spi is not enumerated by the bios, update the acpi table to describe it.

d

Bent from my phone


From: 陈钢mailto:greencg
Sent: ‎11/‎20/‎2014 10:13 PM
To: Windows System Software Devs Interest Listmailto:xxxxx; Doron Holanmailto:xxxxx
Subject: Re:RE: [ntdev] How to acess pci configuration space from application

Thanks for your response.
We want to operate SPI that addressed in a bar space in pci board from application. If so, we needs to write a driver to do that.

Thanks

At 2014-11-21 10:30:27, “Doron Holan” wrote:
No APIs for it. what bigger problem are you trying to solve? The PCI bar address belongs to the device, anyone reading it that is not the device driver has built in race conditions

From: xxxxx@lists.osr.commailto:xxxxx [mailto:xxxxx@lists.osr.commailto:xxxxx] On Behalf Of ??
Sent: Thursday, November 20, 2014 6:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to acess pci configuration space from application

Hi,
I want to write a win8 application to read pci BAR address from pci configuration space. But I can not find a api for it. Is there any ideas about it?

Thanks

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:greencg>

Yes

Sent from my Windows Phone


From: 陈钢mailto:greencg
Sent: ‎11/‎20/‎2014 10:14 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re:RE: [ntdev] How to acess pci configuration space from application

Thanks for your response.
We want to operate SPI that addressed in a bar space in pci board from application. If so, we needs to write a driver to do that.

Thanks

At 2014-11-21 10:30:27, “Doron Holan” wrote:
No APIs for it. what bigger problem are you trying to solve? The PCI bar address belongs to the device, anyone reading it that is not the device driver has built in race conditions

From: xxxxx@lists.osr.commailto:xxxxx [mailto:xxxxx@lists.osr.commailto:xxxxx] On Behalf Of ??
Sent: Thursday, November 20, 2014 6:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to acess pci configuration space from application

Hi,
I want to write a win8 application to read pci BAR address from pci configuration space. But I can not find a api for it. Is there any ideas about it?

Thanks

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:greencg>

Hi
You have to use IO driver. Go to there. You can find the sample.
http://www.codeproject.com/Articles/74925/A-Simple-Demo-for-WDF-Driver-Development

Best Regards,

>>>> Original Message <<<<<
From: WindowsSystemSoftwareDevsInterestList
To: “WindowsSystemSoftwareDevsInterestList”
Sent Date: Fri,21 Nov 2014 10:26:17 Asia/Taipei
Subject: [ntdev] How to acess pci configuration space from application

Hi,
I want to write a win8 application to read pci BAR address from pci configuration space. But I can not find a api for it. Is there any ideas about it?

Thanks — NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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

Truly a really bad idea. I’ve been contracted to fix this more than once, and in most cases the end result was rip out the driver and a good portion of the user space application. The OP needs to write a real driver based on good design practices that provides the functions they need.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of clteng@ms6.hinet.net
Sent: Friday, November 21, 2014 7:04 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to acess pci configuration space from application

Hi
You have to use IO driver. Go to there. You can find the sample.
http://www.codeproject.com/Articles/74925/A-Simple-Demo-for-WDF-Driver-Development

Best Regards,

— 本郵件來自HiNet WebMail —

>>>> Original Message <<<<<
From: WindowsSystemSoftwareDevsInterestList mailto:xxxxx
To: “WindowsSystemSoftwareDevsInterestList” mailto:xxxxx Sent Date: Fri,21 Nov 2014 10:26:17 Asia/Taipei
Subject: [ntdev] How to acess pci configuration space from application

Hi,
I want to write a win8 application to read pci BAR address from pci configuration space. But I can not find a api for it. Is there any ideas about it?

Thanks

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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</mailto:xxxxx></mailto:xxxxx>