<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 20 Jul 2019 at 03:01, Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 19/7/19 8:32 pm, Nils Hölscher wrote:<br>
> I am currently adding more and more libbsd deps to my build, that are not in<br>
> rtems or rtems-libbsd.<br>
> Now I have been touching these to files of the BSD kernel:<br>
> <a href="https://github.com/freebsd/freebsd/blob/0966ce5cd477cd7c8b63b0f9de75396aa5939032/sys/arm/include/cpu-v4.h" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd/blob/0966ce5cd477cd7c8b63b0f9de75396aa5939032/sys/arm/include/cpu-v4.h</a><br>
> <a href="https://github.com/freebsd/freebsd/blob/0966ce5cd477cd7c8b63b0f9de75396aa5939032/sys/arm/include/atomic-v6.h" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd/blob/0966ce5cd477cd7c8b63b0f9de75396aa5939032/sys/arm/include/atomic-v6.h</a><br>
> Throwing a good dozen of warning when compiling and I only need one call from<br>
> these files.<br>
> This is needed in the pru driver to distinguish between prussv1 and prussv2, a<br>
> feature I definitely want.<br>
> FYI: prussv1 is on the TI Sitara AM18xx SoCs and v2 on the AM35xx.<br>
> <br>
> So the question is should I try to resolve those warnings and try to port the<br>
> whole files to rtems or should I try to just pick  what I need and be done?<br>
> <br>
<br>
What are the warnings?<br></blockquote>In file included from ../../sys/arm/ti/ti_cpuid.c:50:0:<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function 'tlb_flush_all_local':<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:347:2: warning: implicit declaration of function 'dsb' [-Wimplicit-function-declaration]<br>  dsb();<br>  ^~~<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function 'icache_sync':<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:488:2: warning: implicit declaration of function 'isb' [-Wimplicit-function-declaration]<br>  isb();<br>  ^~~<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function 'dcache_inv_poc':<br>../../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]<br>  cpu_l2cache_inv_range(pa, size);<br>  ^~~~~~~~~~~~~~~~~~~~~<br>  icache_inv_all<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function 'dcache_wb_poc':<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h:606:2: warning: implicit declaration of function 'cpu_l2cache_wb_range' [-Wimplicit-function-declaration]<br>  cpu_l2cache_wb_range(pa, size);<br>  ^~~~~~~~~~~~~~~~~~~~<br>../../sys/arm/ti/../../../freebsd/sys/arm/include/cpu-v6.h: In function 'dcache_wbinv_poc':<br>../../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]<br>  cpu_l2cache_wbinv_range(pa, size);<br>  ^~~~~~~~~~~~~~~~~~~~~~~<br><div>  dcache_wbinv_poc </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Do you have the libbsd changes in a repo somewhere so I can have a look?<br></blockquote><div>I am currently keeping the changes in the rtems-pru repo with absolute paths.</div><div>The files of interest would be:</div><div><a href="https://github.com/nilhoel1/rtems-pru/tree/pruss-shell/freebsd/sys/arm/include">https://github.com/nilhoel1/rtems-pru/tree/pruss-shell/freebsd/sys/arm/include</a> </div><div>And the file that includes these</div><div><a href="https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/sys/arm/ti/ti_cpuid.c#L46">https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/sys/arm/ti/ti_cpuid.c#L46</a><br></div><div>I also extracted the assembler call I need here:</div><div><a href="https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/include/bsp/cp15_midr_get.h">https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/include/bsp/cp15_midr_get.h</a><br></div><div><br></div><div>Best,</div><div>Nils</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
Chris<br>
</blockquote></div></div>