andy pugh wrote:
> On 28 December 2012 09:56, Michael Haberler <[email protected]> wrote:
>
>   
>>> If rtapi abstracts inb and outb then I probably just need to make the
>>> driver use the rtapi_inb and rtapi_outb versions? (I wasn't aware of
>>> them when I wrote the driver)
>>>       
>
>   
>> There is no point whatsoever in 'abstracting' an instruction which is 
>> available on exactly one platform to start with.
>>     
>
> Doesn't the instruction require kernel-level access to hardware, though?
>   
Just to clarify a bit, the X86 instruction set has different 
instructions to access memory
and I/O ports.  The parallel port appears as a set of I/O registers, PCI 
cards can appear
as a bank of memory locations AND/OR I/O ports.

Many of the other architectures such as the ARM do not have this I/O port
architecture, so all GPIO and other dedicated peripheral I/O appears as 
memory.
You can map these memory ranges as if they were an array, refer to them
by pointers, etc.  You still need kernel permissions to set up the 
mapping and
access these registers.  But, they can be accessed by what is generally 
a user
program with the correct privileges set.  You can do this with sudo, su to
root, or have root own the program and set the s mode bit so any user 
can run it
and it gets root privilege when run.

Jon

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to