EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe
From: <[email protected]>
To: <[email protected]>, <[email protected]>, <[email protected]>
Date: Tue, 27 Sep 2016 07:59:03 +0000
Hi Tim,

From: Mooney, Tim M. [mailto:[email protected]]
> But I do have one question already.  For registers added to the FPGA, all one
> needs is the physical address and a call to mmap(), and those registers are
> available to user-space code. Is this because memory added to the FPGA is
> unknown to the cache?

I'm a little bit vague about the details, but in essence this is right.  I think the kernel is configured to set up all of memory as cacheable and the remaining address space as uncacheable.  On our system /proc/iomem shows address space 00000000-3fffffff as System RAM and the rest as various bits of IO space.  Actually, I think this information is probably in the device tree, come to think of it.

>  If so, it there a way to tell the cache not to look at a
> section of the processor's physical memory, so the same strategy might also
> work there?

There probably is, and it's probably not a great idea!  You could in principle tell the kernel to reserver a dedicated block of memory for IO on booting, or you could probably mark memory as uncacheable in chunks after allocating it with __get_free_pages(), but it certainly wouldn't be easier than the recipe I've suggested!  Also, reading from uncached memory is liable to be *very* slow.

I think that it's normally better to cooperate with the cache rather than bypassing it, and I suspect you'd need to dig deeper into the kernel than I ever have to do this right.  I can give you some sample code for an unrelated Zynq project if it would help you, but you'd need to completely rewrite it for your application, of course.


On the device tree, it is mostly a closed book to me, but I see this entry in mine:

	memory { device_type = "memory"; reg = <0x0 0x40000000>; };

This is consistent with the iomem entry.

-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom



References:
RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Madden, Timothy J.
Re: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Pete Jemian
Re: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe D Peter Siddons
Re: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Steve Shoaf
RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Mooney, Tim M.
RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe michael.abbott
RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Mooney, Tim M.

Navigate by Date:
Prev: RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Mooney, Tim M.
Next: Problem in 3.14.12.5 with osd/WIN32/osdTime.h with latest version of MinGW Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Mooney, Tim M.
Next: RE: Cross Compiling EPICS base for Xilinx Zynq, Petalinux- Recipe Madden, Timothy J.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 27 Sep 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·