EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Linux and EPICS threads
From: "John Quintana" <[email protected]>
To: "'Eric Norum'" <[email protected]>, "'Mark Rivers'" <[email protected]>
Cc: <[email protected]>
Date: Wed, 30 Jul 2003 13:44:56 -0500
The problem with ioperm is that you can only open up the first 0x3ff
ports.  After than you need to use iopl.  

Given the fact that we are talking about code that needs to talk
directly to hardware, it might make more sense to call iopl whenever a
new thread is created (I guess this would be through EpicsThreadCreate)
Under Linux, the X servers use iopl so that they can talk to the video
cards.   If its good enough for an X server, it should be good enough
for an ioc which needs to be intimate with the hardware anywayThat way,
the linux stuff is dealt with only in one location.

John Quintana                                  630-252-0221  (ph.)
Northwestern University                   630-252-0226  (fax)
Building 432/A001                           [email protected]
9700 S. Cass Ave
Argonne IL 60439



-----Original Message-----
From: Eric Norum [mailto:[email protected]] 
Sent: Wednesday, July 30, 2003 12:49 PM
To: Mark Rivers
Cc: [email protected]
Subject: Re: Linux and EPICS threads

Mark Rivers wrote:
> Andrew Johnson wrote:
> 
> 
>>You will need to worry about more than one thread - each 
>>different scan period has its own thread, so it just takes the user
> 
> changing 
> 
>>the SCAN field of the record for your code to have to call iopl(3) yet
> 
> 
>>again, and if it's set to Process Passive then there are several other
> 
> 
>>tasks that might be used depending on how the processing is initiated.
> 
> 
> Actually, it's not that bad in my case.  All of the actual I/O is done
> by an MPF server task.  Device support just sends messages to the MPF
> server, so the tasks that process the record do not need iopl()
> privilege.
> 
> I've got it working by calling iopl() in the MPF server task
> initialization.  It's not as clean as I'd like, because it requires
some
> #ifdef linux code, but it's OK.
> 

I'd recommend calling ioperm() rather than iopl() since ioperm opens 
only a specified window into the inp/outp space so you can't 
accidentally tromp on some other (critical) port.


-- 
Eric Norum                                 [email protected]
Advanced Photon Source                     Phone: (630) 252-4793
Argonne National Laboratory


References:
Re: Linux and EPICS threads Eric Norum

Navigate by Date:
Prev: Re: Linux and EPICS threads Eric Norum
Next: RE: Linux and EPICS threads Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Linux and EPICS threads Eric Norum
Next: RE: Linux and EPICS threads Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·