ts-7000
[Top] [All Lists]

[ts-7000] Re: Write to memory without mmap()?

To:
Subject: [ts-7000] Re: Write to memory without mmap()?
From: "WouterS" <>
Date: Fri, 16 Jul 2010 07:21:02 -0000
Hi,

--- In  "Simon" <> wrote:
>
> Hi, I've been using the peekpoke instructions as inline assembly and they 
> work perfectly. However, I was wondering if there's a way, using inline 
> assembly, to use these functions without mmap'ing. Maybe set some flags 
> that'd let me control the memory locations directly?
> 
> I just want to be able to communicate with the GPIO ports directly instead of 
> having to go through virtual memory mapping. Is there a way to do this?
> 
> Any help is appreciated.

I am not sure I understand your question, so I will post a general answer. The 
linux kernel starts processes in a protected memory space, the memory addresses 
your applications uses and receives are not linked to physical memory.

Using mmap() you basically create a pointer to a physical memory location. It 
is a way in linux to get around the protected memory and is used on the TS 
boards to control GPIO and other peripherals.

Most applications use mmap() once to generate a pointer to the base address and 
then use pointer math to get pointers to other addresses beyond the base 
address.

In short, to get past virtual memory mapping you use mmap(), which will only 
work from a process with root access to protect the system.



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU