Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-11-04 Thread Joel Sherrill
On Wed, Nov 4, 2020 at 6:28 AM Heinz Junkes 
wrote:

> Hello, Chris,
> unfortunately it is not quite so simple. The Beatnik board uses
> for the Ethernet the Marvell Discovery II MV64360 (GT64360)
> and there two of the three built-in Ethernet controllers.
>
> Till Straumann has written a driver for it called "mve" and unfortunately
> it
> is not available in freebsd. Probably too rare or I did not search
> properly.
>

Yep. That's right. It is a custom driver for RTEMS as best I can tell. This
BSP and the mvme500 have the same challenge.

I've started another thread on the broader topic of BSPs needed by
the EPICS community and their path forward. I didn't want to hijack this one
since it needs to stay focused on this one board and technical.

--joel

>
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
>
>
>
> > On 27. Oct 2020, at 05:06, Chris Johns  wrote:
> >
> > On 26/10/20 7:32 pm, Heinz Junkes wrote:
> >> Good morning Chris,
> >> i will now try out libbsd on a MVME6100 (beatnik).
> >> Is the mentioned patch in git?
> >
> > The PCI patch is in rtems-libbsd.git on the master and 6-freebsd-12
> branches.
> >
> >> Or do I have to prepare something special?
> >
> > Yes I think you may need to patch libbsd for the beatnik bvoard. I have
> not
> > looked at that board and the net drivers it needs. The current list is
> we have
> > in libbsd is:
> >
> >
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h?h=6-freebsd-12
> >
> > The BSP support is handled here:
> >
> >
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/bsp/nexus-devices.h?h=6-freebsd-12
> >
> > The define is based on the header guard for the BSP:
> >
> > https://git.rtems.org/rtems/tree/bsps/powerpc/beatnik/include/bsp.h#n25
> >
> > I hope this helps.
> >
> > Chris
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-11-04 Thread Heinz Junkes
Hello, Chris,
unfortunately it is not quite so simple. The Beatnik board uses 
for the Ethernet the Marvell Discovery II MV64360 (GT64360)
and there two of the three built-in Ethernet controllers. 

Till Straumann has written a driver for it called "mve" and unfortunately it 
is not available in freebsd. Probably too rare or I did not search properly. 

Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 27. Oct 2020, at 05:06, Chris Johns  wrote:
> 
> On 26/10/20 7:32 pm, Heinz Junkes wrote:
>> Good morning Chris,
>> i will now try out libbsd on a MVME6100 (beatnik).
>> Is the mentioned patch in git? 
> 
> The PCI patch is in rtems-libbsd.git on the master and 6-freebsd-12 branches.
> 
>> Or do I have to prepare something special?
> 
> Yes I think you may need to patch libbsd for the beatnik bvoard. I have not
> looked at that board and the net drivers it needs. The current list is we have
> in libbsd is:
> 
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h?h=6-freebsd-12
> 
> The BSP support is handled here:
> 
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/bsp/nexus-devices.h?h=6-freebsd-12
> 
> The define is based on the header guard for the BSP:
> 
> https://git.rtems.org/rtems/tree/bsps/powerpc/beatnik/include/bsp.h#n25
> 
> I hope this helps.
> 
> Chris



smime.p7s
Description: S/MIME cryptographic signature
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-30 Thread Heinz Junkes
Hello, Joel,

You are right, for the MVME6100 the configuration in libbsd is still missing. 
There is also missing the
old NIC. Chris has already sent me information about it. I'll try to do that 
next week.
But I have to put two MVME6100s into production by the end of the month. If I 
can't do that with libbsd, I 
will use the CPUs with RTEMS5 and the legacy stack. This has worked so far with 
PCI/VME.

The QorIQ based MVME2500 worked with the pre-RTEMS5. Sebastian had made it work 
with libbsd.
PCI/VMEbus was still missing.

Support is important to me because I also have some very modern boards with the 
Qoriq CPU in the pipeline.
For example IFC_1420 from IOxOS 
(https://www.ioxos.ch/wp-content/uploads/2018/02/IFC_1420_SDS_A0.pdf). This
is a CPU for MTCA.4 which is used in modern accelerator systems.

Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 30. Oct 2020, at 03:31, Joel Sherrill  wrote:
> 
> 
> 
> On Thu, Oct 29, 2020, 6:07 AM Heinz Junkes  wrote:
> I can now run the test programs of libbsd. But on the MVME6100
> no network interfaces gets found.
> 
> MVME6100> netShut
> /-
> config addr is 0xf1000cf8
> config data is 0xf1000cfc
> Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
> CPU: MPC7457
> Board Type: MVME6100-0163 (S/N E173D27)
> Bus Clock Freq:   1 Hz
> CPU Clock Freq:  126654 Hz
> Memory:   536870912 bytes
> -
> Now BSP_mem_size = 0x1fe0
> Configuration.work_space_size = ed620
> Page table setup finished; will activate it NOW...
> Going to start PCI buses scanning and initialization
> Number of PCI buses found is : 3
> MSR 0x2003032
> Exit from bspstart
> unable to find the universe in pci config space
> Tundra Tsi148 PCI-VME bridge detected at 0x8110, IRQ 84
> Tsi148 Outbound Ports:
> Port  VME-Addr   Size   PCI-Adrs   Mode:
> 0:0x2000 0x0e00 0x9000 A32, SUP, D32, SCT
> 1:0x 0x00ff 0x9f00 A24, SUP, D32, SCT
> 2:0x 0x0001 0x9fff A16, SUP, D32, SCT
> 7:0x 0x0100 0x9e00 CSR, SUP, D32, SCT
> Tsi148 Inbound Ports:
> Port  VME-Addr   Size   PCI-Adrs   Mode:
> 0:0x9000 0x1fe0 0x A32, PGM, DAT, SUP, USR, MBLT, BLT
> vmeTsi148 IRQ manager: looking for registers on VME...
> Trying to find CSR on VME...
> vmeTsi148 - IRQ manager using VME CSR to flush FIFO
> Registering /dev/console as minor 0 (==/dev/ttyS0)
> 
> 
> *** BEGIN OF TEST LIBBSD DHCPCD 1 ***
> *** TEST VERSION: 6.0.0.5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52
> *** TEST STATE: EXPECTED_PASS
> *** TEST BUILD: RTEMS_POSIX_API
> *** TEST TOOLS: 10.2.1 20201026 (RTEMS 6, RSB 
> 5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52, Newlib 17b7dfc)
> 
> RTEMS Shell on /dev/console. Use 'help' to list commands.
> SHLL [/] # xus0: 
> [zone: unpcb] kern.ipc.maxsockets limit reached
> info: lo0: link state changed to UP
> info: version 6.2.1 starting
> err: no valid interfaces found
> warning: no interfaces have a carrier
> 
> Afaik the mvme6100 does not have a configuration in libbsd. My recollection 
> (which could be wrong) is that there isn't a libbsd driver in the tree for 
> the NIC.
> 
> There was a table in Chris' EPICS slides about which bsps we thought needed 
> attention with notes on the drivers.
> 
> And the mvme2500 wasn't on the list. I think we may need an alias or some 
> documentation on this BSP. 
> 
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
> 
> 
> 
> > On 27. Oct 2020, at 18:41, Sebastian Huber 
> >  wrote:
> > 
> > 
> > On 27/10/2020 15:41, Joel Sherrill wrote:
> >> 
> >> 
> >> On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes  >> > wrote:
> >> 
> >>I am currently trying git rtems6.
> >> 
> >>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> >>powerpc_beatnik.log --no-clean --target=powerpc-rtems6
> >>--with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel
> >> 
> >>works …
> >> 
> >>Unfortunately It fails here:
> >> 
> >>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> >>libbsd.log --no-clean --target=powerpc-rtems6
> >>--with-rtems-bsp=beatnik --host=powerpc-rtems6 6/rtems-libbsd
> >> 
> >>...
> >>[1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
> >>In file included from
> >>/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
> >> from
> >>/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
> >> from ../../freebsd/sys/sys/libkern.h:216,
> >> from ../../freebsd/sys/sys/systm.h:543,
> >> from ../../freebsd/sys/sys/mbuf.h:42,
> >> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> >>/home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error:
> >>conflicting declaration of C 

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-29 Thread Joel Sherrill
On Thu, Oct 29, 2020, 6:07 AM Heinz Junkes  wrote:

> I can now run the test programs of libbsd. But on the MVME6100
> no network interfaces gets found.
>
> MVME6100> netShut
> /-
> config addr is 0xf1000cf8
> config data is 0xf1000cfc
> Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
> CPU: MPC7457
> Board Type: MVME6100-0163 (S/N E173D27)
> Bus Clock Freq:   1 Hz
> CPU Clock Freq:  126654 Hz
> Memory:   536870912 bytes
> -
> Now BSP_mem_size = 0x1fe0
> Configuration.work_space_size = ed620
> Page table setup finished; will activate it NOW...
> Going to start PCI buses scanning and initialization
> Number of PCI buses found is : 3
> MSR 0x2003032
> Exit from bspstart
> unable to find the universe in pci config space
> Tundra Tsi148 PCI-VME bridge detected at 0x8110, IRQ 84
> Tsi148 Outbound Ports:
> Port  VME-Addr   Size   PCI-Adrs   Mode:
> 0:0x2000 0x0e00 0x9000 A32, SUP, D32, SCT
> 1:0x 0x00ff 0x9f00 A24, SUP, D32, SCT
> 2:0x 0x0001 0x9fff A16, SUP, D32, SCT
> 7:0x 0x0100 0x9e00 CSR, SUP, D32, SCT
> Tsi148 Inbound Ports:
> Port  VME-Addr   Size   PCI-Adrs   Mode:
> 0:0x9000 0x1fe0 0x A32, PGM, DAT, SUP, USR, MBLT, BLT
> vmeTsi148 IRQ manager: looking for registers on VME...
> Trying to find CSR on VME...
> vmeTsi148 - IRQ manager using VME CSR to flush FIFO
> Registering /dev/console as minor 0 (==/dev/ttyS0)
>
>
> *** BEGIN OF TEST LIBBSD DHCPCD 1 ***
> *** TEST VERSION: 6.0.0.5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52
> *** TEST STATE: EXPECTED_PASS
> *** TEST BUILD: RTEMS_POSIX_API
> *** TEST TOOLS: 10.2.1 20201026 (RTEMS 6, RSB
> 5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52, Newlib 17b7dfc)
>
> RTEMS Shell on /dev/console. Use 'help' to list commands.
> SHLL [/] # xus0: 
> [zone: unpcb] kern.ipc.maxsockets limit reached
> info: lo0: link state changed to UP
> info: version 6.2.1 starting
> err: no valid interfaces found
> warning: no interfaces have a carrier
>

Afaik the mvme6100 does not have a configuration in libbsd. My recollection
(which could be wrong) is that there isn't a libbsd driver in the tree for
the NIC.

There was a table in Chris' EPICS slides about which bsps we thought needed
attention with notes on the drivers.

And the mvme2500 wasn't on the list. I think we may need an alias or some
documentation on this BSP.

>
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
>
>
>
> > On 27. Oct 2020, at 18:41, Sebastian Huber <
> sebastian.hu...@embedded-brains.de> wrote:
> >
> >
> > On 27/10/2020 15:41, Joel Sherrill wrote:
> >>
> >>
> >> On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes  > wrote:
> >>
> >>I am currently trying git rtems6.
> >>
> >>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> >>powerpc_beatnik.log --no-clean --target=powerpc-rtems6
> >>--with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel
> >>
> >>works …
> >>
> >>Unfortunately It fails here:
> >>
> >>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> >>libbsd.log --no-clean --target=powerpc-rtems6
> >>--with-rtems-bsp=beatnik --host=powerpc-rtems6 6/rtems-libbsd
> >>
> >>...
> >>[1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
> >>In file included from
> >>/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
> >> from
> >>
> /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
> >> from ../../freebsd/sys/sys/libkern.h:216,
> >> from ../../freebsd/sys/sys/systm.h:543,
> >> from ../../freebsd/sys/sys/mbuf.h:42,
> >> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> >>/home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error:
> >>conflicting declaration of C function 'void qsort_r(void*, size_t,
> >>size_t, int (*)(const void*, const void*, void*
> >>), void*)'
> >>  309 | void qsort_r (void *__base, size_t __nmemb, size_t __size,
> >>int (*_compar)(const void *, const void *, void *), void *__thunk);
> >>  |  ^~~
> >>In file included from ../../freebsd/sys/sys/systm.h:543,
> >> from ../../freebsd/sys/sys/mbuf.h:42,
> >> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> >>../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration
> >>'void qsort_r(void*, size_t, size_t, void*, int (*)(void*, const
> >>void*, const void*))'
> >>  211 | void  qsort_r(void *base, size_t nmemb, size_t size, void
> >>*thunk,
> >>  |   ^~~
> >>
> >>Waf: Leaving directory
> >>
> 

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-29 Thread Joel Sherrill
On Thu, Oct 29, 2020, 7:44 AM Heinz Junkes  wrote:

> I have now changed to a more modern board: MVME2500
> And built rtems6 and libbsd for qoriq_e500.
>

Since you mention it worked in the spring, does it work with rtems5?


>
> Unfortunately the board hangs when loading the image:
>
> MVME2500=> setenv tfile dhcpcd02_6
> MVME2500=> run rtems_myTests
> reading mvme2500.dtb
> 12363 bytes read in 32 ms (377 KiB/s)
> Speed: 1000, full duplex
> Using eTSEC1 device
> TFTP from server 141.14.128.9; our IP address is 141.14.128.89
> Filename 'dhcpcd02_6.img'.
> Load address: 0x1000
> Loading: #
>  
>  10.3 MiB/s
> done
> Bytes transferred = 1709285 (1a14e5 hex)
> WARNING: adjusting available memory to 3000
> ## Booting kernel from Legacy Image at 1000 ...
>Image Name:   dhcpcd02
>Created:  2020-10-29  12:38:52 UTC
>Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>Data Size:1709221 Bytes = 1.6 MiB
>Load Address: 4000
>Entry Point:  4000
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 2000
>Booting using the fdt blob at 0x2000
>Uncompressing Kernel Image ... OK
>Loading Device Tree to 03ff9000, end 03fff04a ... OK
>
> Hangs ...
>
>
>
> With RTEMS5 in spring it looked like this:
>
>
> MVME2500=> setenv tfile dhcpcd02
> MVME2500=> run rtems_myTests
> reading mvme2500.dtb
> 12363 bytes read in 32 ms (377 KiB/s)
> Speed: 1000, full duplex
> Using eTSEC1 device
> TFTP from server 141.14.128.9; our IP address is 141.14.128.89
> Filename 'dhcpcd02.img'.
> Load address: 0x1000
> Loading: #
>  ###
>  10 MiB/s
> done
> Bytes transferred = 1455058 (1633d2 hex)
> WARNING: adjusting available memory to 3000
> ## Booting kernel from Legacy Image at 1000 ...
>Image Name:   dhcpcd02
>Created:  2020-02-17  13:51:47 UTC
>Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>Data Size:1454994 Bytes = 1.4 MiB
>Load Address: 4000
>Entry Point:  4000
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 2000
>Booting using the fdt blob at 0x2000
>Uncompressing Kernel Image ... OK
>Loading Device Tree to 03ff9000, end 03fff04a ... OK
> *** LIBBSD DHCPCD 2 TEST ***
> nexus0: 
>
> RTEMS Shell on /dev/console. Useo 'help' to list commands.
> SHLL [/] # bus0:  on nexus0
> simplebus0:  on ofwbus0
> simplebus1:  mem 0xffe05000-0xffe05fff
> irq 3 on ofwbus0
> tsec0:  mem 0x24000-0x24fff irq
> 13,14,18 on simplebus0
> miibus0:  on tsec0
> ukphy0:  PHY 1 on miibus0
> ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
> info: tsec0: Ethernet address: ec:9e:cd:19:3c:61
> tsec1:  mem 0x25000-0x25fff irq
> 19,20,24 on simplebus0
> miibus1:  on tsec1
> ukphy1:  PHY 7 on miibus1
> ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
> info: tsec1: Ethernet address: ec:9e:cd:19:3c:62
> tsec2:  mem 0x26000-0x26fff irq
> 15,16,17 on simplebus0
> miibus2:  on tsec2
> ukphy2:  PHY 3 on miibus2
> ukphy2:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
> info: tsec2: Ethernet address: ec:9e:cd:19:3c:63
> [zone: unpcb] kern.ipc.maxsockets limit reached
> info: lo0: link state changed to UP
> info: version 6.2.1 starting
> info: tsec0: link state changed to DOWN
> info: tsec1: link state changed to DOWN
> info: tsec2: link state changed to DOWN
> warning: no interfaces have a carrier
> info: tsec0: waiting for carrier
> info: tsec1: waiting for carrier
> info: tsec2: waiting for carrier
> W���to UP
> info: tsec0: carrier acquired
> info: DUID 00:01:00:01:e9:6d:a1:84:ec:9e:cd:19:3c:61
> info: tsec0: IAID cd:19:3c:61
> info: tsec1: link state changed to UP
> ...
>
>
>
>
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
>
>
>
> > On 29. Oct 2020, at 12:07, Heinz Junkes 
> wrote:
> >
> > I can now run the test programs of libbsd. But on the MVME6100
> > no network interfaces gets found.
> >
> > MVME6100> netShut
> > /-
> > config addr is 0xf1000cf8
> > config data is 0xf1000cfc
> > Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
> > CPU: MPC7457
> > Board Type: MVME6100-0163 (S/N E173D27)
> > Bus Clock Freq:   1 Hz
> > CPU Clock Freq:  126654 Hz
> > Memory:   536870912 bytes
> > -
> > Now BSP_mem_size = 0x1fe0
> > Configuration.work_space_size = ed620
> > Page table setup finished; will activate it NOW...
> > Going to start PCI 

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-29 Thread Chris Johns
On 29/10/20 11:44 pm, Heinz Junkes wrote:
> I have now changed to a more modern board: MVME2500
> And built rtems6 and libbsd for qoriq_e500.

Thank you for testing and reporting.

> Unfortunately the board hangs when loading the image:
> 
> MVME2500=> setenv tfile dhcpcd02_6
> MVME2500=> run rtems_myTests
> reading mvme2500.dtb
> 12363 bytes read in 32 ms (377 KiB/s)
> Speed: 1000, full duplex
> Using eTSEC1 device
> TFTP from server 141.14.128.9; our IP address is 141.14.128.89
> Filename 'dhcpcd02_6.img'.
> Load address: 0x1000
> Loading: #
>  
>  10.3 MiB/s
> done
> Bytes transferred = 1709285 (1a14e5 hex)
> WARNING: adjusting available memory to 3000
> ## Booting kernel from Legacy Image at 1000 ...
>Image Name:   dhcpcd02
>Created:  2020-10-29  12:38:52 UTC
>Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>Data Size:1709221 Bytes = 1.6 MiB
>Load Address: 4000
>Entry Point:  4000
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 2000
>Booting using the fdt blob at 0x2000
>Uncompressing Kernel Image ... OK
>Loading Device Tree to 03ff9000, end 03fff04a ... OK
> 
> Hangs ...

This looks like the BSP is not booting. I am not familiar with this BSP or the
set up.

Does hello or ticker from the rtems.git testsuite work?

Note, this BSP is from a different family and the PCI patch I pushed only
effects the motorola_shared family of BSPs.

Chris

> With RTEMS5 in spring it looked like this:
> 
> 
> MVME2500=> setenv tfile dhcpcd02
> MVME2500=> run rtems_myTests
> reading mvme2500.dtb
> 12363 bytes read in 32 ms (377 KiB/s)
> Speed: 1000, full duplex
> Using eTSEC1 device
> TFTP from server 141.14.128.9; our IP address is 141.14.128.89
> Filename 'dhcpcd02.img'.
> Load address: 0x1000
> Loading: #
>  ###
>  10 MiB/s
> done
> Bytes transferred = 1455058 (1633d2 hex)
> WARNING: adjusting available memory to 3000
> ## Booting kernel from Legacy Image at 1000 ...
>Image Name:   dhcpcd02
>Created:  2020-02-17  13:51:47 UTC
>Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>Data Size:1454994 Bytes = 1.4 MiB
>Load Address: 4000
>Entry Point:  4000
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 2000
>Booting using the fdt blob at 0x2000
>Uncompressing Kernel Image ... OK
>Loading Device Tree to 03ff9000, end 03fff04a ... OK
> *** LIBBSD DHCPCD 2 TEST ***
> nexus0: 
> 
> RTEMS Shell on /dev/console. Useo 'help' to list commands.
> SHLL [/] # bus0:  on nexus0
> simplebus0:  on ofwbus0
> simplebus1:  mem 0xffe05000-0xffe05fff irq 
> 3 on ofwbus0
> tsec0:  mem 0x24000-0x24fff irq 
> 13,14,18 on simplebus0
> miibus0:  on tsec0
> ukphy0:  PHY 1 on miibus0
> ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
> info: tsec0: Ethernet address: ec:9e:cd:19:3c:61
> tsec1:  mem 0x25000-0x25fff irq 
> 19,20,24 on simplebus0
> miibus1:  on tsec1
> ukphy1:  PHY 7 on miibus1
> ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
> info: tsec1: Ethernet address: ec:9e:cd:19:3c:62
> tsec2:  mem 0x26000-0x26fff irq 
> 15,16,17 on simplebus0
> miibus2:  on tsec2
> ukphy2:  PHY 3 on miibus2
> ukphy2:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
> 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
> info: tsec2: Ethernet address: ec:9e:cd:19:3c:63
> [zone: unpcb] kern.ipc.maxsockets limit reached
> info: lo0: link state changed to UP
> info: version 6.2.1 starting
> info: tsec0: link state changed to DOWN
> info: tsec1: link state changed to DOWN
> info: tsec2: link state changed to DOWN
> warning: no interfaces have a carrier
> info: tsec0: waiting for carrier
> info: tsec1: waiting for carrier
> info: tsec2: waiting for carrier
> W���to UP
> info: tsec0: carrier acquired
> info: DUID 00:01:00:01:e9:6d:a1:84:ec:9e:cd:19:3c:61
> info: tsec0: IAID cd:19:3c:61
> info: tsec1: link state changed to UP
> ...
> 
> 
> 
> 
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
> 
> 
> 
>> On 29. Oct 2020, at 12:07, Heinz Junkes  wrote:
>>
>> I can now run the test programs of libbsd. But on the MVME6100
>> no network interfaces gets found.
>>
>> MVME6100> netShut
>> /-
>> config addr is 0xf1000cf8
>> config data is 0xf1000cfc
>> Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
>> CPU: MPC7457
>> Board Type: MVME6100-0163 (S/N E173D27)
>> Bus Clock Freq:   1 Hz
>> CPU Clock Freq:  126654 Hz
>> Memory:  

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-29 Thread Heinz Junkes
I have now changed to a more modern board: MVME2500
And built rtems6 and libbsd for qoriq_e500.


Unfortunately the board hangs when loading the image:

MVME2500=> setenv tfile dhcpcd02_6
MVME2500=> run rtems_myTests
reading mvme2500.dtb
12363 bytes read in 32 ms (377 KiB/s)
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 141.14.128.9; our IP address is 141.14.128.89
Filename 'dhcpcd02_6.img'.
Load address: 0x1000
Loading: #
 
 10.3 MiB/s
done
Bytes transferred = 1709285 (1a14e5 hex)
WARNING: adjusting available memory to 3000
## Booting kernel from Legacy Image at 1000 ...
   Image Name:   dhcpcd02
   Created:  2020-10-29  12:38:52 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:1709221 Bytes = 1.6 MiB
   Load Address: 4000
   Entry Point:  4000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 2000
   Booting using the fdt blob at 0x2000
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 03ff9000, end 03fff04a ... OK

Hangs ...



With RTEMS5 in spring it looked like this:


MVME2500=> setenv tfile dhcpcd02
MVME2500=> run rtems_myTests
reading mvme2500.dtb
12363 bytes read in 32 ms (377 KiB/s)
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 141.14.128.9; our IP address is 141.14.128.89
Filename 'dhcpcd02.img'.
Load address: 0x1000
Loading: #
 ###
 10 MiB/s
done
Bytes transferred = 1455058 (1633d2 hex)
WARNING: adjusting available memory to 3000
## Booting kernel from Legacy Image at 1000 ...
   Image Name:   dhcpcd02
   Created:  2020-02-17  13:51:47 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:1454994 Bytes = 1.4 MiB
   Load Address: 4000
   Entry Point:  4000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 2000
   Booting using the fdt blob at 0x2000
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 03ff9000, end 03fff04a ... OK
*** LIBBSD DHCPCD 2 TEST ***
nexus0: 

RTEMS Shell on /dev/console. Useo 'help' to list commands.
SHLL [/] # bus0:  on nexus0
simplebus0:  on ofwbus0
simplebus1:  mem 0xffe05000-0xffe05fff irq 3 
on ofwbus0
tsec0:  mem 0x24000-0x24fff irq 
13,14,18 on simplebus0
miibus0:  on tsec0
ukphy0:  PHY 1 on miibus0
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
info: tsec0: Ethernet address: ec:9e:cd:19:3c:61
tsec1:  mem 0x25000-0x25fff irq 
19,20,24 on simplebus0
miibus1:  on tsec1
ukphy1:  PHY 7 on miibus1
ukphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
info: tsec1: Ethernet address: ec:9e:cd:19:3c:62
tsec2:  mem 0x26000-0x26fff irq 
15,16,17 on simplebus0
miibus2:  on tsec2
ukphy2:  PHY 3 on miibus2
ukphy2:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
info: tsec2: Ethernet address: ec:9e:cd:19:3c:63
[zone: unpcb] kern.ipc.maxsockets limit reached
info: lo0: link state changed to UP
info: version 6.2.1 starting
info: tsec0: link state changed to DOWN
info: tsec1: link state changed to DOWN
info: tsec2: link state changed to DOWN
warning: no interfaces have a carrier
info: tsec0: waiting for carrier
info: tsec1: waiting for carrier
info: tsec2: waiting for carrier
W���to UP
info: tsec0: carrier acquired
info: DUID 00:01:00:01:e9:6d:a1:84:ec:9e:cd:19:3c:61
info: tsec0: IAID cd:19:3c:61
info: tsec1: link state changed to UP
...




Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 29. Oct 2020, at 12:07, Heinz Junkes  wrote:
> 
> I can now run the test programs of libbsd. But on the MVME6100
> no network interfaces gets found.
> 
> MVME6100> netShut
> /-
> config addr is 0xf1000cf8
> config data is 0xf1000cfc
> Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
> CPU: MPC7457
> Board Type: MVME6100-0163 (S/N E173D27)
> Bus Clock Freq:   1 Hz
> CPU Clock Freq:  126654 Hz
> Memory:   536870912 bytes
> -
> Now BSP_mem_size = 0x1fe0
> Configuration.work_space_size = ed620
> Page table setup finished; will activate it NOW...
> Going to start PCI buses scanning and initialization
> Number of PCI buses found is : 3
> MSR 0x2003032
> Exit from bspstart
> unable to find the universe in pci config space
> Tundra Tsi148 PCI-VME bridge detected at 0x8110, IRQ 84
> Tsi148 Outbound Ports:
> Port  VME-Addr   Size   PCI-Adrs   Mode:
> 0:0x2000 0x0e00 0x9000 A32, SUP, D32, SCT
> 1:0x 0x00ff 0x9f00 

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-29 Thread Heinz Junkes
I can now run the test programs of libbsd. But on the MVME6100
no network interfaces gets found.

MVME6100> netShut
/-
config addr is 0xf1000cf8
config data is 0xf1000cfc
Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
CPU: MPC7457
Board Type: MVME6100-0163 (S/N E173D27)
Bus Clock Freq:   1 Hz
CPU Clock Freq:  126654 Hz
Memory:   536870912 bytes
-
Now BSP_mem_size = 0x1fe0
Configuration.work_space_size = ed620
Page table setup finished; will activate it NOW...
Going to start PCI buses scanning and initialization
Number of PCI buses found is : 3
MSR 0x2003032
Exit from bspstart
unable to find the universe in pci config space
Tundra Tsi148 PCI-VME bridge detected at 0x8110, IRQ 84
Tsi148 Outbound Ports:
Port  VME-Addr   Size   PCI-Adrs   Mode:
0:0x2000 0x0e00 0x9000 A32, SUP, D32, SCT
1:0x 0x00ff 0x9f00 A24, SUP, D32, SCT
2:0x 0x0001 0x9fff A16, SUP, D32, SCT
7:0x 0x0100 0x9e00 CSR, SUP, D32, SCT
Tsi148 Inbound Ports:
Port  VME-Addr   Size   PCI-Adrs   Mode:
0:0x9000 0x1fe0 0x A32, PGM, DAT, SUP, USR, MBLT, BLT
vmeTsi148 IRQ manager: looking for registers on VME...
Trying to find CSR on VME...
vmeTsi148 - IRQ manager using VME CSR to flush FIFO
Registering /dev/console as minor 0 (==/dev/ttyS0)


*** BEGIN OF TEST LIBBSD DHCPCD 1 ***
*** TEST VERSION: 6.0.0.5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD: RTEMS_POSIX_API
*** TEST TOOLS: 10.2.1 20201026 (RTEMS 6, RSB 
5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52, Newlib 17b7dfc)

RTEMS Shell on /dev/console. Use 'help' to list commands.
SHLL [/] # xus0: 
[zone: unpcb] kern.ipc.maxsockets limit reached
info: lo0: link state changed to UP
info: version 6.2.1 starting
err: no valid interfaces found
warning: no interfaces have a carrier

Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 27. Oct 2020, at 18:41, Sebastian Huber 
>  wrote:
> 
> 
> On 27/10/2020 15:41, Joel Sherrill wrote:
>> 
>> 
>> On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes > > wrote:
>> 
>>I am currently trying git rtems6.
>> 
>>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
>>powerpc_beatnik.log --no-clean --target=powerpc-rtems6
>>--with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel
>> 
>>works …
>> 
>>Unfortunately It fails here:
>> 
>>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
>>libbsd.log --no-clean --target=powerpc-rtems6
>>--with-rtems-bsp=beatnik --host=powerpc-rtems6 6/rtems-libbsd
>> 
>>...
>>[1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
>>In file included from
>>/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
>> from
>>/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
>> from ../../freebsd/sys/sys/libkern.h:216,
>> from ../../freebsd/sys/sys/systm.h:543,
>> from ../../freebsd/sys/sys/mbuf.h:42,
>> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
>>/home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error:
>>conflicting declaration of C function 'void qsort_r(void*, size_t,
>>size_t, int (*)(const void*, const void*, void*
>>), void*)'
>>  309 | void qsort_r (void *__base, size_t __nmemb, size_t __size,
>>int (*_compar)(const void *, const void *, void *), void *__thunk);
>>  |  ^~~
>>In file included from ../../freebsd/sys/sys/systm.h:543,
>> from ../../freebsd/sys/sys/mbuf.h:42,
>> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
>>../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration
>>'void qsort_r(void*, size_t, size_t, void*, int (*)(void*, const
>>void*, const void*))'
>>  211 | void  qsort_r(void *base, size_t nmemb, size_t size, void
>>*thunk,
>>  |   ^~~
>> 
>>Waf: Leaving directory
>>
>> `/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9
>>2fd053bcefc08bb3b6baa0e2/build/powerpc-rtems6-beatnik-default'
>>Build failed
>> -> task in 'bsd' failed with exit status 1 (run with -v to
>>display more information)
>>shell cmd failed: /bin/sh -ex
>>
>> /home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/do-build
>>error: building
>>rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1
>> 
>> 
>> I'm not sure why this would not have shown up before but the FreeBSD kernel 
>> reuses some standard library method names with different signatures. The 
>> file 

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-28 Thread Heinz Junkes
Thanks, I got further and the first start doesn't look that bad ;-)


Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
CPU: MPC7457
Board Type: MVME6100-0163 (S/N E173D27)
Bus Clock Freq:   1 Hz
CPU Clock Freq:  126654 Hz
Memory:   536870912 bytes
-
Now BSP_mem_size = 0x1fe0
Configuration.work_space_size = 2033620
Page table setup finished; will activate it NOW...
Going to start PCI buses scanning and initialization
Number of PCI buses found is : 3
MSR 0x2003032
Exit from bspstart
unable to find the universe in pci config space
Tundra Tsi148 PCI-VME bridge detected at 0x8110, IRQ 84
Tsi148 Outbound Ports:
Port  VME-Addr   Size   PCI-Adrs   Mode:
0:0x2000 0x0e00 0x9000 A32, SUP, D32, SCT
1:0x 0x00ff 0x9f00 A24, SUP, D32, SCT
2:0x 0x0001 0x9fff A16, SUP, D32, SCT
7:0x 0x0100 0x9e00 CSR, SUP, D32, SCT
Tsi148 Inbound Ports:
Port  VME-Addr   Size   PCI-Adrs   Mode:
0:0x9000 0x1fe0 0x A32, PGM, DAT, SUP, USR, MBLT, BLT
vmeTsi148 IRQ manager: looking for registers on VME...
Trying to find CSR on VME...
vmeTsi148 - IRQ manager using VME CSR to flush FIFO
Registering /dev/console as minor 0 (==/dev/ttyS0)
fatal source: RTEMS_FATAL_SOURCE_EXCEPTION
exception vector 4 (0x4)
  next PC or address of fault = 0xfffc
  saved MSR = 0x42003032
  context = task, ISR nest level = 0
  thread dispatch disable level = 1
  R0  = 0x00088c0c R1  = 0x006e91d0 R2  = 0x004da928 R3  = 0x001f
  R4  = 0x R5  = 0x R6  = 0x5f997dec R7  = 0x
  R8  = 0x0004 R9  = 0x R10 = 0x005835dc R11 = 0x5f997dec
  R12 = 0x005c R13 = 0x00693b40 R14 = 0x R15 = 0x
  R16 = 0x0020 R17 = 0x0068c460 R18 = 0x0068c48c R19 = 0x
  R20 = 0x R21 = 0x R22 = 0x R23 = 0x
  R24 = 0x R25 = 0x R26 = 0x R27 = 0x
  R28 = 0x R29 = 0x0068c330 R30 = 0x0020 R31 = 0x0009
  CR  = 0x82200424
  CTR = 0x
  XER = 0x2000
  LR  = 0x00088c0c
  DAR = 0x
  executing thread ID = 0x09010001, name = IDLE
Stack Trace:
  IP: 0xfffc, LR: 0x00088c0c
--^ 0x00088b24--^ 0x003f1030--^ 0x310c
bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad so I reset 
the card
Printing a stack trace for your convenience :-)

0x04158380--> 0x04158380--> 0x00547920--> 0x00548556--> 0x04170612
0x04140740--> 0x00560140--> 0x00559908--> 0x04132912--> 0x00012556


Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 27. Oct 2020, at 18:41, Sebastian Huber 
>  wrote:
> 
> 
> On 27/10/2020 15:41, Joel Sherrill wrote:
>> 
>> 
>> On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes > > wrote:
>> 
>>I am currently trying git rtems6.
>> 
>>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
>>powerpc_beatnik.log --no-clean --target=powerpc-rtems6
>>--with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel
>> 
>>works …
>> 
>>Unfortunately It fails here:
>> 
>>../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
>>libbsd.log --no-clean --target=powerpc-rtems6
>>--with-rtems-bsp=beatnik --host=powerpc-rtems6 6/rtems-libbsd
>> 
>>...
>>[1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
>>In file included from
>>/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
>> from
>>/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
>> from ../../freebsd/sys/sys/libkern.h:216,
>> from ../../freebsd/sys/sys/systm.h:543,
>> from ../../freebsd/sys/sys/mbuf.h:42,
>> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
>>/home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error:
>>conflicting declaration of C function 'void qsort_r(void*, size_t,
>>size_t, int (*)(const void*, const void*, void*
>>), void*)'
>>  309 | void qsort_r (void *__base, size_t __nmemb, size_t __size,
>>int (*_compar)(const void *, const void *, void *), void *__thunk);
>>  |  ^~~
>>In file included from ../../freebsd/sys/sys/systm.h:543,
>> from ../../freebsd/sys/sys/mbuf.h:42,
>> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
>>../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration
>>'void qsort_r(void*, size_t, size_t, void*, int (*)(void*, const
>>void*, const void*))'
>>  211 | void  qsort_r(void *base, size_t nmemb, size_t size, void
>>*thunk,
>>  |   ^~~
>> 
>>Waf: Leaving directory
>>
>> `/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9
>>

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-27 Thread Joel Sherrill
I

On Tue, Oct 27, 2020, 12:42 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

>
> On 27/10/2020 15:41, Joel Sherrill wrote:
> >
> >
> > On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes  > > wrote:
> >
> > I am currently trying git rtems6.
> >
> > ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> > powerpc_beatnik.log --no-clean --target=powerpc-rtems6
> > --with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel
> >
> > works …
> >
> > Unfortunately It fails here:
> >
> > ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> > libbsd.log --no-clean --target=powerpc-rtems6
> > --with-rtems-bsp=beatnik --host=powerpc-rtems6 6/rtems-libbsd
> >
> > ...
> > [1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
> > In file included from
> > /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
> >  from
> >
>  /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
> >  from ../../freebsd/sys/sys/libkern.h:216,
> >  from ../../freebsd/sys/sys/systm.h:543,
> >  from ../../freebsd/sys/sys/mbuf.h:42,
> >  from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> > /home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error:
> > conflicting declaration of C function 'void qsort_r(void*, size_t,
> > size_t, int (*)(const void*, const void*, void*
> > ), void*)'
> >   309 | void qsort_r (void *__base, size_t __nmemb, size_t __size,
> > int (*_compar)(const void *, const void *, void *), void *__thunk);
> >   |  ^~~
> > In file included from ../../freebsd/sys/sys/systm.h:543,
> >  from ../../freebsd/sys/sys/mbuf.h:42,
> >  from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> > ../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration
> > 'void qsort_r(void*, size_t, size_t, void*, int (*)(void*, const
> > void*, const void*))'
> >   211 | void  qsort_r(void *base, size_t nmemb, size_t size, void
> > *thunk,
> >   |   ^~~
> >
> > Waf: Leaving directory
> >
>  
> `/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9
> > 2fd053bcefc08bb3b6baa0e2/build/powerpc-rtems6-beatnik-default'
> > Build failed
> >  -> task in 'bsd' failed with exit status 1 (run with -v to
> > display more information)
> > shell cmd failed: /bin/sh -ex
> >
>  
> /home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/do-build
> > error: building
> >
>  rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1
> >
> >
> > I'm not sure why this would not have shown up before but the FreeBSD
> > kernel reuses some standard library method names with different
> > signatures. The
> > file rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h renames a
> > lot of items to put them in a BSD namespace. qsort_r isn't in this
> > list but perhaps should be.
>
> I think its is this bug:
>
> https://devel.rtems.org/ticket/4078
>
> I added a workaround to the latest master and 6-freebsd-12 branches.
>

Why don't we fix it in the gcc sources for 5 and later? Any code fixing
this breaks was already broken

>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail  : sebastian.hu...@embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-27 Thread Sebastian Huber


On 27/10/2020 15:41, Joel Sherrill wrote:



On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes > wrote:


I am currently trying git rtems6.

../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
powerpc_beatnik.log --no-clean --target=powerpc-rtems6
--with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel

works …

Unfortunately It fails here:

../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
libbsd.log --no-clean --target=powerpc-rtems6
--with-rtems-bsp=beatnik --host=powerpc-rtems6 6/rtems-libbsd

...
[1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
In file included from
/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
                 from
/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
                 from ../../freebsd/sys/sys/libkern.h:216,
                 from ../../freebsd/sys/sys/systm.h:543,
                 from ../../freebsd/sys/sys/mbuf.h:42,
                 from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
/home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error:
conflicting declaration of C function 'void qsort_r(void*, size_t,
size_t, int (*)(const void*, const void*, void*
), void*)'
  309 | void qsort_r (void *__base, size_t __nmemb, size_t __size,
int (*_compar)(const void *, const void *, void *), void *__thunk);
      |      ^~~
In file included from ../../freebsd/sys/sys/systm.h:543,
                 from ../../freebsd/sys/sys/mbuf.h:42,
                 from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration
'void qsort_r(void*, size_t, size_t, void*, int (*)(void*, const
void*, const void*))'
  211 | void  qsort_r(void *base, size_t nmemb, size_t size, void
*thunk,
      |       ^~~

Waf: Leaving directory

`/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9
2fd053bcefc08bb3b6baa0e2/build/powerpc-rtems6-beatnik-default'
Build failed
 -> task in 'bsd' failed with exit status 1 (run with -v to
display more information)
shell cmd failed: /bin/sh -ex

/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/do-build
error: building
rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1


I'm not sure why this would not have shown up before but the FreeBSD 
kernel reuses some standard library method names with different 
signatures. The 
file rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h renames a 
lot of items to put them in a BSD namespace. qsort_r isn't in this 
list but perhaps should be.


I think its is this bug:

https://devel.rtems.org/ticket/4078

I added a workaround to the latest master and 6-freebsd-12 branches.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-27 Thread Joel Sherrill
On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes 
wrote:

> I am currently trying git rtems6.
>
> ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> powerpc_beatnik.log --no-clean --target=powerpc-rtems6
> --with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel
>
> works …
>
> Unfortunately It fails here:
>
> ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log libbsd.log
> --no-clean --target=powerpc-rtems6 --with-rtems-bsp=beatnik
> --host=powerpc-rtems6 6/rtems-libbsd
>
> ...
> [1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
> In file included from
> /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
>  from
> /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
>  from ../../freebsd/sys/sys/libkern.h:216,
>  from ../../freebsd/sys/sys/systm.h:543,
>  from ../../freebsd/sys/sys/mbuf.h:42,
>  from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> /home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error: conflicting
> declaration of C function 'void qsort_r(void*, size_t, size_t, int
> (*)(const void*, const void*, void*
> ), void*)'
>   309 | void qsort_r (void *__base, size_t __nmemb, size_t __size, int
> (*_compar)(const void *, const void *, void *), void *__thunk);
>   |  ^~~
> In file included from ../../freebsd/sys/sys/systm.h:543,
>  from ../../freebsd/sys/sys/mbuf.h:42,
>  from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> ../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration 'void
> qsort_r(void*, size_t, size_t, void*, int (*)(void*, const void*, const
> void*))'
>   211 | void  qsort_r(void *base, size_t nmemb, size_t size, void *thunk,
>   |   ^~~
>
> Waf: Leaving directory
> `/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9
> 2fd053bcefc08bb3b6baa0e2/build/powerpc-rtems6-beatnik-default'
> Build failed
>  -> task in 'bsd' failed with exit status 1 (run with -v to display more
> information)
> shell cmd failed: /bin/sh -ex
> /home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/do-build
> error: building
> rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1
>

I'm not sure why this would not have shown up before but the FreeBSD kernel
reuses some standard library method names with different signatures. The
file rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h renames a lot of
items to put them in a BSD namespace. qsort_r isn't in this list but
perhaps should be.

--joel

>
>
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
>
>
>
> > On 27. Oct 2020, at 05:06, Chris Johns  wrote:
> >
> > On 26/10/20 7:32 pm, Heinz Junkes wrote:
> >> Good morning Chris,
> >> i will now try out libbsd on a MVME6100 (beatnik).
> >> Is the mentioned patch in git?
> >
> > The PCI patch is in rtems-libbsd.git on the master and 6-freebsd-12
> branches.
> >
> >> Or do I have to prepare something special?
> >
> > Yes I think you may need to patch libbsd for the beatnik bvoard. I have
> not
> > looked at that board and the net drivers it needs. The current list is
> we have
> > in libbsd is:
> >
> >
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h?h=6-freebsd-12
> >
> > The BSP support is handled here:
> >
> >
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/bsp/nexus-devices.h?h=6-freebsd-12
> >
> > The define is based on the header guard for the BSP:
> >
> > https://git.rtems.org/rtems/tree/bsps/powerpc/beatnik/include/bsp.h#n25
> >
> > I hope this helps.
> >
> > Chris
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-27 Thread Heinz Junkes
I am currently trying git rtems6.

../source-builder/sb-set-builder --prefix=$HOME/.rtems --log 
powerpc_beatnik.log --no-clean --target=powerpc-rtems6  
--with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel

works …

Unfortunately It fails here:

../source-builder/sb-set-builder --prefix=$HOME/.rtems --log libbsd.log 
--no-clean --target=powerpc-rtems6 --with-rtems-bsp=beatnik 
--host=powerpc-rtems6 6/rtems-libbsd

...
[1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
In file included from 
/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
 from 
/home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
 from ../../freebsd/sys/sys/libkern.h:216,
 from ../../freebsd/sys/sys/systm.h:543,
 from ../../freebsd/sys/sys/mbuf.h:42,
 from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
/home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error: conflicting 
declaration of C function 'void qsort_r(void*, size_t, size_t, int (*)(const 
void*, const void*, void*
), void*)'
  309 | void qsort_r (void *__base, size_t __nmemb, size_t __size, int 
(*_compar)(const void *, const void *, void *), void *__thunk);
  |  ^~~
In file included from ../../freebsd/sys/sys/systm.h:543,
 from ../../freebsd/sys/sys/mbuf.h:42,
 from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration 'void 
qsort_r(void*, size_t, size_t, void*, int (*)(void*, const void*, const void*))'
  211 | void  qsort_r(void *base, size_t nmemb, size_t size, void *thunk,
  |   ^~~

Waf: Leaving directory 
`/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9
2fd053bcefc08bb3b6baa0e2/build/powerpc-rtems6-beatnik-default'
Build failed
 -> task in 'bsd' failed with exit status 1 (run with -v to display more 
information)
shell cmd failed: /bin/sh -ex  
/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/do-build
error: building 
rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1


Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 27. Oct 2020, at 05:06, Chris Johns  wrote:
> 
> On 26/10/20 7:32 pm, Heinz Junkes wrote:
>> Good morning Chris,
>> i will now try out libbsd on a MVME6100 (beatnik).
>> Is the mentioned patch in git? 
> 
> The PCI patch is in rtems-libbsd.git on the master and 6-freebsd-12 branches.
> 
>> Or do I have to prepare something special?
> 
> Yes I think you may need to patch libbsd for the beatnik bvoard. I have not
> looked at that board and the net drivers it needs. The current list is we have
> in libbsd is:
> 
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h?h=6-freebsd-12
> 
> The BSP support is handled here:
> 
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/bsp/nexus-devices.h?h=6-freebsd-12
> 
> The define is based on the header guard for the BSP:
> 
> https://git.rtems.org/rtems/tree/bsps/powerpc/beatnik/include/bsp.h#n25
> 
> I hope this helps.
> 
> Chris



smime.p7s
Description: S/MIME cryptographic signature
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-26 Thread Chris Johns
On 26/10/20 7:32 pm, Heinz Junkes wrote:
> Good morning Chris,
> i will now try out libbsd on a MVME6100 (beatnik).
> Is the mentioned patch in git? 

The PCI patch is in rtems-libbsd.git on the master and 6-freebsd-12 branches.

> Or do I have to prepare something special?

Yes I think you may need to patch libbsd for the beatnik bvoard. I have not
looked at that board and the net drivers it needs. The current list is we have
in libbsd is:

https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h?h=6-freebsd-12

The BSP support is handled here:

https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/bsp/nexus-devices.h?h=6-freebsd-12

The define is based on the header guard for the BSP:

https://git.rtems.org/rtems/tree/bsps/powerpc/beatnik/include/bsp.h#n25

I hope this helps.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-26 Thread Heinz Junkes
Good morning Chris,
i will now try out libbsd on a MVME6100 (beatnik).
Is the mentioned patch in git? Or do I have to prepare something special?
Thanks Heinz

> On 21. Oct 2020, at 02:44, Chris Johns  wrote:
> 
> On 21/10/20 2:52 am, Sebastian Huber wrote:
>> On 20/10/2020 03:52, chr...@rtems.org wrote:
>> 
>>> Tested on a MVME2700 (mvme2307) BSP:
>>> 
>>> nexus0: 
>>> pcib0 pcibus 0 on motherboard
>>> pci0:  on pcib0
>>> pci0:  at device 0.0 (no driver attached)
>>> pci0:  at device 11.0 (no driver attached)
>>> pci0:  at device 11.1 (no driver attached)
>>> pci0:  at device 12.0 (no driver attached)
>>> pci0:  at device 13.0 (no driver attached)
>>> pci0:  at device 14.0 (no driver attached)
>> Does this mean that the legacy x86 PCI bus driver works on this PowerPC 
>> board?
>> Are there no big-endian vs. little-endian issues?
> 
> It seems there are no issues with the limited testing I have performed. I have
> not done extensive testing but the if_dc.c (tulip driver) does probe the bus 
> and
> the correct device/vendor id is returned. The fact there currently is no 
> support
> for the 21140 on the MVMEW2700 in the driver is different issue and not 
> related
> to this patch.
> 
> I had a detailed look at the few calls that are being made and everything 
> seems
> to work as expected. There is a lot of hardware in the PCI bridges on these
> boards to handle endian mapping. The same hardware set up is being used as 
> 4.10
> and legacy stack combination and that works.
> 
> I suspect there may be changes needed in relation to resource allocations but 
> I
> thought those can be in follow up patches.
> 
> Chris
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



smime.p7s
Description: S/MIME cryptographic signature
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-20 Thread Chris Johns
On 21/10/20 2:52 am, Sebastian Huber wrote:
> On 20/10/2020 03:52, chr...@rtems.org wrote:
> 
>> Tested on a MVME2700 (mvme2307) BSP:
>>
>> nexus0: 
>> pcib0 pcibus 0 on motherboard
>> pci0:  on pcib0
>> pci0:  at device 0.0 (no driver attached)
>> pci0:  at device 11.0 (no driver attached)
>> pci0:  at device 11.1 (no driver attached)
>> pci0:  at device 12.0 (no driver attached)
>> pci0:  at device 13.0 (no driver attached)
>> pci0:  at device 14.0 (no driver attached)
> Does this mean that the legacy x86 PCI bus driver works on this PowerPC board?
> Are there no big-endian vs. little-endian issues?

It seems there are no issues with the limited testing I have performed. I have
not done extensive testing but the if_dc.c (tulip driver) does probe the bus and
the correct device/vendor id is returned. The fact there currently is no support
for the 21140 on the MVMEW2700 in the driver is different issue and not related
to this patch.

I had a detailed look at the few calls that are being made and everything seems
to work as expected. There is a lot of hardware in the PCI bridges on these
boards to handle endian mapping. The same hardware set up is being used as 4.10
and legacy stack combination and that works.

I suspect there may be changes needed in relation to resource allocations but I
thought those can be in follow up patches.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: LibBSD PowerPC motorola_shared BSP PCI Support

2020-10-20 Thread Sebastian Huber

On 20/10/2020 03:52, chr...@rtems.org wrote:


Tested on a MVME2700 (mvme2307) BSP:

nexus0: 
pcib0 pcibus 0 on motherboard
pci0:  on pcib0
pci0:  at device 0.0 (no driver attached)
pci0:  at device 11.0 (no driver attached)
pci0:  at device 11.1 (no driver attached)
pci0:  at device 12.0 (no driver attached)
pci0:  at device 13.0 (no driver attached)
pci0:  at device 14.0 (no driver attached)
Does this mean that the legacy x86 PCI bus driver works on this PowerPC 
board? Are there no big-endian vs. little-endian issues?

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel