ts-7000
[Top] [All Lists]

[ts-7000] Re: bad A/D performance problem on ts9700

To:
Subject: [ts-7000] Re: bad A/D performance problem on ts9700
From: "Jesse Off" <>
Date: Sun, 18 Dec 2005 22:57:26 -0000
>     fd = open ("/dev/mem" , O_RDWR);

You should be opening /dev/mem with O_RDWR|O_SYNC, otherwise Linux may
give your mmap() a mapping that allows for use of the the instruction
and data caches-- which is not what you want when polling a register. 

Linux is supposed to be "clever" and know whether the address is that
of RAM (where the caches can be used) or hardware registers (where
they shouldn't).  It does this by assuming anything at a lower
physical address than the highest physical address of RAM it knows
about is also RAM.  This is a reasonable assumption on a traditionally
set up x86, but not on the ARM.  With the TS-7260/TS-7250 with 64MB of
RAM, there is a little bit of RAM at low address's and some again at a
high address.  This arrangement leads the /dev/mem driver to believe
the entire physical address space is RAM and it should hand out
cacheable mappings to all mmap() calls.  Fortunately, the O_SYNC
option disables this behavior... This as far as I can tell is
completely undocumented-- we figured it out only after looking through
the source code of the kernel when some of our production test code we
wrote on the TS-7200 stopped working on the TS-7250 w/64MB RAM.  

//Jesse Off





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/CFFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

<*> 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