GSoC Linux UIO driver for PRU

Nils Hölscher nilhoel1 at gmail.com
Sat Jul 20 08:21:53 UTC 2019


On Sat, 20 Jul 2019 at 03:01, Chris Johns <chrisj at rtems.org> wrote:

> On 19/7/19 8:32 pm, Nils Hölscher wrote:
> > I am currently adding more and more libbsd deps to my build, that are
> not in
> > rtems or rtems-libbsd.
> > Now I have been touching these to files of the BSD kernel:
> >
> https://github.com/freebsd/freebsd/blob/0966ce5cd477cd7c8b63b0f9de75396aa5939032/sys/arm/include/cpu-v4.h
> >
> https://github.com/freebsd/freebsd/blob/0966ce5cd477cd7c8b63b0f9de75396aa5939032/sys/arm/include/atomic-v6.h
> > Throwing a good dozen of warning when compiling and I only need one call
> from
> > these files.
> > This is needed in the pru driver to distinguish between prussv1 and
> prussv2, a
> > feature I definitely want.
> > FYI: prussv1 is on the TI Sitara AM18xx SoCs and v2 on the AM35xx.
> >
> > So the question is should I try to resolve those warnings and try to
> port the
> > whole files to rtems or should I try to just pick  what I need and be
> done?
> >
>
> What are the warnings?
>
In file included from ../../sys/arm/ti/ti_cpuid.c:50:0:
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function
'tlb_flush_all_local':
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:347:2: warning:
implicit declaration of function 'dsb' [-Wimplicit-function-declaration]
  dsb();
  ^~~
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function
'icache_sync':
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:488:2: warning:
implicit declaration of function 'isb' [-Wimplicit-function-declaration]
  isb();
  ^~~
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function
'dcache_inv_poc':
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:550:2: warning:
implicit declaration of function 'cpu_l2cache_inv_range'; did you mean
'icache_inv_all'? [-Wimplicit-function-declaration]
  cpu_l2cache_inv_range(pa, size);
  ^~~~~~~~~~~~~~~~~~~~~
  icache_inv_all
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function
'dcache_wb_poc':
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:606:2: warning:
implicit declaration of function 'cpu_l2cache_wb_range'
[-Wimplicit-function-declaration]
  cpu_l2cache_wb_range(pa, size);
  ^~~~~~~~~~~~~~~~~~~~
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function
'dcache_wbinv_poc':
../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:625:2: warning:
implicit declaration of function 'cpu_l2cache_wbinv_range'; did you mean
'dcache_wbinv_poc'? [-Wimplicit-function-declaration]
  cpu_l2cache_wbinv_range(pa, size);
  ^~~~~~~~~~~~~~~~~~~~~~~
  dcache_wbinv_poc

>
> Do you have the libbsd changes in a repo somewhere so I can have a look?
>
I am currently keeping the changes in the rtems-pru repo with absolute
paths.
The files of interest would be:
https://github.com/nilhoel1/rtems-pru/tree/pruss-shell/freebsd/sys/arm/include

And the file that includes these
https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/sys/arm/ti/ti_cpuid.c#L46
I also extracted the assembler call I need here:
https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/include/bsp/cp15_midr_get.h

Best,
Nils

>
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190720/bdb566a8/attachment-0002.html>


More information about the devel mailing list