LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 12-05-2016, 02:26 PM   #1
khhyle
LQ Newbie
 
Registered: Dec 2016
Location: San Jose, California
Distribution: Red Hat (Tikanga)
Posts: 6

Rep: Reputation: Disabled
Clarification of Proc Filesystem for PCIe


I am relatively new to working with the Linux kernel and had a question about the proc fs and what exactly is going on.

I have been using the proc/bus/pci/xx/xx.x files to read config data (ID's, link status, etc.) for one of my PCI devices but I am curious.. is this proc file actually memory mapped to the device's configuration space? If I write to this proc file am I actually writing to the config registers of the device?

I am curious because I am trying to create a test where I stress the PCI link by writing to the device over the link for an extended period of time and record any correctable errors that occur. It is important that I am actually writing to the device and not just some sort of cached copy of the file somewhere that won't actually stress the link.
 
Old 12-06-2016, 08:56 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Reads and writes are interpreted by kernel code, but generate reads and writes of PCI space.

http://lxr.free-electrons.com/source...i/proc.c?v=4.7
 
1 members found this post helpful.
Old 12-06-2016, 11:53 AM   #3
khhyle
LQ Newbie
 
Registered: Dec 2016
Location: San Jose, California
Distribution: Red Hat (Tikanga)
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
Reads and writes are interpreted by kernel code, but generate reads and writes of PCI space.

http://lxr.free-electrons.com/source...i/proc.c?v=4.7
Gotcha - so the proc file can be used as a tool to communicate with PCI space for both reads/writes.

Is there a method for interacting with PCI space that is more preferred by the community rather than using the proc file? Just out of curiosity.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Clarification of Proc Filesystem for PCIe khhyle Linux - Newbie 3 12-05-2016 04:32 PM
proc filesystem Aquarius_Girl Linux - General 11 10-07-2009 02:03 AM
Need clarification on encrypted root filesystem -kc- Slackware 4 01-21-2009 08:14 PM
/proc filesystem dawsonbdky Linux - General 1 08-16-2004 10:06 AM
/proc filesystem dawsonbdky Linux - General 1 08-13-2004 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 06:53 PM.

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