LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-24-2009, 04:10 PM   #1
L2S
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Rep: Reputation: 0
Scanning the PCI config space from a C application


I have not programmed in a unix like system for a while now, I need to scan the pci config space in order to display specific properties associated with my device. Is there an API that allows me to scan the pci configuration space and read specific register offsets? Can I access the pci config space using the 0xCF8 and 0xCFC IO port registers, if an API doesn't exist? I need to do this within a C application. To be specific I would like to do the same thing lspci does.

Thanks,

Brian
 
Old 02-25-2009, 09:12 AM   #2
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179
I've never gotten involved with that, but a little googling suggests that you'll get a wealth of information by downloading this, exploding and "make"ing the software, reading the resultant man page, and browsing through the source.

Hope this helps.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 12:32 PM
How do you MMAP PCI Configurations Space to User Space jbreaka4lyfe Linux - Kernel 0 03-03-2008 01:15 PM
PCI Driver (How to access info in config space) bramsey123 Programming 1 09-29-2007 03:36 PM
Keyboard scanning in linux kernel space floflette Programming 3 07-20-2004 12:43 PM
Keyboard scanning in linux kernel space floflette Linux - Newbie 3 07-20-2004 09:38 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration