Re: rtems-libbsd: 6-freebsd-12 branch

2020-07-29 Thread Chris Johns
On 29/7/20 4:42 pm, Christian Mauderer wrote:
> Hello Gedare, Chris and Sebastian,
> 
> to summarize: I'll create a 6-freebsd-12 branch with the new commits.
> 

+1

> Regarding documentation: We have a "Branches" Section in the README.md
> of the libbsd. Sebastian added it in 2019:
> 
> https://git.rtems.org/rtems-libbsd/commit/README.md?id=5754194298a9210c8c1a9ac9f1ec800b7671b0fb
> 
> If it is OK, I'll just update the description with the new branches.
> 
> I didn't find a good location in the rtems-docs repo. We don't have a
> lot of documentation for libbsd there.

Yes however we need to make a start. We either need a big push to add it all or
we start with the pieces we know. For example we need to document signals do not
wake calls blocked in libbsd, ie select, read etc.

> @Chris: You wanted to collect every location where we have to update a
> description or version number after a release. I think the libbsd
> Branches section in the README.md is one of these locations too. Beneath
> that there is a
> 
>rtems_version = "5"
> 
> in the libbsd wscript. I think you had a ticket to collect these
> changes? Or is it a section in the documentation?

Please add this location and please add a post branch task to add a new branch
to libbsd.

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


Re: rtems-libbsd: 6-freebsd-12 branch

2020-07-29 Thread Sebastian Huber

On 29/07/2020 09:00, Chris Johns wrote:


@Chris: You wanted to collect every location where we have to update a
description or version number after a release. I think the libbsd
Branches section in the README.md is one of these locations too. Beneath
that there is a

rtems_version = "5"

in the libbsd wscript. I think you had a ticket to collect these
changes? Or is it a section in the documentation?

Please add this location and please add a post branch task to add a new branch
to libbsd.


It should be added here:

https://docs.rtems.org/branches/master/eng/release-process.html#release-branching
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH rtems-libbsd] testsuite: Use new name of test-info.h.

2020-07-29 Thread Christian Mauderer
In RTEMS the test.h has been renamed to test-info.h to allow the new
test framework to take over.
---
 testsuite/epoch01/test_main.c   | 2 +-
 testsuite/evdev01/init.c| 2 +-
 testsuite/include/rtems/bsd/test/default-init.h | 2 +-
 testsuite/include/rtems/bsd/test/default-network-init.h | 2 +-
 testsuite/include/rtems/bsd/test/default-termios-init.h | 4 ++--
 testsuite/smp01/test_main.c | 2 +-
 testsuite/swi01/init.c  | 2 +-
 testsuite/timeout01/init.c  | 2 +-
 testsuite/usb01/init.c  | 2 +-
 testsuite/usbkbd01/init.c   | 2 +-
 testsuite/usbmouse01/init.c | 2 +-
 testsuite/usbserial01/init.c| 2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/testsuite/epoch01/test_main.c b/testsuite/epoch01/test_main.c
index f979a2fe..6aa30653 100644
--- a/testsuite/epoch01/test_main.c
+++ b/testsuite/epoch01/test_main.c
@@ -56,7 +56,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #define TEST_NAME "LIBBSD EPOCH 1"
diff --git a/testsuite/evdev01/init.c b/testsuite/evdev01/init.c
index 38ae1e12..fe588ff4 100644
--- a/testsuite/evdev01/init.c
+++ b/testsuite/evdev01/init.c
@@ -48,7 +48,7 @@
 
 #define TEST_NAME "LIBBSD EVDEV"
 #define TEST_STATE_USER_INPUT 1
-#include 
+#include 
 
 #define PRIO_OPEN   (RTEMS_MAXIMUM_PRIORITY - 12)
 #define PRIO_KEYBOARD   (RTEMS_MAXIMUM_PRIORITY - 11)
diff --git a/testsuite/include/rtems/bsd/test/default-init.h 
b/testsuite/include/rtems/bsd/test/default-init.h
index cf7e0ea9..f8ea3acd 100644
--- a/testsuite/include/rtems/bsd/test/default-init.h
+++ b/testsuite/include/rtems/bsd/test/default-init.h
@@ -10,7 +10,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
diff --git a/testsuite/include/rtems/bsd/test/default-network-init.h 
b/testsuite/include/rtems/bsd/test/default-network-init.h
index 02cdd33f..b367d956 100644
--- a/testsuite/include/rtems/bsd/test/default-network-init.h
+++ b/testsuite/include/rtems/bsd/test/default-network-init.h
@@ -45,7 +45,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/testsuite/include/rtems/bsd/test/default-termios-init.h 
b/testsuite/include/rtems/bsd/test/default-termios-init.h
index 6935007c..f7e8b466 100644
--- a/testsuite/include/rtems/bsd/test/default-termios-init.h
+++ b/testsuite/include/rtems/bsd/test/default-termios-init.h
@@ -10,7 +10,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -156,4 +156,4 @@ rtems_task Init(
 
 #include 
 
-#endif /* RTEMS_BSD_TEST_DEFAULT_INIT_H */
\ No newline at end of file
+#endif /* RTEMS_BSD_TEST_DEFAULT_INIT_H */
diff --git a/testsuite/smp01/test_main.c b/testsuite/smp01/test_main.c
index 35c10c96..ad661bdc 100644
--- a/testsuite/smp01/test_main.c
+++ b/testsuite/smp01/test_main.c
@@ -52,7 +52,7 @@
 #include 
 
 #include 
-#include 
+#include 
 
 #define TEST_NAME "LIBBSD SMP 1"
 
diff --git a/testsuite/swi01/init.c b/testsuite/swi01/init.c
index 25e35cfe..d1de191a 100644
--- a/testsuite/swi01/init.c
+++ b/testsuite/swi01/init.c
@@ -44,7 +44,7 @@
 #include 
 
 #include 
-#include 
+#include 
 
 #include "swi_test.h"
 
diff --git a/testsuite/timeout01/init.c b/testsuite/timeout01/init.c
index 1c8df1c9..6dfacd34 100644
--- a/testsuite/timeout01/init.c
+++ b/testsuite/timeout01/init.c
@@ -42,7 +42,7 @@
 #include 
 
 #include 
-#include 
+#include 
 
 #include "timeout_test.h"
 
diff --git a/testsuite/usb01/init.c b/testsuite/usb01/init.c
index 2f5260e3..85bae4d3 100644
--- a/testsuite/usb01/init.c
+++ b/testsuite/usb01/init.c
@@ -49,7 +49,7 @@
 
 #define TEST_NAME "LIBBSD USB 1"
 #define TEST_STATE_USER_INPUT 1
-#include 
+#include 
 
 static rtems_status_code
 media_listener(rtems_media_event event, rtems_media_state state,
diff --git a/testsuite/usbkbd01/init.c b/testsuite/usbkbd01/init.c
index 238e2318..0ea2d2b7 100644
--- a/testsuite/usbkbd01/init.c
+++ b/testsuite/usbkbd01/init.c
@@ -45,7 +45,7 @@
 
 #define TEST_NAME "LIBBSD USB KEYBOARD"
 #define TEST_STATE_USER_INPUT 1
-#include 
+#include 
 
 #define USB_SERIAL_TEST_BUFFER_SIZE 48
 #define PRIO_OPEN  (RTEMS_MAXIMUM_PRIORITY - 12)
diff --git a/testsuite/usbmouse01/init.c b/testsuite/usbmouse01/init.c
index 95276147..5bf732d8 100644
--- a/testsuite/usbmouse01/init.c
+++ b/testsuite/usbmouse01/init.c
@@ -47,7 +47,7 @@
 
 #define TEST_NAME "LIBBSD USB MOUSE"
 #define TEST_STATE_USER_INPUT 1
-#include 
+#include 
 
 #define USB_SERIAL_TEST_BUFFER_SIZE 48
 #define PRIO_OPEN  (RTEMS_MAXIMUM_PRIORITY - 12)
diff --git a/testsuite/usbserial01/init.c b/testsuite/usbserial01/init.c
index 5b62b72e..0e75d8f1 100644
--- a/testsuite/usbserial01/init.c
+++ b/testsuite/usbserial01/init.c
@@ -46,7 +46,7 @@
 
 #define TEST_NAME "LIBBSD USB SERIAL"
 #

Re: [PATCH rtems-libbsd] testsuite: Use new name of test-info.h.

2020-07-29 Thread Sebastian Huber

On 29/07/2020 10:18, Christian Mauderer wrote:


In RTEMS the test.h has been renamed to test-info.h to allow the new
test framework to take over.

Thanks for fixing this, please push it.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Strong APA Scheduler : First Draft

2020-07-29 Thread Richi Dubey
Thanks for your help and reviews, I am going to work on all of your
suggestions.

The purpose of  is to enable the
> application to configure this scheduler and nothing more. Please note
> that  uses
> struct Per_CPU_Control  *cpu
> and NOT
> Per_CPU_Control  *cpu
> You can use struct Per_CPU_Control with a forward declaration.


I understand. I can see that the scheduleredfsmp.c also does not include
percpu.h, so the percpu.o is being linked with edf smp scheduler at the
time of compilation, right?

On Wed, Jul 29, 2020 at 10:33 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 29/07/2020 06:55, Gedare Bloom wrote:
>
> > On Tue, Jul 28, 2020 at 10:49 PM Sebastian Huber
> >  wrote:
> >> On 27/07/2020 09:44, Richi Dubey wrote:
> >>
> >>>  Which compiler error do you get? Maybe there is a cyclic
> dependency.
> >>>
> >>> I assumed that the schedulersmp.h already includes the percpu.h which
> >>> was not the case. My bad. The error has been removed.
> >>>
> >>> I assumed this because schedulersmp.h uses
> >>> <
> https://git.rtems.org/rtems/tree/cpukit/include/rtems/score/schedulersmp.h?id=3a95a07d88a6926bd2f67dc53c977b8dbc828f9c#n127>
> Per_CPU_Control
> >>> and does not show any compilation error, so it should have the
> >>> percpu.h included in one of its included header files right? If it
> >>> has, why did my schedulerstrongapa.h that had the schedulersmp.h
> >>> included give the following error:
> >>>
> >>>
> /home/richi/quick-start/src/rtems/cpukit/include/rtems/score/schedulerstrongapa.h:102:3:
> >>> error: unknown type name 'Per_CPU_Control'
> >>> Per_CPU_Control cpu;
> >> We have two kinds of header files in the implementation of RTEMS.
> >> Firstly, some header files are included in API header files and are thus
> >> visible to application code. These header files should only define
> >> things which are strictly necessary for applications. Secondly, some
> >> header files are only included in implementation source files.
> >>
> >> The purpose of  is to enable the
> >> application to configure this scheduler and nothing more. Please note
> >> that  uses
> >>
> >> struct Per_CPU_Control  *cpu
> >>
> >> and NOT
> >>
> >> Per_CPU_Control  *cpu
> >>
> >> You can use struct Per_CPU_Control with a forward declaration. This
> >> enables the use of this header file without having to include
> >> . You should not include  in
> >>  and remove everything from this file
> >> which is not necessary to configure the scheduler.
> >>
> > I provided a (detailed) review on your PR. One of my comments is
> > related to creating a schedulerstrongapaimpl.h header file. That is
> > where you should include extra headers, to avoid "leaking" internal
> > details to the application.
>
> I will have a look at the pull request.
>
> One option is not use a header file and place everything into the source
> file. We need an implementation header file only if some code is shared
> with other implementation sources. This should not be the case for this
> scheduler implementation.
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH rtems-libbsd 1/2] README: Update with information for RTEMS 6

2020-07-29 Thread Christian Mauderer
---
 README.md | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 9ab8a2603..7794b12b8 100644
--- a/README.md
+++ b/README.md
@@ -170,17 +170,23 @@ Branches
 
 * master - branch intended for the RTEMS master which tracks the FreeBSD master
   branch.  This branch must be used for libbsd development.  Back ports to the
-  5-freebsd-12 are allowed.
+  6-freebsd-12 are allowed.
 
-* 5-freebsd-12 - branch intended for RTEMS 5 which tracks the FreeBSD stable/12
+* 6-freebsd-12 - branch intended for RTEMS 6 which tracks the FreeBSD stable/12
   branch.  This branch is maintained and regular updates from FreeBSD are
   planned.  It is recommended for production systems.
 
+* 5-freebsd-12 - branch belongs to the RTEMS 5 release. It is based on FreeBSD
+  stable/12 branch. It is recommended for production systems that use RTEMS 5.
+
+* 5 - branch belongs to the RTEMS 5 release. It is based on a FreeBSD
+  development version.
+
 * freebsd-9.3 - branch for some RTEMS version with a FreeBSD 9.3 baseline.
-  This branch is unmaintained.  It is recommended to update to RTEMS 5.
+  This branch is unmaintained.  It is recommended to update to RTEMS 5 or 6.
 
 * 4.11 - branch for the RTEMS 4.11 release series.  This branch is
-  unmaintained.  It is recommended to update to RTEMS 5.
+  unmaintained.  It is recommended to update to RTEMS 5 or 6.
 
 Updating RTEMS Waf Support
 --
-- 
2.26.2

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


[PATCH rtems-libbsd 0/2] Update for RTEMS 6

2020-07-29 Thread Christian Mauderer
Hello,

If the patches are OK, I'll push them to rtems-libbsd master. I will
also create a 6-freebsd-12 branch and push only the second patch to that
one too.

Best regards

Christian


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


[PATCH rtems-libbsd 2/2] wscript: Update RTEMS version to 6.

2020-07-29 Thread Christian Mauderer
---
 wscript | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wscript b/wscript
index 3ca9478e7..faeb6b168 100644
--- a/wscript
+++ b/wscript
@@ -32,7 +32,7 @@
 
 from __future__ import print_function
 
-rtems_version = "5"
+rtems_version = "6"
 
 try:
 import rtems_waf.rtems as rtems
-- 
2.26.2

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


[PATCH rtems-docs] eng/release: Add libbsd version update

2020-07-29 Thread Christian Mauderer
---
 eng/release-process.rst | 9 +
 1 file changed, 9 insertions(+)

diff --git a/eng/release-process.rst b/eng/release-process.rst
index be73c3e..8399a9e 100644
--- a/eng/release-process.rst
+++ b/eng/release-process.rst
@@ -340,6 +340,15 @@ the needed changes.
 
 * :file:`tester/rtems/version.cfg`: Update ``rtems_version``.
 
+#. rtems_libbsd requires the following files and branches be changed:
+
+* :file:`README.md`: Update ``Branches`` section.
+
+* :file:`wscript`: Update ``rtems_version``.
+
+* Create a new branch for tracking the FreeBSD stable version. E.g.
+  ``6-freebsd-12``.
+
 Release Procedure
 =
 
-- 
2.26.2

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


Re: [PATCH 0/2] Fix fenv support for ARM

2020-07-29 Thread Eshan Dhawan

> On 29-Jul-2020, at 10:38 AM, Sebastian Huber 
>  wrote:
> 
> On 27/07/2020 10:07, Corinna Vinschen via Newlib wrote:
> 
>>> On Jul 23 07:13, Sebastian Huber wrote:
 On 19/07/2020 13:01, Sebastian Huber wrote:
>>> 
 This patch set addresses some issues which popped up while building Newlib 
 for
 ARM with GCC 10 which enables -fno-common by default.
 
 Eshan dhawan (1):
arm: Fix fenv support
 
 Sebastian Huber (1):
arm: Remove superfluous fenv stub files
>>> I just noticed that the stub files I removed are not superfluous. Its seems
>>> they are necessary to somehow overwrite the default implementations in:
>>> 
>>> newlib/libm/fenv
>>> 
>>> There seems to be some build system magic involved here. I guess we have to
>>> split up fenv.c and move all the functions to individual files matching the
>>> ones in newlib/libm/fenv?
>> Splitting is probably better.  When you created and tested a new patchset,
>> feel free to push it.
> 
> I checked in two patches:
> 
> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=b7a6e02dc6a5289bfa489c0e7b6539abd281e2c6
> 
> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=3ca43259686187e081d317e2b406724a849c9d7b
> 
> I hope the ARM fenv support issues are now fixed.
I hope the same 
Could you check the MIPS patch as well 
https://lists.rtems.org/pipermail/devel/2020-July/060762.html
This patch removed soft float support from MIPS 
As it was the other architecture that could cause error
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

RE: [PATCH v1 0/1] i386: Fix possible race condition on first context restore

2020-07-29 Thread Jan.Sommer
Could someone please check the patch and push it to the 5 and master branches?
I will be on vacation from tomorrow, so I wanted to give it a pre-vacation bump.
My response times will be a bit delayed, but I will check emails from time to 
time.

Cheers,

   Jan

> -Original Message-
> From: Sommer, Jan
> Sent: Wednesday, July 22, 2020 2:42 PM
> To: devel@rtems.org
> Cc: Sommer, Jan
> Subject: [PATCH v1 0/1] i386: Fix possible race condition on first context
> restore
> 
> Ran into this problem sometimes when testing examples of rtems-libbsd,
> but it should be general.
> 
> I opened tickets https://devel.rtems.org/ticket/4030 and
> https://devel.rtems.org/ticket/4031 correspondintly.
> 
> Cheers,
> 
>Jan
> 
> Jan Sommer (1):
>   i386: Fix possible race condition on first context restore
> 
>  cpukit/score/cpu/i386/cpu_asm.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --
> 2.17.1

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


Re: [PATCH v1 0/1] i386: Fix possible race condition on first context restore

2020-07-29 Thread Sebastian Huber

On 29/07/2020 11:18, jan.som...@dlr.de wrote:


Could someone please check the patch and push it to the 5 and master branches?
I will be on vacation from tomorrow, so I wanted to give it a pre-vacation bump.
My response times will be a bit delayed, but I will check emails from time to 
time.

I checked in both patches.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


RE: [PATCH v1 0/1] i386: Fix possible race condition on first context restore

2020-07-29 Thread Jan.Sommer



> -Original Message-
> From: Sebastian Huber [mailto:sebastian.hu...@embedded-brains.de]
> Sent: Wednesday, July 29, 2020 11:42 AM
> To: Sommer, Jan; devel@rtems.org
> Subject: Re: [PATCH v1 0/1] i386: Fix possible race condition on first context
> restore
> 
> On 29/07/2020 11:18, jan.som...@dlr.de wrote:
> 
> > Could someone please check the patch and push it to the 5 and master
> branches?
> > I will be on vacation from tomorrow, so I wanted to give it a pre-vacation
> bump.
> > My response times will be a bit delayed, but I will check emails from time 
> > to
> time.
> I checked in both patches.

Thank you. More relaxed vacation now :)
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 0/2] Fix fenv support for ARM

2020-07-29 Thread Sebastian Huber

On 29/07/2020 11:14, Eshan Dhawan wrote:


Could you check the MIPS patch as well
https://lists.rtems.org/pipermail/devel/2020-July/060762.html
This patch removed soft float support from MIPS
As it was the other architecture that could cause error

Where can I find the hard float support in the MIPS files?
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 0/2] Fix fenv support for ARM

2020-07-29 Thread Eshan Dhawan

> On 29-Jul-2020, at 3:28 PM, Sebastian Huber 
>  wrote:
> 
> On 29/07/2020 11:14, Eshan Dhawan wrote:
> 
>> Could you check the MIPS patch as well
>> https://lists.rtems.org/pipermail/devel/2020-July/060762.html
>> This patch removed soft float support from MIPS
>> As it was the other architecture that could cause error
> Where can I find the hard float support in the MIPS files?
Apologies I sent the wrong link 
Actually I was sending the patch link 
https://lists.rtems.org/pipermail/devel/2020-July/060808.html

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

Re: [PATCH] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-29 Thread Niteesh G. S.
Ping.

Thank you,
Niteesh.


On Fri, Jul 3, 2020 at 2:37 AM G S Niteesh Babu 
wrote:

> This commit move the bsp/fdt.h header to cpukit/include/rtems.
> The reason for this is, with inclusion of libfreebsd there are
> cases where their is need for bsp_fdt_get(). And with this
> header under bsps directory it is not possible to include it
> under a cpukit directory.
> ---
>  bsps/include/bsp/fdt.h | 86 +-
>  cpukit/include/rtems/fdt.h | 69 ++
>  2 files changed, 99 insertions(+), 56 deletions(-)
>  create mode 100644 cpukit/include/rtems/fdt.h
>
> diff --git a/bsps/include/bsp/fdt.h b/bsps/include/bsp/fdt.h
> index 4ed05b136c..4a7c3dfb24 100644
> --- a/bsps/include/bsp/fdt.h
> +++ b/bsps/include/bsp/fdt.h
> @@ -1,67 +1,41 @@
> -/*
> - * Copyright (c) 2015, 2017 embedded brains GmbH.  All rights reserved.
> - *
> - *  embedded brains GmbH
> - *  Dornierstr. 4
> - *  82178 Puchheim
> - *  Germany
> - *  
> - *
> - * The license and distribution terms for this file may be
> - * found in the file LICENSE in this distribution or at
> - * http://www.rtems.org/license/LICENSE.
> - */
> -
> -#ifndef LIBBSP_SHARED_FDT_H
> -#define LIBBSP_SHARED_FDT_H
> -
> -#include 
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif /* __cplusplus */
> -
> -/*
> - * BSPs that implement the FDT support functions must define
> - * BSP_FDT_IS_SUPPORTED.
> - */
> +/* SPDX-License-Identifier: BSD-2-Clause */
>
>  /**
> - * @brief Copies the specified source FDT to a dedicated global data area.
> + * @file
>   *
> - * The source FDT is usually provided by a bootloader and may be located
> in a
> - * memory area that is used by the program.  The low-level initialization
> - * should copy the FDT for later use.
> + * @ingroup RTEMSBSPsShared
>   *
> - * The copy can be accessed by bsp_fdt_get().
> - *
> - * @param[in] src The source FDT.
>   */
> -void bsp_fdt_copy(const void *src);
>
> -/**
> - * @brief Returns the FDT of the BSP.
> - *
> - * @return The FDT of the BSP.
> +/*
> + * Copyright (C) <2020>, Niteesh G S 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
> BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
> THE
> + * POSSIBILITY OF SUCH DAMAGE.
>   */
> -const void *bsp_fdt_get(void);
>
> -/**
> - * @brief Maps the interrupt number of the FDT to the interrupt vector
> used by
> - * the interrupt management.
> - *
> - * This function is used by the libbsd to implement the OFW_BUS_MAP_INTR
> bus
> - * method.
> - *
> - * @param[in] intr The FDT interrupt number cells.
> - * @param[in] icells The FDT interrupt cell count.
> - *
> - * @return The interrupt vector of the FDT interrupt number.
> - */
> -uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells);
> +#ifndef LIBBSP_SHARED_FDT_H
> +#define LIBBSP_SHARED_FDT_H
>
> -#ifdef __cplusplus
> -}
> -#endif /* __cplusplus */
> +#include 
> +#include 
>
>  #endif /* LIBBSP_SHARED_FDT_H */
> diff --git a/cpukit/include/rtems/fdt.h b/cpukit/include/rtems/fdt.h
> new file mode 100644
> index 00..149f7ff906
> --- /dev/null
> +++ b/cpukit/include/rtems/fdt.h
> @@ -0,0 +1,69 @@
> +/*
> + * Copyright (c) 2015, 2017 embedded brains GmbH.  All rights reserved.
> + *
> + *  embedded brains GmbH
> + *  Dornierstr. 4
> + *  82178 Puchheim
> + *  Germany
> + *  
> + *
> + * Modified by Niteesh G S 
> + *
> + * The license and distribution terms for this file may be
> + * found in the file LICENSE in this distribution or at
> + * http://www.rtems.org/license/LICENSE.
> + */
> +
> +#ifndef RTEMS_FDT_H
> +#define RTEMS_FDT_H
> +
> +#include 
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif /* __cplusplus */
> +
> +/*
> + * BSPs that implement the FDT support functions must define
> + * BSP_FDT_IS_SUPP

Re: [PATCH RTEMS 1/7] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-29 Thread Niteesh G. S.
Hello,

Please review this series of patches.

Thanks,
Niteesh.

On Wed, Jul 15, 2020 at 3:14 PM Niteesh G. S.  wrote:

> Hello,
>
> I would like to add some more information regarding these patches here.
>
> These patches are currently not meant to replace the OpenFirmWare API from
> libBSD.
> For these patches to be completely compatible with libBSD we must support
> creating and
> registering *xref's* since the drivers use the *xref* mechanism to create
> a cross-reference
> between the devices, they are handling and the node handles in FDT for
> efficient translation.
>
> The current plan is to let libBSD initialize the *xref* structure during
> its initialization. And have
> RTEMS provide the openfirmware API.
> i.e.
> RTEMS will contain the openfirm.h and openfirm.c with FreeBSD independent
> function
> declarations and definitions. For functions like
>
> device_t OF_device_from_xref(phandle_t xref);
>
> phandle_t OF_xref_from_device(device_t dev);
>
> int OF_device_register_xref(phandle_t xref, device_t dev);
>
> which are dependent on FreeBSD we will have the declarations in RTEMS and
> definitions
> in FreeBSD. Though we have tried this with the pinmux driver more
> extensive testing has
> to done.
>
> To allow for definitions of the above function in openfirm.h(present in
> RTEMS) we forward
> declared the *device* structure.
>
> typedef struct device *device_t;
>
> If anyone doesn't like this solution please suggest an alternative
> solution.
>
> Thanks,
> Niteesh.
>
>
> On Wed, Jul 15, 2020 at 12:02 PM G S Niteesh Babu 
> wrote:
>
>> This commit move the bsp/fdt.h header to cpukit/include/rtems.
>> The reason for this is, with inclusion of libfreebsd there are
>> cases where their is need for bsp_fdt_get(). And with this
>> header under bsps directory it is not possible to include it
>> under a cpukit directory.
>> ---
>>  bsps/include/bsp/fdt.h| 86 +++
>>  cpukit/include/rtems/fdt.h| 69 +
>>  spec/build/cpukit/librtemscpu.yml |  1 +
>>  3 files changed, 100 insertions(+), 56 deletions(-)
>>  create mode 100644 cpukit/include/rtems/fdt.h
>>
>> diff --git a/bsps/include/bsp/fdt.h b/bsps/include/bsp/fdt.h
>> index 4ed05b136c..4a7c3dfb24 100644
>> --- a/bsps/include/bsp/fdt.h
>> +++ b/bsps/include/bsp/fdt.h
>> @@ -1,67 +1,41 @@
>> -/*
>> - * Copyright (c) 2015, 2017 embedded brains GmbH.  All rights reserved.
>> - *
>> - *  embedded brains GmbH
>> - *  Dornierstr. 4
>> - *  82178 Puchheim
>> - *  Germany
>> - *  
>> - *
>> - * The license and distribution terms for this file may be
>> - * found in the file LICENSE in this distribution or at
>> - * http://www.rtems.org/license/LICENSE.
>> - */
>> -
>> -#ifndef LIBBSP_SHARED_FDT_H
>> -#define LIBBSP_SHARED_FDT_H
>> -
>> -#include 
>> -
>> -#ifdef __cplusplus
>> -extern "C" {
>> -#endif /* __cplusplus */
>> -
>> -/*
>> - * BSPs that implement the FDT support functions must define
>> - * BSP_FDT_IS_SUPPORTED.
>> - */
>> +/* SPDX-License-Identifier: BSD-2-Clause */
>>
>>  /**
>> - * @brief Copies the specified source FDT to a dedicated global data
>> area.
>> + * @file
>>   *
>> - * The source FDT is usually provided by a bootloader and may be located
>> in a
>> - * memory area that is used by the program.  The low-level initialization
>> - * should copy the FDT for later use.
>> + * @ingroup RTEMSBSPsShared
>>   *
>> - * The copy can be accessed by bsp_fdt_get().
>> - *
>> - * @param[in] src The source FDT.
>>   */
>> -void bsp_fdt_copy(const void *src);
>>
>> -/**
>> - * @brief Returns the FDT of the BSP.
>> - *
>> - * @return The FDT of the BSP.
>> +/*
>> + * Copyright (C) <2020>, Niteesh G S 
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above copyright
>> + *notice, this list of conditions and the following disclaimer in the
>> + *documentation and/or other materials provided with the
>> distribution.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>> "AS IS"
>> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
>> THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE
>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
>> BE
>> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
>> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
>> BUSINESS
>> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
>> IN
>> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
>> OTHERWISE)
>> + * ARISING 

Re: [PATCH] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-29 Thread Sebastian Huber

Hello Niteesh,

I am sorry, but my GSoC review capacity is currently quite limited. I 
had to spend some time to fix the broken ARM fenv support in Newlib. The 
strong APA scheduler is the next thing on my list.


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


Re: Arm fenv patch V4

2020-07-29 Thread Sebastian Huber

On 29/07/2020 08:57, Sebastian Huber wrote:


Hello Eshan,

thanks, I pushed the patches to Newlib with some minor modifications. 
I updated the RSB accordingly.


This is really a never ending story:

/build/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: 
/build/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/lib/thumb/armv7-a+simd/hard/libm.a(lib_a-fesetenv.o): 
in function `fesetenv':
/scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-33fb1b3-newlib-3ca4325-x86_64-linux-gnu-1/build/arm-rtems6/thumb/armv7-a+simd/hard/newlib/libm/machine/arm/../../../../../../../../../gnu-mirror-gcc-33fb1b3/newlib/libm/machine/arm/fesetenv.c:38: 
undefined reference to `vmsr_fpscr'


I will fix it.

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


Re: Strong APA Scheduler : First Draft

2020-07-29 Thread Gedare Bloom
On Wed, Jul 29, 2020 at 2:24 AM Richi Dubey  wrote:
>
> Thanks for your help and reviews, I am going to work on all of your 
> suggestions.
>
>> The purpose of  is to enable the
>> application to configure this scheduler and nothing more. Please note
>> that  uses
>> struct Per_CPU_Control  *cpu
>> and NOT
>> Per_CPU_Control  *cpu
>> You can use struct Per_CPU_Control with a forward declaration.
>
>
> I understand. I can see that the scheduleredfsmp.c also does not include 
> percpu.h, so the percpu.o is being linked with edf smp scheduler at the time 
> of compilation, right?
>

You seem to be confusing some terminology. #include copies the
contents of the included file into the one that is including it, which
gets to 'see' everything in the included file. This happens during the
C Preprocessing step. After that, the compiler generates intermediate
representation from the high-level language, does an optimization
pass, then generates an object code file. This step is called
"compiling." ASM source files get "assembled" to object code by the
assembler. After that, object code files are linked together during
"linking."

If a C source code file uses a symbol in a different C source code
file, the two should share the same declaration of that symbol.
Usually, this declaration is made in a .h header file to include in
both source files. However, it is not mandatory, since a C source code
file can make a forward declaration of the symbol, just enough so the
compiler knows what the 'type' is of the symbol in order to generate
suitable code to use it. Later on, at the link stage, the symbol will
be made available to all object codes that are linked together.

In RTEMS, we separately compile all C source code to object files, and
then link them together to form several libraries of object code.
Finally, an application will link to the libraries to produce the
binary program. So, it is true that percpu.o will link with
scheduleredfsmp.o, but that isn't relevant to the question of whether
or not the EDF SMP Scheduler uses the types/structs defined in
percpu.h. The scheduler can use a forward declaration to let the
compiler know that it is using some struct, and at the linking stage
the linker will resolve the names of all the symbols that haven't yet
been seen in each object code, by checking the other object files
being linked against. If any names are missing, you get a linker error
(Unable to resolve symbol...).

Probably this stuff is written up somewhere. It is typically covered
in a textbook on computer organization or computer systems courses in
typical CS curriculum.

Gedare

> On Wed, Jul 29, 2020 at 10:33 AM Sebastian Huber 
>  wrote:
>>
>> On 29/07/2020 06:55, Gedare Bloom wrote:
>>
>> > On Tue, Jul 28, 2020 at 10:49 PM Sebastian Huber
>> >  wrote:
>> >> On 27/07/2020 09:44, Richi Dubey wrote:
>> >>
>> >>>  Which compiler error do you get? Maybe there is a cyclic dependency.
>> >>>
>> >>> I assumed that the schedulersmp.h already includes the percpu.h which
>> >>> was not the case. My bad. The error has been removed.
>> >>>
>> >>> I assumed this because schedulersmp.h uses
>> >>> 
>> >>>  Per_CPU_Control
>> >>> and does not show any compilation error, so it should have the
>> >>> percpu.h included in one of its included header files right? If it
>> >>> has, why did my schedulerstrongapa.h that had the schedulersmp.h
>> >>> included give the following error:
>> >>>
>> >>> /home/richi/quick-start/src/rtems/cpukit/include/rtems/score/schedulerstrongapa.h:102:3:
>> >>> error: unknown type name 'Per_CPU_Control'
>> >>> Per_CPU_Control cpu;
>> >> We have two kinds of header files in the implementation of RTEMS.
>> >> Firstly, some header files are included in API header files and are thus
>> >> visible to application code. These header files should only define
>> >> things which are strictly necessary for applications. Secondly, some
>> >> header files are only included in implementation source files.
>> >>
>> >> The purpose of  is to enable the
>> >> application to configure this scheduler and nothing more. Please note
>> >> that  uses
>> >>
>> >> struct Per_CPU_Control  *cpu
>> >>
>> >> and NOT
>> >>
>> >> Per_CPU_Control  *cpu
>> >>
>> >> You can use struct Per_CPU_Control with a forward declaration. This
>> >> enables the use of this header file without having to include
>> >> . You should not include  in
>> >>  and remove everything from this file
>> >> which is not necessary to configure the scheduler.
>> >>
>> > I provided a (detailed) review on your PR. One of my comments is
>> > related to creating a schedulerstrongapaimpl.h header file. That is
>> > where you should include extra headers, to avoid "leaking" internal
>> > details to the application.
>>
>> I will have a look at the pull request.
>>
>> One option is not use a header file and place everything into the sourc

Re: [PATCH rtems-libbsd 0/2] Update for RTEMS 6

2020-07-29 Thread Gedare Bloom
look ok to me, thanks

On Wed, Jul 29, 2020 at 2:59 AM Christian Mauderer
 wrote:
>
> Hello,
>
> If the patches are OK, I'll push them to rtems-libbsd master. I will
> also create a 6-freebsd-12 branch and push only the second patch to that
> one too.
>
> Best regards
>
> Christian
>
>
> ___
> 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: [PATCH] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-29 Thread Gedare Bloom
On Thu, Jul 2, 2020 at 3:07 PM G S Niteesh Babu  wrote:
>
> This commit move the bsp/fdt.h header to cpukit/include/rtems.
> The reason for this is, with inclusion of libfreebsd there are
> cases where their is need for bsp_fdt_get(). And with this
> header under bsps directory it is not possible to include it
> under a cpukit directory.
> ---
>  bsps/include/bsp/fdt.h | 86 +-
>  cpukit/include/rtems/fdt.h | 69 ++
>  2 files changed, 99 insertions(+), 56 deletions(-)
>  create mode 100644 cpukit/include/rtems/fdt.h
>
> diff --git a/bsps/include/bsp/fdt.h b/bsps/include/bsp/fdt.h
> index 4ed05b136c..4a7c3dfb24 100644
> --- a/bsps/include/bsp/fdt.h
> +++ b/bsps/include/bsp/fdt.h
> @@ -1,67 +1,41 @@
> -/*
> - * Copyright (c) 2015, 2017 embedded brains GmbH.  All rights reserved.
> - *
> - *  embedded brains GmbH
> - *  Dornierstr. 4
> - *  82178 Puchheim
> - *  Germany
> - *  
> - *
> - * The license and distribution terms for this file may be
> - * found in the file LICENSE in this distribution or at
> - * http://www.rtems.org/license/LICENSE.
> - */
> -
> -#ifndef LIBBSP_SHARED_FDT_H
> -#define LIBBSP_SHARED_FDT_H
> -
> -#include 
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif /* __cplusplus */
> -
> -/*
> - * BSPs that implement the FDT support functions must define
> - * BSP_FDT_IS_SUPPORTED.
> - */
> +/* SPDX-License-Identifier: BSD-2-Clause */
>
>  /**
> - * @brief Copies the specified source FDT to a dedicated global data area.
> + * @file
>   *
> - * The source FDT is usually provided by a bootloader and may be located in a
> - * memory area that is used by the program.  The low-level initialization
> - * should copy the FDT for later use.
> + * @ingroup RTEMSBSPsShared
>   *
> - * The copy can be accessed by bsp_fdt_get().
> - *
> - * @param[in] src The source FDT.
>   */
> -void bsp_fdt_copy(const void *src);
>
> -/**
> - * @brief Returns the FDT of the BSP.
> - *
> - * @return The FDT of the BSP.
> +/*
> + * Copyright (C) <2020>, Niteesh G S 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
> IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
>   */
> -const void *bsp_fdt_get(void);
>
> -/**
> - * @brief Maps the interrupt number of the FDT to the interrupt vector used 
> by
> - * the interrupt management.
> - *
> - * This function is used by the libbsd to implement the OFW_BUS_MAP_INTR bus
> - * method.
> - *
> - * @param[in] intr The FDT interrupt number cells.
> - * @param[in] icells The FDT interrupt cell count.
> - *
> - * @return The interrupt vector of the FDT interrupt number.
> - */
> -uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells);
> +#ifndef LIBBSP_SHARED_FDT_H
> +#define LIBBSP_SHARED_FDT_H
>
> -#ifdef __cplusplus
> -}
> -#endif /* __cplusplus */
> +#include 
> +#include 
>
>  #endif /* LIBBSP_SHARED_FDT_H */
> diff --git a/cpukit/include/rtems/fdt.h b/cpukit/include/rtems/fdt.h
> new file mode 100644
> index 00..149f7ff906
> --- /dev/null
> +++ b/cpukit/include/rtems/fdt.h
> @@ -0,0 +1,69 @@
> +/*
> + * Copyright (c) 2015, 2017 embedded brains GmbH.  All rights reserved.
> + *
> + *  embedded brains GmbH
> + *  Dornierstr. 4
> + *  82178 Puchheim
> + *  Germany
> + *  
> + *
> + * Modified by Niteesh G S 
> + *
> + * The license and distribution terms for this file may be
> + * found in the file LICENSE in this distribution or at
> + * http://www.rtems.org/license/LICENSE.
> + */
> +
> +#ifndef RTEMS_FDT_H
> +#define RTEMS_FDT_H
> +
> +#include 
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif /* __cplusplus */
> +
> +/*
> + * BSPs that implement the FDT support functions must define
> + * BSP_FDT_IS_SUPPORTED.
> + */
> +
> +/**
> + * @brief Co

Re: [PATCH RTEMS 1/7] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-29 Thread Gedare Bloom
On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  wrote:
>
> This commit move the bsp/fdt.h header to cpukit/include/rtems.
> The reason for this is, with inclusion of libfreebsd there are
> cases where their is need for bsp_fdt_get(). And with this
> header under bsps directory it is not possible to include it
> under a cpukit directory.
> ---
>  bsps/include/bsp/fdt.h| 86 +++
>  cpukit/include/rtems/fdt.h| 69 +
>  spec/build/cpukit/librtemscpu.yml |  1 +
>  3 files changed, 100 insertions(+), 56 deletions(-)
>  create mode 100644 cpukit/include/rtems/fdt.h
>
> diff --git a/bsps/include/bsp/fdt.h b/bsps/include/bsp/fdt.h
> index 4ed05b136c..4a7c3dfb24 100644
> --- a/bsps/include/bsp/fdt.h
> +++ b/bsps/include/bsp/fdt.h
> @@ -1,67 +1,41 @@
> -/*
> - * Copyright (c) 2015, 2017 embedded brains GmbH.  All rights reserved.
> - *
> - *  embedded brains GmbH
> - *  Dornierstr. 4
> - *  82178 Puchheim
> - *  Germany
> - *  
> - *
> - * The license and distribution terms for this file may be
> - * found in the file LICENSE in this distribution or at
> - * http://www.rtems.org/license/LICENSE.
> - */
> -
> -#ifndef LIBBSP_SHARED_FDT_H
> -#define LIBBSP_SHARED_FDT_H
> -
> -#include 
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif /* __cplusplus */
> -
> -/*
> - * BSPs that implement the FDT support functions must define
> - * BSP_FDT_IS_SUPPORTED.
> - */
> +/* SPDX-License-Identifier: BSD-2-Clause */
>
>  /**
> - * @brief Copies the specified source FDT to a dedicated global data area.
> + * @file
>   *
> - * The source FDT is usually provided by a bootloader and may be located in a
> - * memory area that is used by the program.  The low-level initialization
> - * should copy the FDT for later use.
> + * @ingroup RTEMSBSPsShared
>   *
> - * The copy can be accessed by bsp_fdt_get().
> - *
> - * @param[in] src The source FDT.
>   */
> -void bsp_fdt_copy(const void *src);
>
> -/**
> - * @brief Returns the FDT of the BSP.
> - *
> - * @return The FDT of the BSP.
> +/*
> + * Copyright (C) <2020>, Niteesh G S 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
> IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
>   */
> -const void *bsp_fdt_get(void);
>
> -/**
> - * @brief Maps the interrupt number of the FDT to the interrupt vector used 
> by
> - * the interrupt management.
> - *
> - * This function is used by the libbsd to implement the OFW_BUS_MAP_INTR bus
> - * method.
> - *
> - * @param[in] intr The FDT interrupt number cells.
> - * @param[in] icells The FDT interrupt cell count.
> - *
> - * @return The interrupt vector of the FDT interrupt number.
> - */
> -uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells);
> +#ifndef LIBBSP_SHARED_FDT_H
> +#define LIBBSP_SHARED_FDT_H
>
> -#ifdef __cplusplus
> -}
> -#endif /* __cplusplus */
> +#include 
> +#include 
>
>  #endif /* LIBBSP_SHARED_FDT_H */
> diff --git a/cpukit/include/rtems/fdt.h b/cpukit/include/rtems/fdt.h
> new file mode 100644
> index 00..149f7ff906
> --- /dev/null
> +++ b/cpukit/include/rtems/fdt.h
> @@ -0,0 +1,69 @@
> +/*
> + * Copyright (c) 2015, 2017 embedded brains GmbH.  All rights reserved.
> + *
> + *  embedded brains GmbH
> + *  Dornierstr. 4
> + *  82178 Puchheim
> + *  Germany
> + *  
> + *
> + * Modified by Niteesh G S 
> + *
> + * The license and distribution terms for this file may be
> + * found in the file LICENSE in this distribution or at
> + * http://www.rtems.org/license/LICENSE.
> + */
> +
> +#ifndef RTEMS_FDT_H
> +#define RTEMS_FDT_H
> +
> +#include 
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif /* __cplusplus */
> +
> +/*
> + * BSPs that implement the FDT support functions must define
> + * BSP_FD

Re: [PATCH RTEMS 2/7] libfreebsd: Import OFW files from FreeBSD.

2020-07-29 Thread Gedare Bloom
I'm a little concerned about namespace pollution.

On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  wrote:
>
> freebsd head: b8c57b4
>
> The following files have been imported from FreeBSD to implement
> OF_* functions into RTEMS.
> 1) openfirm.h
> 2) openfirm.c
> 3) ofw_fdt.c
> ---
>  cpukit/include/dev/ofw/openfirm.h| 187 
>  cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c  | 479 +++
>  cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c | 848 +++
>  3 files changed, 1514 insertions(+)
>  create mode 100644 cpukit/include/dev/ofw/openfirm.h
>  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c
>  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c
>
> diff --git a/cpukit/include/dev/ofw/openfirm.h 
> b/cpukit/include/dev/ofw/openfirm.h
> new file mode 100644
> index 00..74a7075367
> --- /dev/null
> +++ b/cpukit/include/dev/ofw/openfirm.h
> @@ -0,0 +1,187 @@
> +/* $NetBSD: openfirm.h,v 1.1 1998/05/15 10:16:00 tsubai Exp $  */
> +
> +/*-
> + * SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD)
> + *
> + * Copyright (C) 1995, 1996 Wolfgang Solfrank.
> + * Copyright (C) 1995, 1996 TooLs GmbH.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + * 3. All advertising materials mentioning features or use of this software
> + *must display the following acknowledgement:
> + * This product includes software developed by TooLs GmbH.
> + * 4. The name of TooLs GmbH may not be used to endorse or promote products
> + *derived from this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
> + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, 
> INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
> TO,
> + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
> PROFITS;
> + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
> + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
> + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
> + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +/*
> + * Copyright (C) 2000 Benno Rice.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR
> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
> + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, 
> INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
> TO,
> + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
> PROFITS;
> + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
> + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
> + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
> + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + *
> + * $FreeBSD$
> + */
> +
> +#ifndef _DEV_OPENFIRM_H_
> +#define _DEV_OPENFIRM_H_
> +
> +#include 
> +#include 
> +
> +/*
> + * Prototypes for Open Firmware Interface Routines
> + */
> +
> +typedef uint32_t   ihandle_t;
> +typedef uint32_t   phandle_t;
> +typedef uint32_t   pcell_t;
> +
> +#ifdef _KERNEL
> +#include 
> +
> +#include 
> +
> +MALLOC_DECLARE(M_OFWPROP);
> +
> +/*
> + * Open Firmware interface initialization.  OF_install installs the named
> + * interface as the Open Firmware access mechanism, OF_init initializes it.
> + */
> +
> +boolean_t  OF_install(char *name, int prio);
> +intOF_init(void *cookie);
> +
> +/*
> + * Known Open Firmware interface nam

Re: [PATCH RTEMS 3/7] libfreebsd: Added ofw_if.h

2020-07-29 Thread Gedare Bloom
On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  wrote:
>
> This file is the RTEMS implementation of ofw_if.h in FreeBSD. The
> ofw_if.h in FreeBSD is an autogenerated header file that maps the
> OF_function calls to their respective implementation. But in RTEMS
> this file maps the OF_functions directly to their FDT implementation.
> ---
>  cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h | 62 ++
>  1 file changed, 62 insertions(+)
>  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h

You may have mentioned this elsewhere, but if this header file needs
to be installed it should go under the include/ tree.

>
> diff --git a/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h 
> b/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
> new file mode 100644
> index 00..f66c02884e
> --- /dev/null
> +++ b/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
> @@ -0,0 +1,62 @@
> +/* SPDX-License-Identifier: BSD-2-Clause
> +
> + *
> + * @file
> + *
> + * @ingroup LIBFREEBSD
These usually aren't all caps. They're not consistent, but LibFreeBSD
makes more sense to me.

> + *
> + * @brief Declaration of OFW functions.
> + */
> +
> +/*
> + * Copyright (C) <2020> Niteesh Babu 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
> IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifndef _LIBFREEBSD_OFW_IF_H
> +#define _LIBFREEBSD_OFW_IF_H
> +
> +#include 

This means that header is installed. Please put the headers under the
include/dev tree instead.

> +
> +typedef void*  ofw_t;
> +
> +int OFW_INIT(ofw_t ofw_obj, void *cookie);
> +phandle_t OFW_PEER(ofw_t ofw_obj, phandle_t node);
> +phandle_t OFW_CHILD(ofw_t ofw_obj, phandle_t node);
> +phandle_t OFW_PARENT(ofw_t ofw_obj, phandle_t node);
> +phandle_t OFW_INSTANCE_TO_PACKAGE(ofw_t ofw_obj, ihandle_t instance);
> +ssize_t OFW_GETPROPLEN(ofw_t ofw_obj, phandle_t package, const char 
> *propname);
> +ssize_t OFW_GETPROP(ofw_t ofw_obj, phandle_t package, const char *propname,
> +   void *buf, size_t buflen);
> +int OFW_NEXTPROP(ofw_t ofw_obj, phandle_t package, const char *prev, char 
> *buf,
> +   size_t size);
> +int OFW_SETPROP(ofw_t ofw_obj, phandle_t package, const char *propname,
> +   const void *buf, size_t len);
> +ssize_t OFW_CANON(ofw_t ofw_obj, const char *device, char *buf, size_t len);
> +phandle_t OFW_FINDDEVICE(ofw_t ofw_obj, const char *device);
> +ssize_t OFW_INSTANCE_TO_PATH(ofw_t ofw_obj, ihandle_t instance, char *buf,
> +   size_t len);
> +ssize_t OFW_PACKAGE_TO_PATH(ofw_t ofw_obj, phandle_t package, char *buf,
> +   size_t len);
> +

Doxygen?

> +#endif /* _LIBFREEBSD_OFW_IF_H */
> --
> 2.17.1
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Translation table for small pages in ARMv7 MMU conflicting with other data regions

2020-07-29 Thread Utkarsh Rai
The translation table for ARMv7 MMU starts at 0x10 and extends up to
0x104000 for section-based pages. Although for small pages it extends up to
0x504000 this possibly conflicts with other data regions and setting up of
translation table for smaller pages fails.
I realize that various data regions are placed at specified addresses by
linker scripts statically. One possible solution can be to replace the
'pt = &ttb[ARM_MMU_TRANSLATION_TABLE_ENTRY_COUNT]', where pt is the
second-level page table base-address, with another address region,
although I am not sure which. Can you please point the right way to proceed?
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Translation table for small pages in ARMv7 MMU conflicting with other data regions

2020-07-29 Thread Sebastian Huber

On 29/07/2020 18:02, Utkarsh Rai wrote:

The translation table for ARMv7 MMU starts at 0x10 and extends up 
to 0x104000 for section-based pages. Although for small pages it 
extends up to 0x504000 this possibly conflicts with other data regions 
and setting up of translation table for smaller pages fails.
I realize that various data regions are placed at specified addresses 
by linker scripts statically. One possible solution can be to replace the
'pt = &ttb[ARM_MMU_TRANSLATION_TABLE_ENTRY_COUNT]', where pt is the 
second-level page table base-address, with another address region,  
although I am not sure which. Can you please point the right way to 
proceed?
For an example please have a look at the realview_pbx_a9_qemu BSP. It 
uses 4KiB pages. With the new build system it would be easier to set up.

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

Re: [PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-29 Thread Gedare Bloom
On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  wrote:
>
> ---
>  spec/build/testsuites/libtests/grp.yml|   3 +
>  .../testsuites/libtests/openfirmware01.yml|  20 +++
>  testsuites/libtests/openfirmware01/init.c | 147 ++
>  .../openfirmware01/openfirmware01.doc |  29 
>  .../openfirmware01/openfirmware01.scn |   2 +
>  testsuites/libtests/openfirmware01/some.c |  52 +++
>  testsuites/libtests/openfirmware01/some.dts   |  54 +++
>  testsuites/libtests/openfirmware01/some.h |  15 ++
>  8 files changed, 322 insertions(+)
>  create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml
>  create mode 100644 testsuites/libtests/openfirmware01/init.c
>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.doc
>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.scn
>  create mode 100644 testsuites/libtests/openfirmware01/some.c
>  create mode 100644 testsuites/libtests/openfirmware01/some.dts
>  create mode 100644 testsuites/libtests/openfirmware01/some.h
>
> diff --git a/spec/build/testsuites/libtests/grp.yml 
> b/spec/build/testsuites/libtests/grp.yml
> index f1de6cd75f..56e84d2c89 100644
> --- a/spec/build/testsuites/libtests/grp.yml
> +++ b/spec/build/testsuites/libtests/grp.yml
> @@ -11,6 +11,7 @@ install: []
>  ldflags:
>  - -Wl,--wrap=printf
>  - -Wl,--wrap=puts
> +- -Wl,--wrap=bsp_fdt_get
>  links:
>  - role: build-dependency
>uid: optbin2c
> @@ -312,6 +313,8 @@ links:
>uid: write
>  - role: build-dependency
>uid: writev
> +- role: build-dependency
> +  uid: openfirmware01
>  type: build
>  use-after:
>  - rtemstest
> diff --git a/spec/build/testsuites/libtests/openfirmware01.yml 
> b/spec/build/testsuites/libtests/openfirmware01.yml
> new file mode 100644
> index 00..8feb69eb1e
> --- /dev/null
> +++ b/spec/build/testsuites/libtests/openfirmware01.yml
> @@ -0,0 +1,20 @@
> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> +build-type: test-program
> +cflags: []
> +copyrights:
> +- Copyright (C) 2020 Niteesh G S
> +cppflags: []
> +cxxflags: []
> +enabled-by: true
> +features: c cprogram
> +includes: []
> +ldflags: []
> +links: []
> +source:
> +- testsuites/libtests/openfirmware01/init.c
> +- testsuites/libtests/openfirmware01/some.c
> +stlib: []
> +target: testsuites/libtests/openfirmware01.exe
> +type: build
> +use-after: []
> +use-before: []
> diff --git a/testsuites/libtests/openfirmware01/init.c 
> b/testsuites/libtests/openfirmware01/init.c
> new file mode 100644
> index 00..fc38e6c513
> --- /dev/null
> +++ b/testsuites/libtests/openfirmware01/init.c
> @@ -0,0 +1,147 @@
> +/* SPDX-License-Identifier: BSD-2-Clause */
> +
> +/*
> + * Copyright (C) <2020> Niteesh G S 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
> IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "some.h"
> +
> +#define BUF_SIZE 100
> +
> +const char rtems_test_name[] = "OpenFirmWare 01";
> +
> +const void *__wrap_bsp_fdt_get(void);
> +const void *__real_bsp_fdt_get(void);
> +
> +const void *__wrap_bsp_fdt_get(void)
> +{
> +if (some_bin != NULL) {
> +return &some_bin[0];
> +}
> +return __real_bsp_fdt_get();
> +}
> +
> +static void Init(rtems_task_argument arg)
> +{
> +int rv;
> +phandle_t d;
> +phandle_t l;
> +phandle_t t;
> +phandle_t root;
> +phandle_t temp;
> +uint32_t *arr;
> +char buf[BUF_SIZE];
> +char *bufp;
> +ssize_t buf_len;
> +
> +TEST_BEGIN();
> +buf_len = sizeof(buf);
> +
> +/*
> + * Cannot use

Re: Translation table for small pages in ARMv7 MMU conflicting with other data regions

2020-07-29 Thread Utkarsh Rai
Thanks, I'll check it out.

On Wed, Jul 29, 2020 at 9:36 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 29/07/2020 18:02, Utkarsh Rai wrote:
>
> > The translation table for ARMv7 MMU starts at 0x10 and extends up
> > to 0x104000 for section-based pages. Although for small pages it
> > extends up to 0x504000 this possibly conflicts with other data regions
> > and setting up of translation table for smaller pages fails.
> > I realize that various data regions are placed at specified addresses
> > by linker scripts statically. One possible solution can be to replace the
> > 'pt = &ttb[ARM_MMU_TRANSLATION_TABLE_ENTRY_COUNT]', where pt is the
> > second-level page table base-address, with another address region,
> > although I am not sure which. Can you please point the right way to
> > proceed?
> For an example please have a look at the realview_pbx_a9_qemu BSP. It
> uses 4KiB pages. With the new build system it would be easier to set up.
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: New Build System Status

2020-07-29 Thread Gedare Bloom
Whenever you want to merge it and fix problems reported by lazy
developers who haven't used it yet (count me in!) is fine by me. This
is the "major" activity of RTEMS-6, so it will be good to integrate it
and get everyone using it sooner than later.

On Thu, Jul 16, 2020 at 9:16 AM Sebastian Huber
 wrote:
>
> Hello,
>
> I sent the documentation of the new build system some days ago and at
> least Gedare Bloom reviewed it.
>
> https://ftp.rtems.org/pub/rtems/people/sebh/user.pdf
>
> https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf
>
> I rebased the build system branch to the current master and squashed all 
> commits:
>
> https://git.rtems.org/sebh/rtems.git/log/?h=build-2
>
> I started the development nearly one year ago and it was basically production 
> ready in November last year. In the mean time Hesham Almatary added basic 
> support for clang to it. Doorstop is no longer used. This simplified the YAML 
> files a bit since no requirements related attributes are present in the build 
> item files. The item links are now an ordered list. This simplified the build 
> dependencies. The item paths are now also shorter since there is no longer a 
> duplication of the directory path in the file name.
>
> Each build item has a license and a copyright statement list. I didn't add 
> copyright statements for the BSP option descriptions. If someone thinks there 
> is a statement missing or the licensing conditions are not acceptable, we can 
> add/change it later.
>
> I built all BSPs with all tests enabled today using the latest RTEMS 5 tool 
> chain which is based on GCC 10. I had to disable the fenv test since the ARM 
> support is currently broken.
>
> The build system is ready to be merged from my point of view.
>
> ___
> 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: [PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-29 Thread Christian Mauderer
On 29/07/2020 18:07, Gedare Bloom wrote:
> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  
> wrote:
>>
>> ---
>>  spec/build/testsuites/libtests/grp.yml|   3 +
>>  .../testsuites/libtests/openfirmware01.yml|  20 +++
>>  testsuites/libtests/openfirmware01/init.c | 147 ++
>>  .../openfirmware01/openfirmware01.doc |  29 
>>  .../openfirmware01/openfirmware01.scn |   2 +
>>  testsuites/libtests/openfirmware01/some.c |  52 +++
>>  testsuites/libtests/openfirmware01/some.dts   |  54 +++
>>  testsuites/libtests/openfirmware01/some.h |  15 ++
>>  8 files changed, 322 insertions(+)
>>  create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml
>>  create mode 100644 testsuites/libtests/openfirmware01/init.c
>>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.doc
>>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.scn
>>  create mode 100644 testsuites/libtests/openfirmware01/some.c
>>  create mode 100644 testsuites/libtests/openfirmware01/some.dts
>>  create mode 100644 testsuites/libtests/openfirmware01/some.h
>>
>> diff --git a/spec/build/testsuites/libtests/grp.yml 
>> b/spec/build/testsuites/libtests/grp.yml
>> index f1de6cd75f..56e84d2c89 100644
>> --- a/spec/build/testsuites/libtests/grp.yml
>> +++ b/spec/build/testsuites/libtests/grp.yml
>> @@ -11,6 +11,7 @@ install: []
>>  ldflags:
>>  - -Wl,--wrap=printf
>>  - -Wl,--wrap=puts
>> +- -Wl,--wrap=bsp_fdt_get
>>  links:
>>  - role: build-dependency
>>uid: optbin2c
>> @@ -312,6 +313,8 @@ links:
>>uid: write
>>  - role: build-dependency
>>uid: writev
>> +- role: build-dependency
>> +  uid: openfirmware01
>>  type: build
>>  use-after:
>>  - rtemstest
>> diff --git a/spec/build/testsuites/libtests/openfirmware01.yml 
>> b/spec/build/testsuites/libtests/openfirmware01.yml
>> new file mode 100644
>> index 00..8feb69eb1e
>> --- /dev/null
>> +++ b/spec/build/testsuites/libtests/openfirmware01.yml
>> @@ -0,0 +1,20 @@
>> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
>> +build-type: test-program
>> +cflags: []
>> +copyrights:
>> +- Copyright (C) 2020 Niteesh G S
>> +cppflags: []
>> +cxxflags: []
>> +enabled-by: true
>> +features: c cprogram
>> +includes: []
>> +ldflags: []
>> +links: []
>> +source:
>> +- testsuites/libtests/openfirmware01/init.c
>> +- testsuites/libtests/openfirmware01/some.c
>> +stlib: []
>> +target: testsuites/libtests/openfirmware01.exe
>> +type: build
>> +use-after: []
>> +use-before: []
>> diff --git a/testsuites/libtests/openfirmware01/init.c 
>> b/testsuites/libtests/openfirmware01/init.c
>> new file mode 100644
>> index 00..fc38e6c513
>> --- /dev/null
>> +++ b/testsuites/libtests/openfirmware01/init.c
>> @@ -0,0 +1,147 @@
>> +/* SPDX-License-Identifier: BSD-2-Clause */
>> +
>> +/*
>> + * Copyright (C) <2020> Niteesh G S 
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above copyright
>> + *notice, this list of conditions and the following disclaimer in the
>> + *documentation and/or other materials provided with the distribution.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
>> IS"
>> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
>> PURPOSE
>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
>> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
>> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
>> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
>> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
>> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
>> THE
>> + * POSSIBILITY OF SUCH DAMAGE.
>> + */
>> +
>> +#ifdef HAVE_CONFIG_H
>> +#include "config.h"
>> +#endif
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include "some.h"
>> +
>> +#define BUF_SIZE 100
>> +
>> +const char rtems_test_name[] = "OpenFirmWare 01";
>> +
>> +const void *__wrap_bsp_fdt_get(void);
>> +const void *__real_bsp_fdt_get(void);
>> +
>> +const void *__wrap_bsp_fdt_get(void)
>> +{
>> +if (some_bin != NULL) {
>> +return &some_bin[0];
>> +}
>> +return __real_bsp_fdt_get();
>> +}
>> +
>> +static void Init(rtems_task_argument arg)
>> +{
>> +int rv;
>> +phandle_t d;
>> +phandle_t l;
>> +phandle_t t;
>> +phandle_t root;
>> +phan

Re: Arm fenv patch V4

2020-07-29 Thread Eshan Dhawan

> On 29-Jul-2020, at 7:42 PM, Sebastian Huber 
>  wrote:
> 
> On 29/07/2020 08:57, Sebastian Huber wrote:
> 
>> Hello Eshan,
>> 
>> thanks, I pushed the patches to Newlib with some minor modifications. I 
>> updated the RSB accordingly.
> 
> This is really a never ending story:
> 
> /build/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: 
> /build/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/lib/thumb/armv7-a+simd/hard/libm.a(lib_a-fesetenv.o):
>  in function `fesetenv':
> /scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-33fb1b3-newlib-3ca4325-x86_64-linux-gnu-1/build/arm-rtems6/thumb/armv7-a+simd/hard/newlib/libm/machine/arm/../../../../../../../../../gnu-mirror-gcc-33fb1b3/newlib/libm/machine/arm/fesetenv.c:38:
>  undefined reference to `vmsr_fpscr'
> 
> I will fix it.
> 
Why isn’t this error showing up on my system 
When I run tests :’/ 


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

Re: [PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-29 Thread Gedare Bloom
On Wed, Jul 29, 2020 at 10:44 AM Christian Mauderer  wrote:
>
> On 29/07/2020 18:07, Gedare Bloom wrote:
> > On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  
> > wrote:
> >>
> >> ---
> >>  spec/build/testsuites/libtests/grp.yml|   3 +
> >>  .../testsuites/libtests/openfirmware01.yml|  20 +++
> >>  testsuites/libtests/openfirmware01/init.c | 147 ++
> >>  .../openfirmware01/openfirmware01.doc |  29 
> >>  .../openfirmware01/openfirmware01.scn |   2 +
> >>  testsuites/libtests/openfirmware01/some.c |  52 +++
> >>  testsuites/libtests/openfirmware01/some.dts   |  54 +++
> >>  testsuites/libtests/openfirmware01/some.h |  15 ++
> >>  8 files changed, 322 insertions(+)
> >>  create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml
> >>  create mode 100644 testsuites/libtests/openfirmware01/init.c
> >>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.doc
> >>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.scn
> >>  create mode 100644 testsuites/libtests/openfirmware01/some.c
> >>  create mode 100644 testsuites/libtests/openfirmware01/some.dts
> >>  create mode 100644 testsuites/libtests/openfirmware01/some.h
> >>
> >> diff --git a/spec/build/testsuites/libtests/grp.yml 
> >> b/spec/build/testsuites/libtests/grp.yml
> >> index f1de6cd75f..56e84d2c89 100644
> >> --- a/spec/build/testsuites/libtests/grp.yml
> >> +++ b/spec/build/testsuites/libtests/grp.yml
> >> @@ -11,6 +11,7 @@ install: []
> >>  ldflags:
> >>  - -Wl,--wrap=printf
> >>  - -Wl,--wrap=puts
> >> +- -Wl,--wrap=bsp_fdt_get
> >>  links:
> >>  - role: build-dependency
> >>uid: optbin2c
> >> @@ -312,6 +313,8 @@ links:
> >>uid: write
> >>  - role: build-dependency
> >>uid: writev
> >> +- role: build-dependency
> >> +  uid: openfirmware01
> >>  type: build
> >>  use-after:
> >>  - rtemstest
> >> diff --git a/spec/build/testsuites/libtests/openfirmware01.yml 
> >> b/spec/build/testsuites/libtests/openfirmware01.yml
> >> new file mode 100644
> >> index 00..8feb69eb1e
> >> --- /dev/null
> >> +++ b/spec/build/testsuites/libtests/openfirmware01.yml
> >> @@ -0,0 +1,20 @@
> >> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> >> +build-type: test-program
> >> +cflags: []
> >> +copyrights:
> >> +- Copyright (C) 2020 Niteesh G S
> >> +cppflags: []
> >> +cxxflags: []
> >> +enabled-by: true
> >> +features: c cprogram
> >> +includes: []
> >> +ldflags: []
> >> +links: []
> >> +source:
> >> +- testsuites/libtests/openfirmware01/init.c
> >> +- testsuites/libtests/openfirmware01/some.c
> >> +stlib: []
> >> +target: testsuites/libtests/openfirmware01.exe
> >> +type: build
> >> +use-after: []
> >> +use-before: []
> >> diff --git a/testsuites/libtests/openfirmware01/init.c 
> >> b/testsuites/libtests/openfirmware01/init.c
> >> new file mode 100644
> >> index 00..fc38e6c513
> >> --- /dev/null
> >> +++ b/testsuites/libtests/openfirmware01/init.c
> >> @@ -0,0 +1,147 @@
> >> +/* SPDX-License-Identifier: BSD-2-Clause */
> >> +
> >> +/*
> >> + * Copyright (C) <2020> Niteesh G S 
> >> + *
> >> + * Redistribution and use in source and binary forms, with or without
> >> + * modification, are permitted provided that the following conditions
> >> + * are met:
> >> + * 1. Redistributions of source code must retain the above copyright
> >> + *notice, this list of conditions and the following disclaimer.
> >> + * 2. Redistributions in binary form must reproduce the above copyright
> >> + *notice, this list of conditions and the following disclaimer in the
> >> + *documentation and/or other materials provided with the distribution.
> >> + *
> >> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
> >> "AS IS"
> >> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
> >> THE
> >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
> >> PURPOSE
> >> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
> >> BE
> >> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> >> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> >> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
> >> BUSINESS
> >> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> >> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> >> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
> >> THE
> >> + * POSSIBILITY OF SUCH DAMAGE.
> >> + */
> >> +
> >> +#ifdef HAVE_CONFIG_H
> >> +#include "config.h"
> >> +#endif
> >> +
> >> +#include 
> >> +#include 
> >> +#include 
> >> +#include 
> >> +#include 
> >> +#include 
> >> +
> >> +#include "some.h"
> >> +
> >> +#define BUF_SIZE 100
> >> +
> >> +const char rtems_test_name[] = "OpenFirmWare 01";
> >> +
> >> +const void *__wrap_bsp_fdt_get(void);
> >> +const void *__real_bsp_fdt_get(void);
> >> +
>

Re: [PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-29 Thread Christian Mauderer
On 29/07/2020 19:55, Gedare Bloom wrote:
> On Wed, Jul 29, 2020 at 10:44 AM Christian Mauderer  
> wrote:
>>
>> On 29/07/2020 18:07, Gedare Bloom wrote:
>>> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  
>>> wrote:

 ---
  spec/build/testsuites/libtests/grp.yml|   3 +
  .../testsuites/libtests/openfirmware01.yml|  20 +++
  testsuites/libtests/openfirmware01/init.c | 147 ++
  .../openfirmware01/openfirmware01.doc |  29 
  .../openfirmware01/openfirmware01.scn |   2 +
  testsuites/libtests/openfirmware01/some.c |  52 +++
  testsuites/libtests/openfirmware01/some.dts   |  54 +++
  testsuites/libtests/openfirmware01/some.h |  15 ++
  8 files changed, 322 insertions(+)
  create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml
  create mode 100644 testsuites/libtests/openfirmware01/init.c
  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.doc
  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.scn
  create mode 100644 testsuites/libtests/openfirmware01/some.c
  create mode 100644 testsuites/libtests/openfirmware01/some.dts
  create mode 100644 testsuites/libtests/openfirmware01/some.h

 diff --git a/spec/build/testsuites/libtests/grp.yml 
 b/spec/build/testsuites/libtests/grp.yml
 index f1de6cd75f..56e84d2c89 100644
 --- a/spec/build/testsuites/libtests/grp.yml
 +++ b/spec/build/testsuites/libtests/grp.yml
 @@ -11,6 +11,7 @@ install: []
  ldflags:
  - -Wl,--wrap=printf
  - -Wl,--wrap=puts
 +- -Wl,--wrap=bsp_fdt_get
  links:
  - role: build-dependency
uid: optbin2c
 @@ -312,6 +313,8 @@ links:
uid: write
  - role: build-dependency
uid: writev
 +- role: build-dependency
 +  uid: openfirmware01
  type: build
  use-after:
  - rtemstest
 diff --git a/spec/build/testsuites/libtests/openfirmware01.yml 
 b/spec/build/testsuites/libtests/openfirmware01.yml
 new file mode 100644
 index 00..8feb69eb1e
 --- /dev/null
 +++ b/spec/build/testsuites/libtests/openfirmware01.yml
 @@ -0,0 +1,20 @@
 +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 +build-type: test-program
 +cflags: []
 +copyrights:
 +- Copyright (C) 2020 Niteesh G S
 +cppflags: []
 +cxxflags: []
 +enabled-by: true
 +features: c cprogram
 +includes: []
 +ldflags: []
 +links: []
 +source:
 +- testsuites/libtests/openfirmware01/init.c
 +- testsuites/libtests/openfirmware01/some.c
 +stlib: []
 +target: testsuites/libtests/openfirmware01.exe
 +type: build
 +use-after: []
 +use-before: []
 diff --git a/testsuites/libtests/openfirmware01/init.c 
 b/testsuites/libtests/openfirmware01/init.c
 new file mode 100644
 index 00..fc38e6c513
 --- /dev/null
 +++ b/testsuites/libtests/openfirmware01/init.c
 @@ -0,0 +1,147 @@
 +/* SPDX-License-Identifier: BSD-2-Clause */
 +
 +/*
 + * Copyright (C) <2020> Niteesh G S 
 + *
 + * Redistribution and use in source and binary forms, with or without
 + * modification, are permitted provided that the following conditions
 + * are met:
 + * 1. Redistributions of source code must retain the above copyright
 + *notice, this list of conditions and the following disclaimer.
 + * 2. Redistributions in binary form must reproduce the above copyright
 + *notice, this list of conditions and the following disclaimer in the
 + *documentation and/or other materials provided with the distribution.
 + *
 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 "AS IS"
 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
 THE
 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
 PURPOSE
 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
 BE
 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
 BUSINESS
 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
 THE
 + * POSSIBILITY OF SUCH DAMAGE.
 + */
 +
 +#ifdef HAVE_CONFIG_H
 +#include "config.h"
 +#endif
 +
 +#include 
 +#include 
 +#include 
 +#include 
 +#include 
 +#include 
 +
 +#include "some.h"
 +
 +#define BUF_SIZE 100
 +
 +const char rtems_test_name[] = "OpenFirmWare 01";
 +
 +const void *__wrap_bsp_fdt_get(void);

Re: [PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-29 Thread Gedare Bloom
On Wed, Jul 29, 2020 at 12:10 PM Christian Mauderer  wrote:
>
> On 29/07/2020 19:55, Gedare Bloom wrote:
> > On Wed, Jul 29, 2020 at 10:44 AM Christian Mauderer  
> > wrote:
> >>
> >> On 29/07/2020 18:07, Gedare Bloom wrote:
> >>> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  
> >>> wrote:
> 
>  ---
>   spec/build/testsuites/libtests/grp.yml|   3 +
>   .../testsuites/libtests/openfirmware01.yml|  20 +++
>   testsuites/libtests/openfirmware01/init.c | 147 ++
>   .../openfirmware01/openfirmware01.doc |  29 
>   .../openfirmware01/openfirmware01.scn |   2 +
>   testsuites/libtests/openfirmware01/some.c |  52 +++
>   testsuites/libtests/openfirmware01/some.dts   |  54 +++
>   testsuites/libtests/openfirmware01/some.h |  15 ++
>   8 files changed, 322 insertions(+)
>   create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml
>   create mode 100644 testsuites/libtests/openfirmware01/init.c
>   create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.doc
>   create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.scn
>   create mode 100644 testsuites/libtests/openfirmware01/some.c
>   create mode 100644 testsuites/libtests/openfirmware01/some.dts
>   create mode 100644 testsuites/libtests/openfirmware01/some.h
> 
>  diff --git a/spec/build/testsuites/libtests/grp.yml 
>  b/spec/build/testsuites/libtests/grp.yml
>  index f1de6cd75f..56e84d2c89 100644
>  --- a/spec/build/testsuites/libtests/grp.yml
>  +++ b/spec/build/testsuites/libtests/grp.yml
>  @@ -11,6 +11,7 @@ install: []
>   ldflags:
>   - -Wl,--wrap=printf
>   - -Wl,--wrap=puts
>  +- -Wl,--wrap=bsp_fdt_get
>   links:
>   - role: build-dependency
> uid: optbin2c
>  @@ -312,6 +313,8 @@ links:
> uid: write
>   - role: build-dependency
> uid: writev
>  +- role: build-dependency
>  +  uid: openfirmware01
>   type: build
>   use-after:
>   - rtemstest
>  diff --git a/spec/build/testsuites/libtests/openfirmware01.yml 
>  b/spec/build/testsuites/libtests/openfirmware01.yml
>  new file mode 100644
>  index 00..8feb69eb1e
>  --- /dev/null
>  +++ b/spec/build/testsuites/libtests/openfirmware01.yml
>  @@ -0,0 +1,20 @@
>  +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
>  +build-type: test-program
>  +cflags: []
>  +copyrights:
>  +- Copyright (C) 2020 Niteesh G S
>  +cppflags: []
>  +cxxflags: []
>  +enabled-by: true
>  +features: c cprogram
>  +includes: []
>  +ldflags: []
>  +links: []
>  +source:
>  +- testsuites/libtests/openfirmware01/init.c
>  +- testsuites/libtests/openfirmware01/some.c
>  +stlib: []
>  +target: testsuites/libtests/openfirmware01.exe
>  +type: build
>  +use-after: []
>  +use-before: []
>  diff --git a/testsuites/libtests/openfirmware01/init.c 
>  b/testsuites/libtests/openfirmware01/init.c
>  new file mode 100644
>  index 00..fc38e6c513
>  --- /dev/null
>  +++ b/testsuites/libtests/openfirmware01/init.c
>  @@ -0,0 +1,147 @@
>  +/* SPDX-License-Identifier: BSD-2-Clause */
>  +
>  +/*
>  + * Copyright (C) <2020> Niteesh G S 
>  + *
>  + * Redistribution and use in source and binary forms, with or without
>  + * modification, are permitted provided that the following conditions
>  + * are met:
>  + * 1. Redistributions of source code must retain the above copyright
>  + *notice, this list of conditions and the following disclaimer.
>  + * 2. Redistributions in binary form must reproduce the above copyright
>  + *notice, this list of conditions and the following disclaimer in 
>  the
>  + *documentation and/or other materials provided with the 
>  distribution.
>  + *
>  + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
>  "AS IS"
>  + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
>  TO, THE
>  + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
>  PURPOSE
>  + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
>  CONTRIBUTORS BE
>  + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>  + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
>  + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
>  BUSINESS
>  + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
>  IN
>  + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
>  OTHERWISE)
>  + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
>  OF THE
>  + * POSSIBILITY OF SUCH DAMAGE.
>  + */
>  +
>  +#ifdef HAVE_CONFIG_H

Re: [PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-29 Thread Christian Mauderer



On 29/07/2020 20:21, Gedare Bloom wrote:
> On Wed, Jul 29, 2020 at 12:10 PM Christian Mauderer  
> wrote:
>>
>> On 29/07/2020 19:55, Gedare Bloom wrote:
>>> On Wed, Jul 29, 2020 at 10:44 AM Christian Mauderer  
>>> wrote:

 On 29/07/2020 18:07, Gedare Bloom wrote:
> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  
> wrote:
>>
>> ---
>>  spec/build/testsuites/libtests/grp.yml|   3 +
>>  .../testsuites/libtests/openfirmware01.yml|  20 +++
>>  testsuites/libtests/openfirmware01/init.c | 147 ++
>>  .../openfirmware01/openfirmware01.doc |  29 
>>  .../openfirmware01/openfirmware01.scn |   2 +
>>  testsuites/libtests/openfirmware01/some.c |  52 +++
>>  testsuites/libtests/openfirmware01/some.dts   |  54 +++
>>  testsuites/libtests/openfirmware01/some.h |  15 ++
>>  8 files changed, 322 insertions(+)
>>  create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml
>>  create mode 100644 testsuites/libtests/openfirmware01/init.c
>>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.doc
>>  create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.scn
>>  create mode 100644 testsuites/libtests/openfirmware01/some.c
>>  create mode 100644 testsuites/libtests/openfirmware01/some.dts
>>  create mode 100644 testsuites/libtests/openfirmware01/some.h
>>
>> diff --git a/spec/build/testsuites/libtests/grp.yml 
>> b/spec/build/testsuites/libtests/grp.yml
>> index f1de6cd75f..56e84d2c89 100644
>> --- a/spec/build/testsuites/libtests/grp.yml
>> +++ b/spec/build/testsuites/libtests/grp.yml
>> @@ -11,6 +11,7 @@ install: []
>>  ldflags:
>>  - -Wl,--wrap=printf
>>  - -Wl,--wrap=puts
>> +- -Wl,--wrap=bsp_fdt_get
>>  links:
>>  - role: build-dependency
>>uid: optbin2c
>> @@ -312,6 +313,8 @@ links:
>>uid: write
>>  - role: build-dependency
>>uid: writev
>> +- role: build-dependency
>> +  uid: openfirmware01
>>  type: build
>>  use-after:
>>  - rtemstest
>> diff --git a/spec/build/testsuites/libtests/openfirmware01.yml 
>> b/spec/build/testsuites/libtests/openfirmware01.yml
>> new file mode 100644
>> index 00..8feb69eb1e
>> --- /dev/null
>> +++ b/spec/build/testsuites/libtests/openfirmware01.yml
>> @@ -0,0 +1,20 @@
>> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
>> +build-type: test-program
>> +cflags: []
>> +copyrights:
>> +- Copyright (C) 2020 Niteesh G S
>> +cppflags: []
>> +cxxflags: []
>> +enabled-by: true
>> +features: c cprogram
>> +includes: []
>> +ldflags: []
>> +links: []
>> +source:
>> +- testsuites/libtests/openfirmware01/init.c
>> +- testsuites/libtests/openfirmware01/some.c
>> +stlib: []
>> +target: testsuites/libtests/openfirmware01.exe
>> +type: build
>> +use-after: []
>> +use-before: []
>> diff --git a/testsuites/libtests/openfirmware01/init.c 
>> b/testsuites/libtests/openfirmware01/init.c
>> new file mode 100644
>> index 00..fc38e6c513
>> --- /dev/null
>> +++ b/testsuites/libtests/openfirmware01/init.c
>> @@ -0,0 +1,147 @@
>> +/* SPDX-License-Identifier: BSD-2-Clause */
>> +
>> +/*
>> + * Copyright (C) <2020> Niteesh G S 
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above copyright
>> + *notice, this list of conditions and the following disclaimer in 
>> the
>> + *documentation and/or other materials provided with the 
>> distribution.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
>> "AS IS"
>> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
>> TO, THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
>> PURPOSE
>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
>> CONTRIBUTORS BE
>> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
>> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
>> BUSINESS
>> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
>> IN
>> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
>> OTHERWISE)
>> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
>> OF THE
>> + * POSSIBILITY OF SUCH DAMAGE

Re: [PATCH RTEMS 3/7] libfreebsd: Added ofw_if.h

2020-07-29 Thread Niteesh G. S.
On Wed, Jul 29, 2020 at 9:29 PM Gedare Bloom  wrote:

> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu 
> wrote:
> >
> > This file is the RTEMS implementation of ofw_if.h in FreeBSD. The
> > ofw_if.h in FreeBSD is an autogenerated header file that maps the
> > OF_function calls to their respective implementation. But in RTEMS
> > this file maps the OF_functions directly to their FDT implementation.
> > ---
> >  cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h | 62 ++
> >  1 file changed, 62 insertions(+)
> >  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
>
> You may have mentioned this elsewhere, but if this header file needs
> to be installed it should go under the include/ tree.
>

This header is not intended to be installed.


> >
> > diff --git a/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
> b/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
> > new file mode 100644
> > index 00..f66c02884e
> > --- /dev/null
> > +++ b/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
> > @@ -0,0 +1,62 @@
> > +/* SPDX-License-Identifier: BSD-2-Clause
> > +
> > + *
> > + * @file
> > + *
> > + * @ingroup LIBFREEBSD
> These usually aren't all caps. They're not consistent, but LibFreeBSD
> makes more sense to me.
>
OK. I'll change this to LibFreeBSD everywhere.


> > + *
> > + * @brief Declaration of OFW functions.
> > + */
> > +
> > +/*
> > + * Copyright (C) <2020> Niteesh Babu 
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + * 1. Redistributions of source code must retain the above copyright
> > + *notice, this list of conditions and the following disclaimer.
> > + * 2. Redistributions in binary form must reproduce the above copyright
> > + *notice, this list of conditions and the following disclaimer in
> the
> > + *documentation and/or other materials provided with the
> distribution.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> "AS IS"
> > + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
> TO, THE
> > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> > + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
> CONTRIBUTORS BE
> > + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> BUSINESS
> > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
> IN
> > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
> OTHERWISE)
> > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
> OF THE
> > + * POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +
> > +#ifndef _LIBFREEBSD_OFW_IF_H
> > +#define _LIBFREEBSD_OFW_IF_H
> > +
> > +#include 
>
> This means that header is installed. Please put the headers under the
> include/dev tree instead.
>

Why does this mean the header is installed?
In FreeBSD, these two files are present in the same directory. The
openfirm.h
is what provides the OFW API and ofw_if.h is responsible for calling the
correct
implementation of OFW using KOBJs in case of RTEMS this is hard-wired to the
FDT implementation in libBSD as well as RTEMS.
Previously, openfirm.h and ofw_if.h were in the same directory but since I
had
to install openfirm.h I moved it cpukit/include.
And if this helps, the include is present only to provide a definition for
phandle_t.

> +
> > +typedef void*  ofw_t;
> > +
> > +int OFW_INIT(ofw_t ofw_obj, void *cookie);
> > +phandle_t OFW_PEER(ofw_t ofw_obj, phandle_t node);
> > +phandle_t OFW_CHILD(ofw_t ofw_obj, phandle_t node);
> > +phandle_t OFW_PARENT(ofw_t ofw_obj, phandle_t node);
> > +phandle_t OFW_INSTANCE_TO_PACKAGE(ofw_t ofw_obj, ihandle_t instance);
> > +ssize_t OFW_GETPROPLEN(ofw_t ofw_obj, phandle_t package, const char
> *propname);
> > +ssize_t OFW_GETPROP(ofw_t ofw_obj, phandle_t package, const char
> *propname,
> > +   void *buf, size_t buflen);
> > +int OFW_NEXTPROP(ofw_t ofw_obj, phandle_t package, const char *prev,
> char *buf,
> > +   size_t size);
> > +int OFW_SETPROP(ofw_t ofw_obj, phandle_t package, const char *propname,
> > +   const void *buf, size_t len);
> > +ssize_t OFW_CANON(ofw_t ofw_obj, const char *device, char *buf, size_t
> len);
> > +phandle_t OFW_FINDDEVICE(ofw_t ofw_obj, const char *device);
> > +ssize_t OFW_INSTANCE_TO_PATH(ofw_t ofw_obj, ihandle_t instance, char
> *buf,
> > +   size_t len);
> > +ssize_t OFW_PACKAGE_TO_PATH(ofw_t ofw_obj, phandle_t package, char *buf,
> > +   size_t len);
> > +
>
> Doxygen?
>

I don't think this is the right place for Doxygen since as mentioned above
this
is not exposed. A better place would be openfirm.h.

>
> > +#endif /* _LIBFREEBSD_OFW_IF_H */
> > --
> > 2.17.1
> >
>
___

Re: [PATCH RTEMS 2/7] libfreebsd: Import OFW files from FreeBSD.

2020-07-29 Thread Niteesh G. S.
On Wed, Jul 29, 2020 at 9:24 PM Gedare Bloom  wrote:

> I'm a little concerned about namespace pollution.
>

Can you please explain about namespace pollution?



> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu 
> wrote:
> >
> > freebsd head: b8c57b4
> >
> > The following files have been imported from FreeBSD to implement
> > OF_* functions into RTEMS.
> > 1) openfirm.h
> > 2) openfirm.c
> > 3) ofw_fdt.c
> > ---
> >  cpukit/include/dev/ofw/openfirm.h| 187 
> >  cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c  | 479 +++
> >  cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c | 848 +++
> >  3 files changed, 1514 insertions(+)
> >  create mode 100644 cpukit/include/dev/ofw/openfirm.h
> >  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c
> >  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c
> >
> > diff --git a/cpukit/include/dev/ofw/openfirm.h
> b/cpukit/include/dev/ofw/openfirm.h
> > new file mode 100644
> > index 00..74a7075367
> > --- /dev/null
> > +++ b/cpukit/include/dev/ofw/openfirm.h
> > @@ -0,0 +1,187 @@
> > +/* $NetBSD: openfirm.h,v 1.1 1998/05/15 10:16:00 tsubai Exp $
> */
> > +
> > +/*-
> > + * SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD)
> > + *
> > + * Copyright (C) 1995, 1996 Wolfgang Solfrank.
> > + * Copyright (C) 1995, 1996 TooLs GmbH.
> > + * All rights reserved.
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + * 1. Redistributions of source code must retain the above copyright
> > + *notice, this list of conditions and the following disclaimer.
> > + * 2. Redistributions in binary form must reproduce the above copyright
> > + *notice, this list of conditions and the following disclaimer in
> the
> > + *documentation and/or other materials provided with the
> distribution.
> > + * 3. All advertising materials mentioning features or use of this
> software
> > + *must display the following acknowledgement:
> > + * This product includes software developed by TooLs GmbH.
> > + * 4. The name of TooLs GmbH may not be used to endorse or promote
> products
> > + *derived from this software without specific prior written
> permission.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
> > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
> WARRANTIES
> > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> DISCLAIMED.
> > + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT,
> INCIDENTAL,
> > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> LIMITED TO,
> > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> PROFITS;
> > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> LIABILITY,
> > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
> OR
> > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
> IF
> > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +/*
> > + * Copyright (C) 2000 Benno Rice.
> > + * All rights reserved.
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + * 1. Redistributions of source code must retain the above copyright
> > + *notice, this list of conditions and the following disclaimer.
> > + * 2. Redistributions in binary form must reproduce the above copyright
> > + *notice, this list of conditions and the following disclaimer in
> the
> > + *documentation and/or other materials provided with the
> distribution.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR
> > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
> WARRANTIES
> > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> DISCLAIMED.
> > + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT,
> INCIDENTAL,
> > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> LIMITED TO,
> > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
> PROFITS;
> > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> LIABILITY,
> > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
> OR
> > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
> IF
> > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > + *
> > + * $FreeBSD$
> > + */
> > +
> > +#ifndef _DEV_OPENFIRM_H_
> > +#define _DEV_OPENFIRM_H_
> > +
> > +#include 
> > +#include 
> > +
> > +/*
> > + * Prototypes for Open Firmware Interface Routines
> > + */
> > +
> > +typedef uint32_t   ihandle_t;
> > +typedef uint32_t   phandle_t;
> > +typedef uint32_t   pcell_t;
> > +
> > +#ifdef _KERNEL
> > +#include 
> > +
> > +#include 
> > +
> > 

Re: [PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-29 Thread Gedare Bloom
On Wed, Jul 29, 2020 at 12:33 PM Christian Mauderer  wrote:
>
>
>
> On 29/07/2020 20:21, Gedare Bloom wrote:
> > On Wed, Jul 29, 2020 at 12:10 PM Christian Mauderer  
> > wrote:
> >>
> >> On 29/07/2020 19:55, Gedare Bloom wrote:
> >>> On Wed, Jul 29, 2020 at 10:44 AM Christian Mauderer  
> >>> wrote:
> 
>  On 29/07/2020 18:07, Gedare Bloom wrote:
> > On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu 
> >  wrote:
> >>
> >> ---
> >>  spec/build/testsuites/libtests/grp.yml|   3 +
> >>  .../testsuites/libtests/openfirmware01.yml|  20 +++
> >>  testsuites/libtests/openfirmware01/init.c | 147 ++
> >>  .../openfirmware01/openfirmware01.doc |  29 
> >>  .../openfirmware01/openfirmware01.scn |   2 +
> >>  testsuites/libtests/openfirmware01/some.c |  52 +++
> >>  testsuites/libtests/openfirmware01/some.dts   |  54 +++
> >>  testsuites/libtests/openfirmware01/some.h |  15 ++
> >>  8 files changed, 322 insertions(+)
> >>  create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml
> >>  create mode 100644 testsuites/libtests/openfirmware01/init.c
> >>  create mode 100644 
> >> testsuites/libtests/openfirmware01/openfirmware01.doc
> >>  create mode 100644 
> >> testsuites/libtests/openfirmware01/openfirmware01.scn
> >>  create mode 100644 testsuites/libtests/openfirmware01/some.c
> >>  create mode 100644 testsuites/libtests/openfirmware01/some.dts
> >>  create mode 100644 testsuites/libtests/openfirmware01/some.h
> >>
> >> diff --git a/spec/build/testsuites/libtests/grp.yml 
> >> b/spec/build/testsuites/libtests/grp.yml
> >> index f1de6cd75f..56e84d2c89 100644
> >> --- a/spec/build/testsuites/libtests/grp.yml
> >> +++ b/spec/build/testsuites/libtests/grp.yml
> >> @@ -11,6 +11,7 @@ install: []
> >>  ldflags:
> >>  - -Wl,--wrap=printf
> >>  - -Wl,--wrap=puts
> >> +- -Wl,--wrap=bsp_fdt_get
> >>  links:
> >>  - role: build-dependency
> >>uid: optbin2c
> >> @@ -312,6 +313,8 @@ links:
> >>uid: write
> >>  - role: build-dependency
> >>uid: writev
> >> +- role: build-dependency
> >> +  uid: openfirmware01
> >>  type: build
> >>  use-after:
> >>  - rtemstest
> >> diff --git a/spec/build/testsuites/libtests/openfirmware01.yml 
> >> b/spec/build/testsuites/libtests/openfirmware01.yml
> >> new file mode 100644
> >> index 00..8feb69eb1e
> >> --- /dev/null
> >> +++ b/spec/build/testsuites/libtests/openfirmware01.yml
> >> @@ -0,0 +1,20 @@
> >> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> >> +build-type: test-program
> >> +cflags: []
> >> +copyrights:
> >> +- Copyright (C) 2020 Niteesh G S
> >> +cppflags: []
> >> +cxxflags: []
> >> +enabled-by: true
> >> +features: c cprogram
> >> +includes: []
> >> +ldflags: []
> >> +links: []
> >> +source:
> >> +- testsuites/libtests/openfirmware01/init.c
> >> +- testsuites/libtests/openfirmware01/some.c
> >> +stlib: []
> >> +target: testsuites/libtests/openfirmware01.exe
> >> +type: build
> >> +use-after: []
> >> +use-before: []
> >> diff --git a/testsuites/libtests/openfirmware01/init.c 
> >> b/testsuites/libtests/openfirmware01/init.c
> >> new file mode 100644
> >> index 00..fc38e6c513
> >> --- /dev/null
> >> +++ b/testsuites/libtests/openfirmware01/init.c
> >> @@ -0,0 +1,147 @@
> >> +/* SPDX-License-Identifier: BSD-2-Clause */
> >> +
> >> +/*
> >> + * Copyright (C) <2020> Niteesh G S 
> >> + *
> >> + * Redistribution and use in source and binary forms, with or without
> >> + * modification, are permitted provided that the following conditions
> >> + * are met:
> >> + * 1. Redistributions of source code must retain the above copyright
> >> + *notice, this list of conditions and the following disclaimer.
> >> + * 2. Redistributions in binary form must reproduce the above 
> >> copyright
> >> + *notice, this list of conditions and the following disclaimer in 
> >> the
> >> + *documentation and/or other materials provided with the 
> >> distribution.
> >> + *
> >> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
> >> CONTRIBUTORS "AS IS"
> >> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
> >> TO, THE
> >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
> >> PURPOSE
> >> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
> >> CONTRIBUTORS BE
> >> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> >> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
> >> OF
> >> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 

Re: [PATCH RTEMS 3/7] libfreebsd: Added ofw_if.h

2020-07-29 Thread Gedare Bloom
On Wed, Jul 29, 2020 at 12:45 PM Niteesh G. S.  wrote:
>
> On Wed, Jul 29, 2020 at 9:29 PM Gedare Bloom  wrote:
>>
>> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  
>> wrote:
>> >
>> > This file is the RTEMS implementation of ofw_if.h in FreeBSD. The
>> > ofw_if.h in FreeBSD is an autogenerated header file that maps the
>> > OF_function calls to their respective implementation. But in RTEMS
>> > this file maps the OF_functions directly to their FDT implementation.
>> > ---
>> >  cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h | 62 ++
>> >  1 file changed, 62 insertions(+)
>> >  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
>>
>> You may have mentioned this elsewhere, but if this header file needs
>> to be installed it should go under the include/ tree.
>
>
> This header is not intended to be installed.
>
>>
>> >
>> > diff --git a/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h 
>> > b/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
>> > new file mode 100644
>> > index 00..f66c02884e
>> > --- /dev/null
>> > +++ b/cpukit/libfreebsd/freebsd/dev/ofw/ofw_if.h
>> > @@ -0,0 +1,62 @@
>> > +/* SPDX-License-Identifier: BSD-2-Clause
>> > +
>> > + *
>> > + * @file
>> > + *
>> > + * @ingroup LIBFREEBSD
>> These usually aren't all caps. They're not consistent, but LibFreeBSD
>> makes more sense to me.
>
> OK. I'll change this to LibFreeBSD everywhere.
>
>>
>> > + *
>> > + * @brief Declaration of OFW functions.
>> > + */
>> > +
>> > +/*
>> > + * Copyright (C) <2020> Niteesh Babu 
>> > + *
>> > + * Redistribution and use in source and binary forms, with or without
>> > + * modification, are permitted provided that the following conditions
>> > + * are met:
>> > + * 1. Redistributions of source code must retain the above copyright
>> > + *notice, this list of conditions and the following disclaimer.
>> > + * 2. Redistributions in binary form must reproduce the above copyright
>> > + *notice, this list of conditions and the following disclaimer in the
>> > + *documentation and/or other materials provided with the distribution.
>> > + *
>> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
>> > "AS IS"
>> > + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
>> > THE
>> > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
>> > PURPOSE
>> > + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
>> > BE
>> > + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
>> > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
>> > BUSINESS
>> > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
>> > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
>> > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
>> > THE
>> > + * POSSIBILITY OF SUCH DAMAGE.
>> > + */
>> > +
>> > +#ifndef _LIBFREEBSD_OFW_IF_H
>> > +#define _LIBFREEBSD_OFW_IF_H
>> > +
>> > +#include 
>>
>> This means that header is installed. Please put the headers under the
>> include/dev tree instead.
>
>
> Why does this mean the header is installed?

I meant that openfirm.h is installed. I saw later that you put it in
the include/ directory. However the final outcome remains pending our
discussion about cpukit vs bsps/ and whether there needs to be any
public-facing headers.

> In FreeBSD, these two files are present in the same directory. The openfirm.h
> is what provides the OFW API and ofw_if.h is responsible for calling the 
> correct
> implementation of OFW using KOBJs in case of RTEMS this is hard-wired to the
> FDT implementation in libBSD as well as RTEMS.
> Previously, openfirm.h and ofw_if.h were in the same directory but since I had
> to install openfirm.h I moved it cpukit/include.
> And if this helps, the include is present only to provide a definition for 
> phandle_t.
>
>> > +
>> > +typedef void*  ofw_t;
>> > +
>> > +int OFW_INIT(ofw_t ofw_obj, void *cookie);
>> > +phandle_t OFW_PEER(ofw_t ofw_obj, phandle_t node);
>> > +phandle_t OFW_CHILD(ofw_t ofw_obj, phandle_t node);
>> > +phandle_t OFW_PARENT(ofw_t ofw_obj, phandle_t node);
>> > +phandle_t OFW_INSTANCE_TO_PACKAGE(ofw_t ofw_obj, ihandle_t instance);
>> > +ssize_t OFW_GETPROPLEN(ofw_t ofw_obj, phandle_t package, const char 
>> > *propname);
>> > +ssize_t OFW_GETPROP(ofw_t ofw_obj, phandle_t package, const char 
>> > *propname,
>> > +   void *buf, size_t buflen);
>> > +int OFW_NEXTPROP(ofw_t ofw_obj, phandle_t package, const char *prev, char 
>> > *buf,
>> > +   size_t size);
>> > +int OFW_SETPROP(ofw_t ofw_obj, phandle_t package, const char *propname,
>> > +   const void *buf, size_t len);
>> > +ssize_t OFW_CANON(ofw_t ofw_obj, const char *device, char *buf, size_t 
>> > len);
>> > +phandle_t OFW_FINDDEVICE(ofw_t ofw_obj, const char *device);
>> > +ssize_t OFW_INSTANC

Re: [PATCH RTEMS 2/7] libfreebsd: Import OFW files from FreeBSD.

2020-07-29 Thread Gedare Bloom
On Wed, Jul 29, 2020 at 12:56 PM Niteesh G. S.  wrote:
>
>
> On Wed, Jul 29, 2020 at 9:24 PM Gedare Bloom  wrote:
>>
>> I'm a little concerned about namespace pollution.
>
>
> Can you please explain about namespace pollution?
>

I alluded to this elsewhere. The global symbols (global vars,
functions) and anything defined in a header (structs, typedefs) that
gets included by applications (end users) will be in the same
namespace as the application code. This means that the user may get a
surprise because of a name collision.

>
>>
>> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu  
>> wrote:
>> >
>> > freebsd head: b8c57b4
>> >
>> > The following files have been imported from FreeBSD to implement
>> > OF_* functions into RTEMS.
>> > 1) openfirm.h
>> > 2) openfirm.c
>> > 3) ofw_fdt.c
>> > ---
>> >  cpukit/include/dev/ofw/openfirm.h| 187 
>> >  cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c  | 479 +++
>> >  cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c | 848 +++
>> >  3 files changed, 1514 insertions(+)
>> >  create mode 100644 cpukit/include/dev/ofw/openfirm.h
>> >  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c
>> >  create mode 100644 cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c
>> >
>> > diff --git a/cpukit/include/dev/ofw/openfirm.h 
>> > b/cpukit/include/dev/ofw/openfirm.h
>> > new file mode 100644
>> > index 00..74a7075367
>> > --- /dev/null
>> > +++ b/cpukit/include/dev/ofw/openfirm.h
>> > @@ -0,0 +1,187 @@
>> > +/* $NetBSD: openfirm.h,v 1.1 1998/05/15 10:16:00 tsubai Exp $  */
>> > +
>> > +/*-
>> > + * SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD)
>> > + *
>> > + * Copyright (C) 1995, 1996 Wolfgang Solfrank.
>> > + * Copyright (C) 1995, 1996 TooLs GmbH.
>> > + * All rights reserved.
>> > + *
>> > + * Redistribution and use in source and binary forms, with or without
>> > + * modification, are permitted provided that the following conditions
>> > + * are met:
>> > + * 1. Redistributions of source code must retain the above copyright
>> > + *notice, this list of conditions and the following disclaimer.
>> > + * 2. Redistributions in binary form must reproduce the above copyright
>> > + *notice, this list of conditions and the following disclaimer in the
>> > + *documentation and/or other materials provided with the distribution.
>> > + * 3. All advertising materials mentioning features or use of this 
>> > software
>> > + *must display the following acknowledgement:
>> > + * This product includes software developed by TooLs GmbH.
This is not good. See if they released this clause, otherwise we can't
use this code. Sorry I didn't notice the license issue before.

>> > + * 4. The name of TooLs GmbH may not be used to endorse or promote 
>> > products
>> > + *derived from this software without specific prior written 
>> > permission.
I always liked the contradictory nature of #3 and #4.

>> > + *
>> > + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
>> > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
>> > WARRANTIES
>> > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
>> > + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, 
>> > INCIDENTAL,
>> > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
>> > LIMITED TO,
>> > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
>> > PROFITS;
>> > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
>> > LIABILITY,
>> > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
>> > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
>> > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> > + */
>> > +/*
>> > + * Copyright (C) 2000 Benno Rice.
>> > + * All rights reserved.
>> > + *
>> > + * Redistribution and use in source and binary forms, with or without
>> > + * modification, are permitted provided that the following conditions
>> > + * are met:
>> > + * 1. Redistributions of source code must retain the above copyright
>> > + *notice, this list of conditions and the following disclaimer.
>> > + * 2. Redistributions in binary form must reproduce the above copyright
>> > + *notice, this list of conditions and the following disclaimer in the
>> > + *documentation and/or other materials provided with the distribution.
>> > + *
>> > + * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR
>> > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
>> > WARRANTIES
>> > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
>> > + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, 
>> > INCIDENTAL,
>> > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
>> > LIMITED TO,
>> > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
>> > PROFITS;
>> > + * OR BUSINESS INT

Re: [GSoC 2020]: Doubts in building RSB Recipe for EPICS for multiple architectures

2020-07-29 Thread Mritunjay Sharma
On Wed, Jul 29, 2020 at 10:02 AM Chris Johns  wrote:

> On 29/7/20 4:43 am, Mritunjay Sharma wrote:
> > First of all apologies for a little late response,
> > please find the link to the blogs which tell how to Build EPICS7 with
> > RTEMS5 for pc-386 by hand here:
> >
> > Part 1
> > :
> https://medium.com/@mritunjaysharma394/installing-rtems-ecosystem-and-building-your-first-bsp-993d1cf38902
> >
> > Part
> > 2:
> https://medium.com/@mritunjaysharma394/building-epics7-with-rtems5-by-hand-12d9fbd2eb82
> >
> > Please do have a read and give me your feedback for improvements
> >
>
> It looks good.
>
> I think adding the commands you use after the text "Unzip the downloaded
> Zip
> file inside this directory." helps. If the blob captures the exact
> commands it
> makes it easier for me to follow. The EPICS link is hard to find.
>

Thank you so much for the feedback. I will fix that.

>
> > On Mon, Jul 27, 2020 at 7:20 AM Chris Johns  > > wrote:
> >
> > On 27/7/20 10:34 am, Mritunjay Sharma wrote:
> > >
> > > Please find the patch for PC for EPICS here
> > >
> >
> https://github.com/mritunjaysharma394/epics-mritunjay/blob/master/patches/0001-Added-Support-for-RTEMS-pc386.patch
> >
> > Thanks.
> >
> > > As an experiment, in the 4 patches I have sent to devel for RSB
> recipe a few
> > > days pack, I worked on a local file. I will modify it to published
> source soon
> > > in the next version of patch.
> >
> > Are the EPICS configure files just Makefiles?
> >
> >
> > I think so and more clarity can be given by Heinz on it.
>
> Lets assume they are for now.
>

Okay.

>
> > Can the variables altered in your patch be controlled from the
> command line?
> >
> > What does the `T_A` variables in EPICS mean? I see this is used here
> ...
> >
> > I searched about it in the EPICS documentation and found that T_A
> variable refers
> > to 'T_A) is the current build’s target architecture'.
>
> Target Architecture seems likely. I would assume we need to look into what
> these
> are more.


Yes.


>
>
> I tried to alter it using the command line but I think it didn't work or
> maybe I
> > was doing in the wrong way? Heinz, can you comment on this?
>
> Please post the commands and the output. I find it hard to follow what is
> happening here.
>
> >
> https://github.com/mritunjaysharma394/epics-mritunjay/blob/master/configure/CONFIG#L64
> >
> > If you look down from this there are some special includes ...
> >
> >
> https://github.com/mritunjaysharma394/epics-mritunjay/blob/master/configure/CONFIG#L113
> >
> > What are these files for?
> >
> >
> > I found this information about them in the documentation:
> >
> > 'User specific override definitions are allowed in user created files in
> the user’s
> > /configure subdirectory. These override definitions will be used
> for builds
> > in all  directory structures. The files must have the following
> names.
> >
> > /configure/CONFIG_USER
> > /configure/CONFIG_USER.
> > /configure/CONFIG_USER.Common.
> > /configure/CONFIG_USER..'
>
> That is promising but using $HOME makes it hard.
>
> > The link to the documentation is:
> > https://epics.anl.gov/base/R3-15/6-docs/AppDevGuide/BuildFacility.html
>
>
> Thank you for the link. I will take a look.
>
> Chris
>

You are welcome, Chris! Meanwhile, I worked out on testing part a little
bit and will be starting another thread for it.
I am looking forward to your suggestions for the roadmap ahead.

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

[GSoC 2020]: Doubts related to testing for EPICS7+RTEMS5 (pc386) built using recipe.

2020-07-29 Thread Mritunjay Sharma
Hello all!

I tried to work on the testing part and here's what I did as per my
understanding:

I went inside the epics built by RSB recipe and ran "make runtests".
It gave results somewhat like this:

"Base.t  ok
Breaktable.t .. ok
DBD.t . ok
Device.t .. ok
Driver.t .. ok
Function.t  ok
Menu.t  ok
Recfield.t  ok
Recordtype.t .. ok
Registrar.t ... ok
Variable.t  ok
All tests successful.
Files=11, Tests=293,  1 wallclock secs ( 0.05 usr  0.00 sys +  0.40 cusr
 0.06 csys =  0.51 CPU)
Result: PASS"

I also downloaded rtems-testing directory and tried to run simulator
using the tutorial here:
https://devel.rtems.org/wiki/Developer/Simulators/QEMU

However, I was encountered with this error when I entered:
```./sim-scripts/pc386 -i
~/development/rtems/kernels-5/pc-386/i386-rtems5/c/pc386/testsuites/samples/hello.exe```

Error: ```qemu-system-i386: Initialization of device ide-hd failed: Block
node is read-only```.

It is very much possible that I am following a wrong approach for testing.
I really look forward to you all to help me out with it and
also share some resources which can help me guide on what exactly I have
to proceed with ahead.

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

Re: [GSoC 2020]: Doubts related to testing for EPICS7+RTEMS5 (pc386) built using recipe.

2020-07-29 Thread Chris Johns
On 30/7/20 9:11 am, Mritunjay Sharma wrote:
> Hello all!
> 
> I tried to work on the testing part and here's what I did as per my 
> understanding:
> 
> I went inside the epics built by RSB recipe and ran "make runtests". 
> It gave results somewhat like this: 
> 
> "Base.t  ok      
> Breaktable.t .. ok  
> DBD.t . ok    
> Device.t .. ok    
> Driver.t .. ok  
> Function.t  ok  
> Menu.t  ok    
> Recfield.t  ok    
> Recordtype.t .. ok    
> Registrar.t ... ok  
> Variable.t  ok  
> All tests successful.
> Files=11, Tests=293,  1 wallclock secs ( 0.05 usr  0.00 sys +  0.40 cusr  0.06
> csys =  0.51 CPU)
> Result: PASS"

What is EPICS running to test the executables? Do they expect a suitable QEMU in
the $PATH? In other words what are the dependencies EPICS required to run these
tests?

> I also downloaded rtems-testing directory

Could you please explain what this means? For me this could mean many things and
I suspect they are not the same as you. Please be provide the needed detail for
me or anyone to understand this statement, that is the URL, git command or
whatever that makes sense. For example there is the personal repo of Joel's,
something EPICS has, the rtems-test command, or you may have found a tar file
somewhere.

Please provide the command line you entered and if there is an error the
relevant pieces of the output.

> and tried to run simulator
> using the tutorial here: 
> https://devel.rtems.org/wiki/Developer/Simulators/QEMU

This page was updated over 2 years ago and as is the problem with wiki, the
pages can age. I have added a suitable warning to that page. My advice is to
consult the User Manual before the wiki.

> However, I was encountered with this error when I entered: 
> ```./sim-scripts/pc386 -i
> ~/development/rtems/kernels-5/pc-386/i386-rtems5/c/pc386/testsuites/samples/hello.exe```
> 
> Error: ```qemu-system-i386: Initialization of device ide-hd failed: Block node
> is read-only```. 

The User manual has a section titled "Testing". I suggest you refer to that.

> It is very much possible that I am following a wrong approach for testing. 
> I really look forward to you all to help me out with it and
> also share some resources which can help me guide on what exactly I have 
> to proceed with ahead. 

I hope this help. Please let me know how you go.

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

Re: [GSoC 2020]: Doubts related to testing for EPICS7+RTEMS5 (pc386) built using recipe.

2020-07-29 Thread Heinz Junkes
I will be back online next weekend. Just a short note:
Mritunjay, please have a look on github epics-base in the directory ci-scripts 
Here you should find automated tests etc. used by the epics development team.

Heinz

> On 30.07.2020, at 01:33, Chris Johns  wrote:
> 
>> On 30/7/20 9:11 am, Mritunjay Sharma wrote:
>> Hello all!
>> 
>> I tried to work on the testing part and here's what I did as per my 
>> understanding:
>> 
>> I went inside the epics built by RSB recipe and ran "make runtests". 
>> It gave results somewhat like this: 
>> 
>> "Base.t  ok  
>> Breaktable.t .. ok  
>> DBD.t . ok
>> Device.t .. ok
>> Driver.t .. ok  
>> Function.t  ok  
>> Menu.t  ok
>> Recfield.t  ok
>> Recordtype.t .. ok
>> Registrar.t ... ok  
>> Variable.t  ok  
>> All tests successful.
>> Files=11, Tests=293,  1 wallclock secs ( 0.05 usr  0.00 sys +  0.40 cusr  
>> 0.06
>> csys =  0.51 CPU)
>> Result: PASS"
> 
> What is EPICS running to test the executables? Do they expect a suitable QEMU 
> in
> the $PATH? In other words what are the dependencies EPICS required to run 
> these
> tests?
> 
>> I also downloaded rtems-testing directory
> 
> Could you please explain what this means? For me this could mean many things 
> and
> I suspect they are not the same as you. Please be provide the needed detail 
> for
> me or anyone to understand this statement, that is the URL, git command or
> whatever that makes sense. For example there is the personal repo of Joel's,
> something EPICS has, the rtems-test command, or you may have found a tar file
> somewhere.
> 
> Please provide the command line you entered and if there is an error the
> relevant pieces of the output.
> 
>> and tried to run simulator
>> using the tutorial here: 
>> https://devel.rtems.org/wiki/Developer/Simulators/QEMU
> 
> This page was updated over 2 years ago and as is the problem with wiki, the
> pages can age. I have added a suitable warning to that page. My advice is to
> consult the User Manual before the wiki.
> 
>> However, I was encountered with this error when I entered: 
>> ```./sim-scripts/pc386 -i
>> ~/development/rtems/kernels-5/pc-386/i386-rtems5/c/pc386/testsuites/samples/hello.exe```
>> 
>> Error: ```qemu-system-i386: Initialization of device ide-hd failed: Block 
>> node
>> is read-only```.
> 
> The User manual has a section titled "Testing". I suggest you refer to that.
> 
>> It is very much possible that I am following a wrong approach for testing. 
>> I really look forward to you all to help me out with it and
>> also share some resources which can help me guide on what exactly I have 
>> to proceed with ahead. 
> 
> I hope this help. Please let me know how you go.
> 
> Chris

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