Re: [PATCH] GDB: Prefer Python 3 over 2

2022-03-18 Thread Chris Johns

> On 19 Mar 2022, at 2:40 am, Sebastian Huber 
>  wrote:
> 
> On 17/03/2022 12:51, Sebastian Huber wrote:
>> This fixes the build of a recent GDB version:
>> gdb/python/py-micmd.c: In function 'int 
>> micmdpy_uninstall_command(micmdpy_object*)':
>> gdb/python/py-micmd.c:430:20: error: 'PyDict_GetItemWithError' was not 
>> declared in this scope
>>PyObject *curr = PyDict_GetItemWithError (mi_cmd_dict.get (),
>> ^~~

Has a bug report been raised with gdb?

> I was able to build the latest GDB with this patch. Otherwise all 
> architectures failed with the above error.

Has gdb dropped Python 2 support?

What happens on a host without python3 installed? Does the error appear? Does 
this in effect force RTEMS to drop the Python2 requirement for rtems6?

Chris


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

[PATCH 26/26] cpukit/libmisc/untar: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/untar/untar.c | 25 ++---
 cpukit/libmisc/untar/untar_tgz.c | 25 ++---
 cpukit/libmisc/untar/untar_txz.c | 25 ++---
 3 files changed, 66 insertions(+), 9 deletions(-)

diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c
index ab2c57..7bc1fff02a 100644
--- a/cpukit/libmisc/untar/untar.c
+++ b/cpukit/libmisc/untar/untar.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -11,9 +13,26 @@
  *
  *  Copyright 2016 Chris Johns 
  *
- *  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.
+ * 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
diff --git a/cpukit/libmisc/untar/untar_tgz.c b/cpukit/libmisc/untar/untar_tgz.c
index bcec8e7471..5298b871dc 100644
--- a/cpukit/libmisc/untar/untar_tgz.c
+++ b/cpukit/libmisc/untar/untar_tgz.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
  *
- * 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.
+ * 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
diff --git a/cpukit/libmisc/untar/untar_txz.c b/cpukit/libmisc/untar/untar_txz.c
index 0b0594c12e..62c2dd9c7c 100644
--- a/cpukit/libmisc/untar/untar_txz.c
+++ b/cpukit/libmisc/untar/untar_txz.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * Copyright (c) 2016 Chris Johns .  All rights reserved.
  *
- * 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.
+ * 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 

[PATCH 25/26] cpukit/libmisc/check: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/stackchk/check.c | 25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index fa0c3ea1ed..48342ce957 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -15,9 +17,26 @@
  *  COPYRIGHT (c) 1989-2010.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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.
  *
  */
 
-- 
2.24.4

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


[PATCH 24/26] cpukit/libmisc/serdbg: Change to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/serdbg/serdbg.c | 25 ++---
 cpukit/libmisc/serdbg/serdbgio.c   | 25 ++---
 cpukit/libmisc/serdbg/termios_printk.c | 25 ++---
 3 files changed, 66 insertions(+), 9 deletions(-)

diff --git a/cpukit/libmisc/serdbg/serdbg.c b/cpukit/libmisc/serdbg/serdbg.c
index 4fa1335d89..c49e78762a 100644
--- a/cpukit/libmisc/serdbg/serdbg.c
+++ b/cpukit/libmisc/serdbg/serdbg.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * RTEMS remote gdb over serial line
  *
@@ -9,9 +11,26 @@
  * Copyright (c) 2002 IMD Ingenieurbuero fuer Microcomputertechnik
  * All rights reserved.
  *
- * 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.
+ * 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
diff --git a/cpukit/libmisc/serdbg/serdbgio.c b/cpukit/libmisc/serdbg/serdbgio.c
index 23a4ca62f0..07c77a0b03 100644
--- a/cpukit/libmisc/serdbg/serdbgio.c
+++ b/cpukit/libmisc/serdbg/serdbgio.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * TERMIOS serial gdb interface support
  * the functions in this file allow the standard gdb stubs like
@@ -9,9 +11,26 @@
  * Copyright (c) 2002 IMD Ingenieurbuero fuer Microcomputertechnik
  * All rights reserved.
  *
- *  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.
+ * 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
diff --git a/cpukit/libmisc/serdbg/termios_printk.c 
b/cpukit/libmisc/serdbg/termios_printk.c
index ba78fa54fc..2b5a7f8e69 100644
--- a/cpukit/libmisc/serdbg/termios_printk.c
+++ b/cpukit/libmisc/serdbg/termios_printk.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * TERMIOS printk support
  * this module performs low-level printk output using
@@ -8,9 +10,26 @@
  * Copyright (c) 2002 IMD Ingenieurbuero fuer Microcomputertechnik
  * All rights reserved.
  *
- *  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.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are 

[PATCH 23/26] cpukit/libmisc/rtems-fdt: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c | 25 +++---
 cpukit/libmisc/rtems-fdt/rtems-fdt.c   | 25 +++---
 2 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c 
b/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c
index 61f20765e0..76f5cd7dbb 100644
--- a/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c
+++ b/cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  COPYRIGHT (c) 2013-2017 Chris Johns 
  *
- *  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.
+ * 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.
  */
 /**
  * @file
diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c 
b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
index 484cb1f9e2..7dd2bc1047 100644
--- a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
+++ b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  COPYRIGHT (c) 2013-2017 Chris Johns 
  *
- *  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.
+ * 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.
  */
 
 #include 
-- 
2.24.4

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


[PATCH 22/26] cpukit/libmisc/redirector: Manually change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/redirector/stdio-redirect.c | 33 --
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/cpukit/libmisc/redirector/stdio-redirect.c 
b/cpukit/libmisc/redirector/stdio-redirect.c
index 7f3e9138a7..712968ac2d 100644
--- a/cpukit/libmisc/redirector/stdio-redirect.c
+++ b/cpukit/libmisc/redirector/stdio-redirect.c
@@ -1,16 +1,33 @@
-/*
- * Copyright (C) 2014 Chris Johns (chr...@rtems.org)
+/**
+ * @file
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution.
- *
- * This software with is provided ``as is'' and with NO WARRANTY.
+ * @brief RTEMS std redirector.
  */
 
 /*
- * RTEMS std redirector.
+ * Copyright (C) 2014 Chris Johns (chr...@rtems.org)
+ *
+ * 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.
  */
-
 #include 
 #include 
 #include 
-- 
2.24.4

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


[PATCH 21/26] cpukit/libmisc/mouse: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/mouse/serial_mouse.c | 25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/cpukit/libmisc/mouse/serial_mouse.c 
b/cpukit/libmisc/mouse/serial_mouse.c
index 53a174df57..adf57449d5 100644
--- a/cpukit/libmisc/mouse/serial_mouse.c
+++ b/cpukit/libmisc/mouse/serial_mouse.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -10,9 +12,26 @@
  *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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.
  */
 
 #include 
-- 
2.24.4

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


[PATCH 19/26] cpukit/libmisc/fsmount: Change license to BSD-2.

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/fsmount/fsmount.c | 25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/cpukit/libmisc/fsmount/fsmount.c b/cpukit/libmisc/fsmount/fsmount.c
index 55216ea279..3e3f773edf 100644
--- a/cpukit/libmisc/fsmount/fsmount.c
+++ b/cpukit/libmisc/fsmount/fsmount.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -16,9 +18,26 @@
  * Copyright (c) 2003 IMD Ingenieurbuero fuer Microcomputertechnik
  * All rights reserved.
  *
- * 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.
+ * 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 HAVE_CONFIG_H
-- 
2.24.4

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


[PATCH 20/26] cpukit/libmisc/fsmount/fsmount.c: Manual header clean up

2022-03-18 Thread Joel Sherrill
---
 cpukit/libmisc/fsmount/fsmount.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/cpukit/libmisc/fsmount/fsmount.c b/cpukit/libmisc/fsmount/fsmount.c
index 3e3f773edf..df46b196dd 100644
--- a/cpukit/libmisc/fsmount/fsmount.c
+++ b/cpukit/libmisc/fsmount/fsmount.c
@@ -6,9 +6,7 @@
  * @ingroup rtems_fstab File System Mount Support
  *
  * @brief File System Mount Functions
- */
-
-/*
+ *
  * This file contains the fsmount functions. These functions
  * are used to mount a list of filesystems (and create their mount
  * points before).
-- 
2.24.4

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


[PATCH 18/26] cpukit/libmisc/dumpbuf: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/dumpbuf/dumpbuf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/libmisc/dumpbuf/dumpbuf.c b/cpukit/libmisc/dumpbuf/dumpbuf.c
index 7f8128259f..3c26c72d53 100644
--- a/cpukit/libmisc/dumpbuf/dumpbuf.c
+++ b/cpukit/libmisc/dumpbuf/dumpbuf.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
-- 
2.24.4

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


[PATCH 17/26] cpukit/libmisc/dummy: Change license to BSD-2.

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/dummy/default-configuration.c | 25 +---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/cpukit/libmisc/dummy/default-configuration.c 
b/cpukit/libmisc/dummy/default-configuration.c
index 9c30b270c2..62c6e98de7 100644
--- a/cpukit/libmisc/dummy/default-configuration.c
+++ b/cpukit/libmisc/dummy/default-configuration.c
@@ -1,12 +1,31 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  Default configuration file
  *
  *  COPYRIGHT (c) 1989-2008.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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
-- 
2.24.4

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


[PATCH 16/26] cpukit/libmisc/devnull/devzero.c: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/devnull/devzero.c | 25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/cpukit/libmisc/devnull/devzero.c b/cpukit/libmisc/devnull/devzero.c
index 660391c4f2..7cfd05d4be 100644
--- a/cpukit/libmisc/devnull/devzero.c
+++ b/cpukit/libmisc/devnull/devzero.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -9,9 +11,26 @@
 /*
  * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
  *
- * 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.
+ * 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
-- 
2.24.4

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


[PATCH 15/26] cpukit/libmisc/cpuuse: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/cpuuse/cpuinforeport.c  | 25 ++---
 cpukit/libmisc/cpuuse/cpuusagedata.c   | 25 ++---
 cpukit/libmisc/cpuuse/cpuusagereport.c | 25 ++---
 cpukit/libmisc/cpuuse/cpuusagereset.c  | 25 ++---
 cpukit/libmisc/cpuuse/cpuusagetop.c| 25 ++---
 cpukit/libmisc/cpuuse/cpuuseimpl.h | 25 ++---
 6 files changed, 132 insertions(+), 18 deletions(-)

diff --git a/cpukit/libmisc/cpuuse/cpuinforeport.c 
b/cpukit/libmisc/cpuuse/cpuinforeport.c
index e8df78a359..dcbc7f1747 100644
--- a/cpukit/libmisc/cpuuse/cpuinforeport.c
+++ b/cpukit/libmisc/cpuuse/cpuinforeport.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
  *
- * 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.
+ * 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
diff --git a/cpukit/libmisc/cpuuse/cpuusagedata.c 
b/cpukit/libmisc/cpuuse/cpuusagedata.c
index 0d06dd3e5c..350ade309b 100644
--- a/cpukit/libmisc/cpuuse/cpuusagedata.c
+++ b/cpukit/libmisc/cpuuse/cpuusagedata.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -12,9 +14,26 @@
  *  COPYRIGHT (c) 1989-2009
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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
diff --git a/cpukit/libmisc/cpuuse/cpuusagereport.c 
b/cpukit/libmisc/cpuuse/cpuusagereport.c
index ea21e73dc1..bc7c897db5 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereport.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereport.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -10,9 +12,26 @@
  *  COPYRIGHT (c) 1989-2010.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are 

[PATCH 14/26] cpukit/libmisc/capture: Manually change license to BSD-2

2022-03-18 Thread Joel Sherrill
These files did not follow the standard format and needed to be
changed manually.

Updates #3053.
---
 cpukit/libmisc/capture/README |  4 +-
 cpukit/libmisc/capture/capture-cli.c  | 57 ---
 cpukit/libmisc/capture/capture.c  | 55 +++---
 cpukit/libmisc/capture/capture_buffer.c   | 49 ++--
 cpukit/libmisc/capture/capture_buffer.h   | 42 +-
 cpukit/libmisc/capture/capture_support.c  | 57 ---
 .../libmisc/capture/capture_user_extension.c  | 51 +++--
 7 files changed, 200 insertions(+), 115 deletions(-)

diff --git a/cpukit/libmisc/capture/README b/cpukit/libmisc/capture/README
index 3e59637149..806bb37d1f 100644
--- a/cpukit/libmisc/capture/README
+++ b/cpukit/libmisc/capture/README
@@ -1,7 +1,7 @@
   RTEMS Performance Monitoring and Measurement Framework
 
-  Copyright 2002-2007 Chris Johns 
(chr...@rtems.org)
- 23 April 2002
+  Copyright 2002-2007 Chris Johns (chr...@rtems.org)
+  23 April 2002
 
 This directory contains the source code for the performance monitoring and
 measurement framework. It is more commonly know as the capture engine.
diff --git a/cpukit/libmisc/capture/capture-cli.c 
b/cpukit/libmisc/capture/capture-cli.c
index d489d9f32a..d8afc982a1 100644
--- a/cpukit/libmisc/capture/capture-cli.c
+++ b/cpukit/libmisc/capture/capture-cli.c
@@ -1,25 +1,40 @@
-/*
-  
-
-  Copyright 2002, 2015 Chris Johns 
-  All rights reserved.
-
-  COPYRIGHT (c) 2014.
-  On-Line Applications Research Corporation (OAR).
-
-  The license and distribution terms for this file may be
-  found in the file LICENSE in this distribution.
-
-  This software with is provided ``as is'' and with NO WARRANTY.
-
-  
-
-  RTEMS Performance Monitoring and Measurement Framework.
-
-  This is the Target Interface Command Line Interface. You need
-  start the RTEMS monitor.
+/**
+ * @file
+ *
+ * @brief RTEMS Performance Monitoring and Measurement Framework.
+ *
+ * This is the Target Interface Command Line Interface. You need
+ * start the RTEMS monitor.
+ */
 
-*/
+/*
+ * Copyright 2002, 2015 Chris Johns .
+ * All rights reserved.
+ *
+ * COPYRIGHT (c) 2014.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * 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"
diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c
index bba7d91396..2ed607ecaf 100644
--- a/cpukit/libmisc/capture/capture.c
+++ b/cpukit/libmisc/capture/capture.c
@@ -1,24 +1,39 @@
-/*
-  
-
-  Copyright 2002, 2016 Chris Johns .
-  All rights reserved.
-
-  COPYRIGHT (c) 1989-2014.
-  On-Line Applications Research Corporation (OAR).
-
-  The license and distribution terms for this file may be
-  found in the file LICENSE in this distribution.
-
-  This software with is provided ``as is'' and with NO WARRANTY.
-
-  
-
-  RTEMS Performance Monitoring and Measurement Framework.
-
-  This is the Capture Engine component.
+/**
+ * @file
+ *
+ * @brief RTEMS Performance Monitoring and Measurement Framework.
+ *
+ * This is the Capture Engine component.
+ */
 
-*/
+/*
+ * Copyright 2002, 2016 Chris Johns .
+ * All rights reserved.
+ *
+ * COPYRIGHT (c) 1989-2014.
+ * On-Line Applications Research Corporation (OAR).

[PATCH 13/26] cpukit/capture: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 .../capture/rtems-trace-buffer-default.c  | 25 ---
 .../libmisc/capture/rtems-trace-buffer-vars.c | 25 ---
 2 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/cpukit/libmisc/capture/rtems-trace-buffer-default.c 
b/cpukit/libmisc/capture/rtems-trace-buffer-default.c
index 23c66cdc88..fd9a9cc06b 100644
--- a/cpukit/libmisc/capture/rtems-trace-buffer-default.c
+++ b/cpukit/libmisc/capture/rtems-trace-buffer-default.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  Copyright (c) 2015 Chris Johns 
  *
- *  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.
+ * 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.
  */
 
 #include 
diff --git a/cpukit/libmisc/capture/rtems-trace-buffer-vars.c 
b/cpukit/libmisc/capture/rtems-trace-buffer-vars.c
index ec24181253..5e565387d0 100644
--- a/cpukit/libmisc/capture/rtems-trace-buffer-vars.c
+++ b/cpukit/libmisc/capture/rtems-trace-buffer-vars.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  Copyright (c) 2015 Chris Johns 
  *
- *  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.
+ * 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.
  */
 
 #include 
-- 
2.24.4

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


[PATCH 12/26] cpukit/libmisc/bspcmdline: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libmisc/bspcmdline/bspcmdline_get.c| 25 ---
 .../libmisc/bspcmdline/bspcmdline_getparam.c  | 25 ---
 .../bspcmdline/bspcmdline_getparamraw.c   | 25 ---
 .../bspcmdline/bspcmdline_getparamrhs.c   | 25 ---
 4 files changed, 88 insertions(+), 12 deletions(-)

diff --git a/cpukit/libmisc/bspcmdline/bspcmdline_get.c 
b/cpukit/libmisc/bspcmdline/bspcmdline_get.c
index 029cb6b8e6..f867e8b0d1 100644
--- a/cpukit/libmisc/bspcmdline/bspcmdline_get.c
+++ b/cpukit/libmisc/bspcmdline/bspcmdline_get.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -10,9 +12,26 @@
  *  COPYRIGHT (c) 1989-2009.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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
diff --git a/cpukit/libmisc/bspcmdline/bspcmdline_getparam.c 
b/cpukit/libmisc/bspcmdline/bspcmdline_getparam.c
index f18773a49a..1920b3a98e 100644
--- a/cpukit/libmisc/bspcmdline/bspcmdline_getparam.c
+++ b/cpukit/libmisc/bspcmdline/bspcmdline_getparam.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -10,9 +12,26 @@
  *  COPYRIGHT (c) 1989-2009.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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
diff --git a/cpukit/libmisc/bspcmdline/bspcmdline_getparamraw.c 
b/cpukit/libmisc/bspcmdline/bspcmdline_getparamraw.c
index db4a01aed3..833ddbccc2 100644
--- a/cpukit/libmisc/bspcmdline/bspcmdline_getparamraw.c
+++ b/cpukit/libmisc/bspcmdline/bspcmdline_getparamraw.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -10,9 +12,26 @@
  *  COPYRIGHT (c) 1989-2009.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the 

[PATCH 10/26] cpukit/libpci: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libpci/pci_access.c | 25 ++---
 cpukit/libpci/pci_access_func.c| 25 ++---
 cpukit/libpci/pci_access_io.c  | 25 ++---
 cpukit/libpci/pci_access_mem.c | 25 ++---
 cpukit/libpci/pci_access_mem_be.c  | 25 ++---
 cpukit/libpci/pci_access_mem_le.c  | 25 ++---
 cpukit/libpci/pci_bus.c| 25 ++---
 cpukit/libpci/pci_cfg.c| 25 ++---
 cpukit/libpci/pci_cfg_auto.c   | 25 ++---
 cpukit/libpci/pci_cfg_peripheral.c | 25 ++---
 cpukit/libpci/pci_cfg_print_code.c | 25 ++---
 cpukit/libpci/pci_cfg_read.c   | 25 ++---
 cpukit/libpci/pci_cfg_static.c | 25 ++---
 cpukit/libpci/pci_find.c   | 25 ++---
 cpukit/libpci/pci_find_dev.c   | 25 ++---
 cpukit/libpci/pci_for_each.c   | 25 ++---
 cpukit/libpci/pci_for_each_child.c | 25 ++---
 cpukit/libpci/pci_for_each_dev.c   | 25 ++---
 cpukit/libpci/pci_get_dev.c| 25 ++---
 cpukit/libpci/pci_internal.h   | 25 ++---
 cpukit/libpci/pci_irq.c| 25 ++---
 cpukit/libpci/pci_print.c  | 25 ++---
 22 files changed, 484 insertions(+), 66 deletions(-)

diff --git a/cpukit/libpci/pci_access.c b/cpukit/libpci/pci_access.c
index 11e48c1de7..8f79ac441f 100644
--- a/cpukit/libpci/pci_access.c
+++ b/cpukit/libpci/pci_access.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*  PCI Access Library
  *
  *  COPYRIGHT (c) 2010 Cobham Gaisler AB.
  *
- *  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.
+ * 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.
  */
 
 #include 
diff --git a/cpukit/libpci/pci_access_func.c b/cpukit/libpci/pci_access_func.c
index a6fd0bba96..fb77819745 100644
--- a/cpukit/libpci/pci_access_func.c
+++ b/cpukit/libpci/pci_access_func.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*  PCI Access Library
  *
  *  COPYRIGHT (c) 2010 Cobham Gaisler AB.
  *
- *  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.
+ * 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
+ * 

[PATCH 11/26] cpukit/libtest: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libtest/testbeginend.c  | 25 ++---
 cpukit/libtest/testbusy.c  | 25 ++---
 cpukit/libtest/testextension.c | 25 ++---
 cpukit/libtest/testparallel.c  | 25 ++---
 cpukit/libtest/testwrappers.c  | 25 ++---
 5 files changed, 110 insertions(+), 15 deletions(-)

diff --git a/cpukit/libtest/testbeginend.c b/cpukit/libtest/testbeginend.c
index 7d598e268f..6ff52d67c4 100644
--- a/cpukit/libtest/testbeginend.c
+++ b/cpukit/libtest/testbeginend.c
@@ -1,11 +1,30 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * Copyright (c) 2014, 2018 embedded brains GmbH.  All rights reserved.
  *
  * Copyright (c) 2017 Chris Johns . All rights reserved.
  *
- * 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.
+ * 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
diff --git a/cpukit/libtest/testbusy.c b/cpukit/libtest/testbusy.c
index c871c2f3a5..69fb34cb32 100644
--- a/cpukit/libtest/testbusy.c
+++ b/cpukit/libtest/testbusy.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * Copyright (c) 2014, 2018 embedded brains GmbH.  All rights reserved.
  *
- * 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.
+ * 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.
  */
 
 
diff --git a/cpukit/libtest/testextension.c b/cpukit/libtest/testextension.c
index 1bd53ac47b..6bfe61eb0c 100644
--- a/cpukit/libtest/testextension.c
+++ b/cpukit/libtest/testextension.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
  *
- * 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.
+ * 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 

[PATCH 08/26] cpukit/libfs/src/rfs: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c  | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-block.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-buffer-bdbuf.c | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-buffer-devio.c | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-buffer.c   | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-dir.c  | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-file-system.c  | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-file.c | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-format.c   | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-group.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-inode.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-link.c | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-mutex.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c   | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-rtems-utils.c  | 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-rtems.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-rtems.h| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-shell.c| 25 ---
 cpukit/libfs/src/rfs/rtems-rfs-trace.c| 25 ---
 21 files changed, 462 insertions(+), 63 deletions(-)

diff --git a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c 
b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
index 6da555d50e..d756fc4006 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -14,9 +16,26 @@
 /*
  *  COPYRIGHT (c) 2010 Chris Johns 
  *
- *  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.
+ * 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
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-block.c 
b/cpukit/libfs/src/rfs/rtems-rfs-block.c
index 5dc8634818..1bff094514 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-block.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-block.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -28,9 +30,26 @@
 /*
  *  COPYRIGHT (c) 2010 Chris Johns 
  *
- *  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.
+ * 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 

[PATCH 09/26] cpukit/libgnat: Change license to BSD-2.

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libgnat/ada_intrsupp.c | 25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/cpukit/libgnat/ada_intrsupp.c b/cpukit/libgnat/ada_intrsupp.c
index e30d50cbc6..4c0319fa58 100644
--- a/cpukit/libgnat/ada_intrsupp.c
+++ b/cpukit/libgnat/ada_intrsupp.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  COPYRIGHT (c) 1989-2010.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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
-- 
2.24.4

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


[PATCH 07/26] cpukit/libds/src/ftpfs/tftpDriver.c: Manually update license to BSD-2

2022-03-18 Thread Joel Sherrill
Eric Norum granted permission plus git log archeology to get year for
his copyright.

Updates #3053.
---
 cpukit/libfs/src/ftpfs/tftpDriver.c | 38 +++--
 1 file changed, 30 insertions(+), 8 deletions(-)

diff --git a/cpukit/libfs/src/ftpfs/tftpDriver.c 
b/cpukit/libfs/src/ftpfs/tftpDriver.c
index bc0e74ad86..ef8dc33351 100644
--- a/cpukit/libfs/src/ftpfs/tftpDriver.c
+++ b/cpukit/libfs/src/ftpfs/tftpDriver.c
@@ -1,17 +1,39 @@
-/*
- * Trivial File Transfer Protocol (RFC 1350)
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
  *
- * Transfer file to/from remote host
+ * Trivial File Transfer Protocol file system (TFTP client) for RFC 1350.
  *
- * W. Eric Norum
- * Saskatchewan Accelerator Laboratory
- * University of Saskatchewan
- * Saskatoon, Saskatchewan, CANADA
- * e...@skatter.usask.ca
+ * Transfer file to/from remote host
+ */
+
+/*
+ * Copyright 1998 W. Eric Norum
  *
  * Modifications to support reference counting in the file system are
  * Copyright (c) 2012 embedded brains GmbH.
  *
+ * 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
-- 
2.24.4

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


[PATCH 06/26] cpukit/libfs/src/imfs: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libfs/src/imfs/deviceio.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_chown.c| 25 ---
 cpukit/libfs/src/imfs/imfs_config.c   | 25 ---
 cpukit/libfs/src/imfs/imfs_creat.c| 25 ---
 cpukit/libfs/src/imfs/imfs_dir.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_dir_default.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_dir_minimal.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_eval.c | 25 ---
 cpukit/libfs/src/imfs/imfs_fchmod.c   | 25 ---
 cpukit/libfs/src/imfs/imfs_fifo.c | 25 ---
 cpukit/libfs/src/imfs/imfs_fsunmount.c| 25 ---
 cpukit/libfs/src/imfs/imfs_handlers_device.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_initsupp.c | 25 ---
 cpukit/libfs/src/imfs/imfs_linfile.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_link.c | 25 ---
 cpukit/libfs/src/imfs/imfs_load_tar.c | 25 ---
 .../libfs/src/imfs/imfs_make_generic_node.c   | 25 ---
 cpukit/libfs/src/imfs/imfs_memfile.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_mknod.c| 25 ---
 cpukit/libfs/src/imfs/imfs_mount.c| 25 ---
 cpukit/libfs/src/imfs/imfs_node.c | 25 ---
 cpukit/libfs/src/imfs/imfs_rename.c   | 25 ---
 cpukit/libfs/src/imfs/imfs_rmnod.c| 25 ---
 cpukit/libfs/src/imfs/imfs_stat.c | 25 ---
 cpukit/libfs/src/imfs/imfs_stat_file.c| 25 ---
 cpukit/libfs/src/imfs/imfs_symlink.c  | 25 ---
 cpukit/libfs/src/imfs/imfs_unmount.c  | 25 ---
 cpukit/libfs/src/imfs/ioman.c | 25 ---
 28 files changed, 616 insertions(+), 84 deletions(-)

diff --git a/cpukit/libfs/src/imfs/deviceio.c b/cpukit/libfs/src/imfs/deviceio.c
index c1577ed39f..c364751a32 100644
--- a/cpukit/libfs/src/imfs/deviceio.c
+++ b/cpukit/libfs/src/imfs/deviceio.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -10,9 +12,26 @@
  *  COPYRIGHT (c) 1989-2012.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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
diff --git a/cpukit/libfs/src/imfs/imfs_chown.c 
b/cpukit/libfs/src/imfs/imfs_chown.c
index 268ed0fc56..5a0049ba2d 100644
--- a/cpukit/libfs/src/imfs/imfs_chown.c
+++ b/cpukit/libfs/src/imfs/imfs_chown.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -10,9 +12,26 @@
  *  COPYRIGHT (c) 1989-1999.
  *  On-Line Applications Research Corporation (OAR).
  *
- *  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.
+ * 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
+ *

[PATCH 05/26] cpukit/libdl: Manual file header reordering (SPDX, Doxygen, Copyright)

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libdl/dlfcn-shell.c| 19 ++--
 cpukit/libdl/dlfcn.c  | 19 ++--
 cpukit/libdl/rap-shell.c  | 19 ++--
 cpukit/libdl/rap.c| 19 ++--
 cpukit/libdl/rtl-alloc-heap.c | 15 +-
 cpukit/libdl/rtl-alloc-heap.h | 15 +-
 cpukit/libdl/rtl-allocator.c  | 15 +-
 cpukit/libdl/rtl-archive.c| 15 +-
 cpukit/libdl/rtl-bit-alloc.c  | 23 ---
 cpukit/libdl/rtl-bit-alloc.h  | 15 +-
 cpukit/libdl/rtl-chain-iterator.c | 19 ++--
 cpukit/libdl/rtl-chain-iterator.h | 15 +-
 cpukit/libdl/rtl-debugger.c   | 33 +++--
 cpukit/libdl/rtl-elf.c| 19 ++--
 cpukit/libdl/rtl-elf.h| 15 +-
 cpukit/libdl/rtl-error.c  | 15 +-
 cpukit/libdl/rtl-error.h  | 15 +-
 cpukit/libdl/rtl-find-file.c  | 15 +-
 cpukit/libdl/rtl-find-file.h  | 15 +-
 cpukit/libdl/rtl-obj-cache.c  | 17 ++-
 cpukit/libdl/rtl-obj-comp.c   | 17 ++-
 cpukit/libdl/rtl-obj.c| 15 +-
 cpukit/libdl/rtl-rap.c| 19 ++--
 cpukit/libdl/rtl-rap.h| 15 +-
 cpukit/libdl/rtl-shell.c  | 19 ++--
 cpukit/libdl/rtl-string.c | 15 +-
 cpukit/libdl/rtl-string.h | 15 +-
 cpukit/libdl/rtl-sym.c| 15 +-
 cpukit/libdl/rtl-trace.c  | 21 ++---
 cpukit/libdl/rtl-trampoline.h | 49 ---
 cpukit/libdl/rtl-unresolved.c | 15 +-
 cpukit/libdl/rtl-unwind-dw2.c | 19 ++--
 cpukit/libdl/rtl-unwind-dw2.h | 15 +-
 cpukit/libdl/rtl-unwind.h | 15 +-
 cpukit/libdl/rtl.c| 19 ++--
 35 files changed, 335 insertions(+), 300 deletions(-)

diff --git a/cpukit/libdl/dlfcn-shell.c b/cpukit/libdl/dlfcn-shell.c
index 84a5d78e4a..6ea2501347 100644
--- a/cpukit/libdl/dlfcn-shell.c
+++ b/cpukit/libdl/dlfcn-shell.c
@@ -1,5 +1,15 @@
 /* SPDX-License-Identifier: BSD-2-Clause */
 
+/**
+ * @file
+ *
+ * @ingroup rtems_rtld
+ *
+ * @brief RTEMS Run-Time Link Editor Dynamic Loading API Shell Support.
+ *
+ * Shell command wrappers for the Dynamic Loading API.
+ */
+
 /*
  *  COPYRIGHT (c) 2012, 2018 Chris Johns 
  *
@@ -24,15 +34,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/**
- * @file
- *
- * @ingroup rtems_rtld
- *
- * @brief RTEMS Run-Time Link Editor Dynamic Loading API Shell Support.
- *
- * Shell command wrappers for the Dynamic Loading API.
- */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 1eeb663b08..bc485f5b98 100644
--- a/cpukit/libdl/dlfcn.c
+++ b/cpukit/libdl/dlfcn.c
@@ -1,5 +1,15 @@
 /* SPDX-License-Identifier: BSD-2-Clause */
 
+/**
+ * @file
+ *
+ * @ingroup rtl
+ *
+ * @brief RTEMS POSIX Dynamic Module Loading Interface.
+ *
+ * This is the POSIX interface to run-time loading of code into RTEMS.
+ */
+
 /*
  *  COPYRIGHT (c) 2012, 2018 Chris Johns 
  *
@@ -24,15 +34,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/**
- * @file
- *
- * @ingroup rtl
- *
- * @brief RTEMS POSIX Dynamic Module Loading Interface.
- *
- * This is the POSIX interface to run-time loading of code into RTEMS.
- */
 
 #include 
 #include 
diff --git a/cpukit/libdl/rap-shell.c b/cpukit/libdl/rap-shell.c
index dcb5c2ad1e..48b9a246e7 100644
--- a/cpukit/libdl/rap-shell.c
+++ b/cpukit/libdl/rap-shell.c
@@ -1,5 +1,15 @@
 /* SPDX-License-Identifier: BSD-2-Clause */
 
+/**
+ * @file
+ *
+ * @ingroup rtems_rtld
+ *
+ * @brief RTEMS Application Loader.
+ *
+ * Shell command wrappers for the RTEMS Application loader.
+ */
+
 /*
  *  COPYRIGHT (c) 2013 Chris Johns 
  *
@@ -24,15 +34,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/**
- * @file
- *
- * @ingroup rtems_rtld
- *
- * @brief RTEMS Application Loader.
- *
- * Shell command wrappers for the RTEMS Application loader.
- */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/cpukit/libdl/rap.c b/cpukit/libdl/rap.c
index a11695f2ee..1a93721aec 100644
--- a/cpukit/libdl/rap.c
+++ b/cpukit/libdl/rap.c
@@ -1,5 +1,15 @@
 /* SPDX-License-Identifier: BSD-2-Clause */
 
+/**
+ * @file
+ *
+ * @ingroup rtems_rap
+ *
+ * @brief RTEMS Application Loader
+ *
+ * This is the RAP implementation.
+ */
+
 /*
  *  COPYRIGHT (c) 2012, 2018 Chris Johns 
  *
@@ -24,15 +34,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/**
- * @file
- *
- * @ingroup rtems_rap
- *
- * @brief RTEMS Application Loader
- *
- * This is the RAP implementation.
- */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff 

[PATCH 04/26] cpukit/libfs/src/defaults: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 .../src/defaults/default_are_nodes_equal.c| 25 ---
 cpukit/libfs/src/defaults/default_chown.c | 25 ---
 cpukit/libfs/src/defaults/default_clone.c | 25 ---
 cpukit/libfs/src/defaults/default_close.c | 25 ---
 cpukit/libfs/src/defaults/default_eval_path.c | 25 ---
 cpukit/libfs/src/defaults/default_fchmod.c| 25 ---
 cpukit/libfs/src/defaults/default_fcntl.c | 25 ---
 cpukit/libfs/src/defaults/default_freenode.c  | 25 ---
 cpukit/libfs/src/defaults/default_fstat.c | 25 ---
 cpukit/libfs/src/defaults/default_fsunmount.c | 25 ---
 cpukit/libfs/src/defaults/default_fsync.c | 25 ---
 .../src/defaults/default_fsync_success.c  | 25 ---
 cpukit/libfs/src/defaults/default_ftruncate.c | 25 ---
 .../defaults/default_ftruncate_directory.c| 25 ---
 cpukit/libfs/src/defaults/default_handlers.c  | 25 ---
 cpukit/libfs/src/defaults/default_ioctl.c | 25 ---
 cpukit/libfs/src/defaults/default_kqfilter.c  | 25 ---
 cpukit/libfs/src/defaults/default_link.c  | 25 ---
 .../src/defaults/default_lock_and_unlock.c| 25 ---
 cpukit/libfs/src/defaults/default_lseek.c | 25 ---
 .../src/defaults/default_lseek_directory.c| 25 ---
 .../libfs/src/defaults/default_lseek_file.c   | 25 ---
 cpukit/libfs/src/defaults/default_mknod.c | 25 ---
 cpukit/libfs/src/defaults/default_mmap.c  | 25 ---
 cpukit/libfs/src/defaults/default_mount.c | 25 ---
 cpukit/libfs/src/defaults/default_open.c  | 25 ---
 cpukit/libfs/src/defaults/default_poll.c  | 25 ---
 cpukit/libfs/src/defaults/default_read.c  | 25 ---
 cpukit/libfs/src/defaults/default_readlink.c  | 25 ---
 cpukit/libfs/src/defaults/default_readv.c | 25 ---
 cpukit/libfs/src/defaults/default_rename.c| 25 ---
 cpukit/libfs/src/defaults/default_rmnod.c | 25 ---
 cpukit/libfs/src/defaults/default_statvfs.c   | 25 ---
 cpukit/libfs/src/defaults/default_symlink.c   | 25 ---
 cpukit/libfs/src/defaults/default_unmount.c   | 25 ---
 cpukit/libfs/src/defaults/default_write.c | 25 ---
 cpukit/libfs/src/defaults/default_writev.c| 25 ---
 37 files changed, 814 insertions(+), 111 deletions(-)

diff --git a/cpukit/libfs/src/defaults/default_are_nodes_equal.c 
b/cpukit/libfs/src/defaults/default_are_nodes_equal.c
index e9e89e1088..bdcac110d5 100644
--- a/cpukit/libfs/src/defaults/default_are_nodes_equal.c
+++ b/cpukit/libfs/src/defaults/default_are_nodes_equal.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * @file
  *
@@ -9,9 +11,26 @@
 /*
  * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
  *
- * 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.
+ * 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
diff --git a/cpukit/libfs/src/defaults/default_chown.c 
b/cpukit/libfs/src/defaults/default_chown.c
index b3da5dc3e6..cae32e3a3a 100644
--- a/cpukit/libfs/src/defaults/default_chown.c
+++ b/cpukit/libfs/src/defaults/default_chown.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /**
  * 

[PATCH 03/26] cpukit/libdrvmsg: Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libdrvmgr/drvmgr.c   | 25 ++---
 cpukit/libdrvmgr/drvmgr_by_id.c | 25 ++---
 cpukit/libdrvmgr/drvmgr_by_name.c   | 25 ++---
 cpukit/libdrvmgr/drvmgr_dev_by_name.c   | 25 ++---
 cpukit/libdrvmgr/drvmgr_drvinf.c| 25 ++---
 cpukit/libdrvmgr/drvmgr_for_each_dev.c  | 25 ++---
 cpukit/libdrvmgr/drvmgr_for_each_list_dev.c | 25 ++---
 cpukit/libdrvmgr/drvmgr_func.c  | 25 ++---
 cpukit/libdrvmgr/drvmgr_func_call.c | 25 ++---
 cpukit/libdrvmgr/drvmgr_init.c  | 25 ++---
 cpukit/libdrvmgr/drvmgr_internal.h  | 25 ++---
 cpukit/libdrvmgr/drvmgr_list.c  | 25 ++---
 cpukit/libdrvmgr/drvmgr_lock.c  | 25 ++---
 cpukit/libdrvmgr/drvmgr_print.c | 25 ++---
 cpukit/libdrvmgr/drvmgr_res.c   | 25 ++---
 cpukit/libdrvmgr/drvmgr_rw.c| 25 ++---
 cpukit/libdrvmgr/drvmgr_translate.c | 25 ++---
 cpukit/libdrvmgr/drvmgr_translate_check.c   | 25 ++---
 cpukit/libdrvmgr/drvmgr_unregister.c| 25 ++---
 19 files changed, 418 insertions(+), 57 deletions(-)

diff --git a/cpukit/libdrvmgr/drvmgr.c b/cpukit/libdrvmgr/drvmgr.c
index 4f48a9e2fc..aa70f17842 100644
--- a/cpukit/libdrvmgr/drvmgr.c
+++ b/cpukit/libdrvmgr/drvmgr.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /* Driver Manager Interface Implementation.
  *
  * COPYRIGHT (c) 2009 Cobham Gaisler AB.
  *
- * 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.
+ * 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.
  */
 
 #include 
diff --git a/cpukit/libdrvmgr/drvmgr_by_id.c b/cpukit/libdrvmgr/drvmgr_by_id.c
index 84164e3864..c3c2a9b1b2 100644
--- a/cpukit/libdrvmgr/drvmgr_by_id.c
+++ b/cpukit/libdrvmgr/drvmgr_by_id.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /* Find driver by driver-ID
  *
  * COPYRIGHT (c) 2011 Cobham Gaisler AB.
  *
- * 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.
+ * 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 

[PATCH 02/26] cpukit/libdl Change license to BSD-2

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libdl/dlfcn-shell.c| 25 ++---
 cpukit/libdl/dlfcn.c  | 25 ++---
 cpukit/libdl/rap-shell.c  | 25 ++---
 cpukit/libdl/rap.c| 25 ++---
 cpukit/libdl/rtl-alloc-heap.c | 25 ++---
 cpukit/libdl/rtl-alloc-heap.h | 25 ++---
 cpukit/libdl/rtl-allocator.c  | 25 ++---
 cpukit/libdl/rtl-archive.c| 25 ++---
 cpukit/libdl/rtl-bit-alloc.c  | 25 ++---
 cpukit/libdl/rtl-bit-alloc.h  | 25 ++---
 cpukit/libdl/rtl-chain-iterator.c | 25 ++---
 cpukit/libdl/rtl-chain-iterator.h | 25 ++---
 cpukit/libdl/rtl-debugger.c   | 25 ++---
 cpukit/libdl/rtl-elf.c| 25 ++---
 cpukit/libdl/rtl-elf.h| 25 ++---
 cpukit/libdl/rtl-error.c  | 25 ++---
 cpukit/libdl/rtl-error.h  | 25 ++---
 cpukit/libdl/rtl-find-file.c  | 25 ++---
 cpukit/libdl/rtl-find-file.h  | 25 ++---
 cpukit/libdl/rtl-obj-cache.c  | 25 ++---
 cpukit/libdl/rtl-obj-comp.c   | 25 ++---
 cpukit/libdl/rtl-obj.c| 25 ++---
 cpukit/libdl/rtl-rap.c| 25 ++---
 cpukit/libdl/rtl-rap.h| 25 ++---
 cpukit/libdl/rtl-shell.c  | 25 ++---
 cpukit/libdl/rtl-string.c | 25 ++---
 cpukit/libdl/rtl-string.h | 25 ++---
 cpukit/libdl/rtl-sym.c| 25 ++---
 cpukit/libdl/rtl-trace.c  | 25 ++---
 cpukit/libdl/rtl-trampoline.h | 25 ++---
 cpukit/libdl/rtl-unresolved.c | 25 ++---
 cpukit/libdl/rtl-unwind-dw2.c | 25 ++---
 cpukit/libdl/rtl-unwind-dw2.h | 25 ++---
 cpukit/libdl/rtl-unwind.h | 25 ++---
 cpukit/libdl/rtl.c| 25 ++---
 35 files changed, 770 insertions(+), 105 deletions(-)

diff --git a/cpukit/libdl/dlfcn-shell.c b/cpukit/libdl/dlfcn-shell.c
index 67a6e6b8b7..84a5d78e4a 100644
--- a/cpukit/libdl/dlfcn-shell.c
+++ b/cpukit/libdl/dlfcn-shell.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  COPYRIGHT (c) 2012, 2018 Chris Johns 
  *
- *  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.
+ * 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.
  */
 /**
  * @file
diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index e90ed43668..1eeb663b08 100644
--- a/cpukit/libdl/dlfcn.c
+++ b/cpukit/libdl/dlfcn.c
@@ -1,9 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
 /*
  *  COPYRIGHT (c) 2012, 2018 Chris Johns 
  *
- *  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.
+ * 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 

[PATCH 01/26] cpukit/libdl/rtl-alloc-check.py: Change to BSD-2 by hand

2022-03-18 Thread Joel Sherrill
Updates #3053.
---
 cpukit/libdl/rtl-alloc-check.py | 30 +++---
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/cpukit/libdl/rtl-alloc-check.py b/cpukit/libdl/rtl-alloc-check.py
index c2145a768e..3d6b024442 100644
--- a/cpukit/libdl/rtl-alloc-check.py
+++ b/cpukit/libdl/rtl-alloc-check.py
@@ -1,11 +1,4 @@
 #
-# Copyright (c) 2019 Chris Johns .
-# All rights reserved.
-#
-# 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.
-#
 # Check the allocations for libdl:
 #
 #  1. Turn on the allocation trace.
@@ -13,7 +6,30 @@
 #  2. Load and unload object files.
 #
 #  3. Capture the trace output and feed to this tool
+
+# Copyright (c) 2019 Chris Johns .
+# 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 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.
 
 from __future__ import print_function
 
-- 
2.24.4

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


[PATCH 00/26] Bulk Relicense to BSD-2

2022-03-18 Thread Joel Sherrill
Hi

This is another large patch set which changes most of the cpukit
source that is easily possible to BSD-2. I have emailed at least
a half dozen more contributors to get permission. That will unblock
some files/directories I didn't touch. There is still a fair amount
in cpukit which can be changed to BSD-2 (I think).

Known issues we can address are:

+ cpukit/include needs a sweep
+ cpukit/dev needs a sweep
+ cpukit/libcsupport needs a file by file review
+ cpukit/libmisc/shell needs a file by file review
+ cpukit/libmisc/monitor is going to require Chris' attention
+ cpukit/libdl has NetBSD code with no license
+ sometimes files are BSD-2 but SPDX line is in the copyright block
+ some files have no license (md4.c, des.h stick out)
+ imported files with permissive license have no SPDX

I have not looked at libbsp and intend to do testsuites next because
they should be easier. Most are single contributor. 

This patch set is mostly automated but I did fix a few things by hand.

Help is always appreciated if someone wants to do an analysis
of one of the directories I listed above and see what can be
changed.

Thanks.

--joel

Joel Sherrill (26):
  cpukit/libdl/rtl-alloc-check.py: Change to BSD-2 by hand
  cpukit/libdl Change license to BSD-2
  cpukit/libdrvmsg: Change license to BSD-2
  cpukit/libfs/src/defaults: Change license to BSD-2
  cpukit/libdl: Manual file header reordering (SPDX, Doxygen, Copyright)
  cpukit/libfs/src/imfs: Change license to BSD-2
  cpukit/libds/src/ftpfs/tftpDriver.c: Manually update license to BSD-2
  cpukit/libfs/src/rfs: Change license to BSD-2
  cpukit/libgnat: Change license to BSD-2.
  cpukit/libpci: Change license to BSD-2
  cpukit/libtest: Change license to BSD-2
  cpukit/libmisc/bspcmdline: Change license to BSD-2
  cpukit/capture: Change license to BSD-2
  cpukit/libmisc/capture: Manually change license to BSD-2
  cpukit/libmisc/cpuuse: Change license to BSD-2
  cpukit/libmisc/devnull/devzero.c: Change license to BSD-2
  cpukit/libmisc/dummy: Change license to BSD-2.
  cpukit/libmisc/dumpbuf: Change license to BSD-2
  cpukit/libmisc/fsmount: Change license to BSD-2.
  cpukit/libmisc/fsmount/fsmount.c: Manual header clean up
  cpukit/libmisc/mouse: Change license to BSD-2
  cpukit/libmisc/redirector: Manually change license to BSD-2
  cpukit/libmisc/rtems-fdt: Change license to BSD-2
  cpukit/libmisc/serdbg: Change to BSD-2
  cpukit/libmisc/check: Change license to BSD-2
  cpukit/libmisc/untar: Change license to BSD-2

 cpukit/libdl/dlfcn-shell.c| 34 ---
 cpukit/libdl/dlfcn.c  | 34 ---
 cpukit/libdl/rap-shell.c  | 34 ---
 cpukit/libdl/rap.c| 34 ---
 cpukit/libdl/rtl-alloc-check.py   | 30 +++---
 cpukit/libdl/rtl-alloc-heap.c | 34 ---
 cpukit/libdl/rtl-alloc-heap.h | 34 ---
 cpukit/libdl/rtl-allocator.c  | 34 ---
 cpukit/libdl/rtl-archive.c| 34 ---
 cpukit/libdl/rtl-bit-alloc.c  | 34 ---
 cpukit/libdl/rtl-bit-alloc.h  | 34 ---
 cpukit/libdl/rtl-chain-iterator.c | 34 ---
 cpukit/libdl/rtl-chain-iterator.h | 34 ---
 cpukit/libdl/rtl-debugger.c   | 34 ---
 cpukit/libdl/rtl-elf.c| 34 ---
 cpukit/libdl/rtl-elf.h| 34 ---
 cpukit/libdl/rtl-error.c  | 34 ---
 cpukit/libdl/rtl-error.h  | 34 ---
 cpukit/libdl/rtl-find-file.c  | 34 ---
 cpukit/libdl/rtl-find-file.h  | 34 ---
 cpukit/libdl/rtl-obj-cache.c  | 34 ---
 cpukit/libdl/rtl-obj-comp.c   | 34 ---
 cpukit/libdl/rtl-obj.c| 34 ---
 cpukit/libdl/rtl-rap.c| 34 ---
 cpukit/libdl/rtl-rap.h| 34 ---
 cpukit/libdl/rtl-shell.c  | 34 ---
 cpukit/libdl/rtl-string.c | 34 ---
 cpukit/libdl/rtl-string.h | 34 ---
 cpukit/libdl/rtl-sym.c| 34 ---
 cpukit/libdl/rtl-trace.c  | 34 ---
 cpukit/libdl/rtl-trampoline.h | 34 ---
 cpukit/libdl/rtl-unresolved.c | 34 ---
 cpukit/libdl/rtl-unwind-dw2.c | 34 ---
 cpukit/libdl/rtl-unwind-dw2.h | 34 ---
 cpukit/libdl/rtl-unwind.h | 34 ---
 cpukit/libdl/rtl.c| 34 ---
 cpukit/libdrvmgr/drvmgr.c | 25 +++-
 cpukit/libdrvmgr/drvmgr_by_id.c   | 25 +++-
 cpukit/libdrvmgr/drvmgr_by_name.c | 25 +++-
 

[PATCH] rtems-docs: add example booting aarch64 image on Xilinx ZCU102

2022-03-18 Thread Alan Cudmore
This patch is for the rtems-docs repo. I added details on the procedure I
used to boot RTEMS images on the Xilinx ZCU102 board. I applied this patch,
and  generated the HTML docs, and everything looks ok to me.
Thanks,
Alan

---
 user/bsps/aarch64/xilinx-zynqmp.rst | 138 
 1 file changed, 138 insertions(+)

diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst
b/user/bsps/aarch64/xilinx-zynqmp.rst
index ca232de..3d55c4c 100644
--- a/user/bsps/aarch64/xilinx-zynqmp.rst
+++ b/user/bsps/aarch64/xilinx-zynqmp.rst
@@ -44,6 +44,144 @@ When booting via u-boot, RTEMS must be packaged into a
u-boot image or booted
 as a raw binary since u-boot does not currently support ELF64 which is
required
 for AArch64 ELF binaries.

+
+Example: Booting a RTEMS image on the ZCU102 ZynqMP board
+-
+
+This example will walk through the steps needed for booting RTEMS from a
SD card on the
+`ZCU102 ZynqMP board. <
https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html>`_ The
reference for setting up a SD card and obtaining pre-built boot images is
`here. <
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841858/Board+bring+up+using+pre-built+images
>`_
+
+Hardware Setup
+^^
+
+Set the dip switch SW6 according to the table below. This will allow the
board to boot from the SD card. Connect a Micro-USB cable to the USB UART
interface J83. This is a quad USB UART interface which will show up on the
development host computer as four different serial or tty devices. Use the
first channel for the console UART. It should be set to 115k baud.
+
++---+
+| Dip Switch JW6|
++--+--+--+--+
+|  ON  |  OFF |  OFF |  OFF |
++--+--+--+--+
+
+Prepare a SD card with a bootable partition
+
+
+The goal is to have a bootable SD card with a partition that is formatted
with the FAT file system. The file system will contain the boot artifacts
including BOOT.bin and the u-boot image. The RTEMS image will be placed on
this volume. To create the bootable SD card, follow the directions `here. <
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842385/How+to+format+SD+card+for+SD+boot
>`_
+
+Once you have the card formatted correctly, you need to place the files
from `this archive <
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/2202763266/2021.2+Release#Downloads>`_
on the FAT partition. The following file was used for this example:
`xilinx-vck190-v2021.2-final.bsp <
https://www.xilinx.com/member/forms/download/xef.html?filename=xilinx-vck190-v2021.2-final.bsp
>`_
+
+In order to download these files, you need to have a Xilinx account login.
As an alternative, you can download a bootable image for Ubuntu 20.04 and
write it to an SD card using a utility such as `Balena Etcher <
https://www.balena.io/etcher>`_  or dd. The Ubuntu image is available
`here. `_ Download the image for the
Zynq Ultrascale+ MPSoC Development boards, uncompress it and write it to
the SD card. This image creates multiple partitions, but we only need to
use the FAT partition with the boot artifacts on it.
+
+Verify that the board can boot from the SD card
+^^^
+
+It is worth booting the board from the SD card before trying to boot
RTEMS. Insert the card and power on the board. You should see the messages
on the first console indicating the various boot loader stages and
eventually the Linux kernel. The goal is to interrupt u-boot when given the
chance to access the u-boot command prompt.
+
+Build RTEMS with examples
+^
+
+Build the RTEMS `xilinx-zynqmp-lp64-zu3eg` BSP. Use the ticker.exe sample
which can be found in the directory:
+
+.. code-block:: shell
+
+  build/aarch64/xilinx-zynqmp-lp64-zu3eg/testsuites/samples
+
+Prepare the RTEMS image
+^^^
+
+Prepare your RTEMS image to boot from u-boot with the following commands:
+
+.. code-block:: shell
+
+  $ aarch64-rtems6-objcopy -Obinary ticker.exe ticker.bin
+  $ gzip -9 ticker.bin
+  $ mkimage -A arm64 -O rtems -T kernel -a 0x1000 -e 0x1000 -n
RTEMS -d ticker.bin.gz rtems.img
+
+Boot the RTEMS image
+
+Copy the prepared RTEMS image to the SD card and insert the SD crd in the
ZCU102 board. Power on the board.
+When you see the prompt on the console to interupt u-boot, hit a key to
bring up the u-boot command prompt. On the u-boot command prompt you can
boot your RTEMS image:
+
+.. code-block:: shell
+
+  Zynq-MP> fatload mmc 0:1 0x1000 rtems.img
+  Zynq-MP> bootm 0x1000
+
+This is the entire boot sequence:
+
+.. code-block:: shell
+
+  Pre-FSBL boot Started
+  Xilinx Zynq MP First Stage Boot Loader
+  Release 2020.2   Nov 18 2020  -  11:46:01
+  NOTICE:  ATF running on XCZU9EG/silicon v1/RTL5.1 at 0xfffea000
+  NOTICE:  BL31: 

Re: [PATCH] GDB: Prefer Python 3 over 2

2022-03-18 Thread Sebastian Huber

On 17/03/2022 12:51, Sebastian Huber wrote:

This fixes the build of a recent GDB version:

gdb/python/py-micmd.c: In function 'int 
micmdpy_uninstall_command(micmdpy_object*)':
gdb/python/py-micmd.c:430:20: error: 'PyDict_GetItemWithError' was not declared 
in this scope
PyObject *curr = PyDict_GetItemWithError (mi_cmd_dict.get (),
 ^~~


I was able to build the latest GDB with this patch. Otherwise all 
architectures failed with the above error.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 00/13] Refactor Arm GICv3 support

2022-03-18 Thread Sebastian Huber

On 18/03/2022 14:20, Kinsey Moore wrote:

These changes look good other than the nit in the first patch.


Thanks for the review. I will check it in once I am able to build an up 
to date tool chain. Currently, if one tool chain bug is fixed another 
one shows up.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH rtems-docs] microblaze: Document BSPs and update CPU supplement

2022-03-18 Thread Alex White
---
 cpu-supplement/xilinx_microblaze.rst |  52 +-
 user/bsps/bsps-microblaze.rst| 149 ++-
 2 files changed, 197 insertions(+), 4 deletions(-)

diff --git a/cpu-supplement/xilinx_microblaze.rst 
b/cpu-supplement/xilinx_microblaze.rst
index 2a92b61..350aeff 100644
--- a/cpu-supplement/xilinx_microblaze.rst
+++ b/cpu-supplement/xilinx_microblaze.rst
@@ -1,10 +1,58 @@
 .. SPDX-License-Identifier: CC-BY-SA-4.0
 
-.. Copyright (C) 1988, 2002 On-Line Applications Research Corporation (OAR)
+.. Copyright (C) 2022 On-Line Applications Research Corporation (OAR)
 
 Xilinx MicroBlaze Specific Information
 **
 
+This chapter discusses the dependencies of the *MicroBlaze architecture*
+(https://en.wikipedia.org/wiki/MicroBlaze).
+
+**Architecture Documents**
+
+For information on the MicroBlaze architecture, refer to
+*UG984 MicroBlaze Processor Reference Guide*
+(https://www.xilinx.com/support/documentation/sw_manuals/xilinx2021_2/ug984-vivado-microblaze-ref.pdf).
+
+CPU Model Dependent Features
+
+
+There are no CPU model dependent features in this port.
+
+Calling Conventions
+===
+
+Please refer to "Chapter 4: MicroBlaze Application Binary Interface" of
+*UG984 MicroBlaze Processor Reference Guide*
+(https://www.xilinx.com/support/documentation/sw_manuals/xilinx2021_2/ug984-vivado-microblaze-ref.pdf).
+
+Interrupt Processing
+
+
+Hardware exceptions, interrupts, and user exceptions are all supported. When a
+hardware exception or user exception occurs, a fatal error will be generated.
+When an interrupt occurs, the interrupt source is determined by reading the
+AXI Interrupt Controller's Interrupt Status Register and masking it with the
+Interrupt Enable Register.
+
+Interrupt Levels
+
+
+There are exactly two interrupt levels on MicroBlaze with respect to RTEMS.
+Level zero corresponds to interrupts disabled. Level one corresponds to
+interrupts enabled. This is the inverse of how most other architectures handle
+interrupt enable status.
+
+Interrupt Stack
+---
+
+The memory region for the interrupt stack is defined by the BSP.
+
+Default Fatal Error Processing
+==
+
+The default fatal error is BSP-specific.
+
 Symmetric Multiprocessing
 =
 
@@ -13,4 +61,4 @@ SMP is not supported.
 Thread-Local Storage
 
 
-Thread-local storage is not implemented.
+Thread-local storage is supported.
diff --git a/user/bsps/bsps-microblaze.rst b/user/bsps/bsps-microblaze.rst
index dbb574f..e20df53 100644
--- a/user/bsps/bsps-microblaze.rst
+++ b/user/bsps/bsps-microblaze.rst
@@ -1,8 +1,153 @@
 .. SPDX-License-Identifier: CC-BY-SA-4.0
 
 .. Copyright (C) 2018 embedded brains GmbH
+.. Copyright (C) 2022 On-Line Applications Research Corporation (OAR)
 
-microblaze (Microblaze)
+microblaze (MicroBlaze)
 ***
 
-There are no Microblaze BSPs yet.
+KCU105 QEMU
+===
+
+The basic hardware initialization is performed by the BSP. This BSP supports 
the
+QEMU emulated Xilinx AXI Interrupt Controller v4.1.
+
+Boot via ELF
+
+
+The executable image is booted by QEMU in ELF format.
+
+Clock Driver
+
+
+The clock driver supports the QEMU emulated Xilinx AXI Timer v2.0. It is
+implemented as a simple downcounter.
+
+Console Driver
+--
+
+The console driver supports the QEMU emulated Xilinx AXI UART Lite v2.0. It is
+initialized to a baud rate of 115200.
+
+Network Driver
+--
+
+Support for networking is provided by the libbsd library. Network interface
+configuration is extracted from the device tree binary which, by default, is
+in ` 
`_.
+The device tree source for the default device tree is at `dts/system.dts 
`_.
+
+To replace the default device tree with your own, assuming 
``my_device_tree.dts``
+is the name of your device tree source file, first you must convert your device
+tree to .dtb format.
+
+.. code-block:: none
+
+  $ dtc -I dts -O dtb my_device_tree.dts > my_device_tree.dtb
+
+The device tree blob, ``my_device_tree.dtb``, can now be converted to a C file.
+The name ``system_dtb`` is significant as it is the name expected by the BSP.
+
+.. code-block:: none
+
+  $ rtems-bin2c -C -A 8 -N system_dtb my_device_tree.dtb my_dtb
+
+The ``BSP_MICROBLAZE_FPGA_DTB_HEADER_PATH`` BSP configuration option can then 
be
+set to the path of the resulting source file, ``my_dtb.c``, to include it in 
the
+BSP build.
+
+.. code-block:: none
+
+  BSP_MICROBLAZE_FPGA_DTB_HEADER_PATH = /path/to/my_dtb.c
+
+
+Running Executables
+---
+
+A .dtb (device tree blob) file should be provided to QEMU via the ``-hw-dtb``
+option. In the example command below, the 

[PATCH] thread.hpp: Fix redefinition of default argument

2022-03-18 Thread Sebastian Huber
A default argument shall be defined only once.

Close #4632.
---
 cpukit/include/rtems/thread.hpp | 32 ++--
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/cpukit/include/rtems/thread.hpp b/cpukit/include/rtems/thread.hpp
index cdef690740..56e301c0bc 100644
--- a/cpukit/include/rtems/thread.hpp
+++ b/cpukit/include/rtems/thread.hpp
@@ -220,6 +220,12 @@ namespace rtems
   /* affinity, cpu set size is? */
 };
 
+template 
+inline typename std::decay::type
+decay_copy(T&& t) {
+  return std::forward(t);
+}
+
 /**
  * @brief Create a thread with thread attributes.
  *
@@ -310,7 +316,14 @@ namespace rtems
*/
   template >
-  explicit thread(A&& attr, F&& func, Args&&... args);
+  explicit thread(A&& attr, F&& func, Args&&... args)
+: id_(0) {
+start_thread(
+  make_state(attr,
+ make_invoker(decay_copy(std::forward(func)),
+  decay_copy(std::forward(args))...))
+);
+  }
 
   /**
* Move the thread id to this instance.
@@ -428,12 +441,6 @@ namespace rtems
   void start_thread(state_ptr s);
 };
 
-template 
-inline typename std::decay::type
-decay_copy(T&& t) {
-  return std::forward(t);
-}
-
 template
 thread::thread(F&& func, Args&&... args)
   : id_(0)  {
@@ -445,17 +452,6 @@ namespace rtems
   );
 }
 
-template>
-thread::thread(A&& attr, F&& func, Args&&... args)
-  : id_(0) {
-  start_thread(
-make_state(attr,
-   make_invoker(decay_copy(std::forward(func)),
-decay_copy(std::forward(args))...))
-  );
-}
-
 inline std::thread::id thread::get_id() const noexcept {
   return std::thread::id(id_.id_);
 }
-- 
2.34.1

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


Re: [PATCH 00/13] Refactor Arm GICv3 support

2022-03-18 Thread Kinsey Moore

These changes look good other than the nit in the first patch.

On 3/18/2022 02:19, Sebastian Huber wrote:

Separate the Interrupt Manager implementation from the generic Arm GICv3
support.  Move parts of the Arm GICv3 support into a new header file.  This
helps to support systems with a clustered structure in which multiple GICv3
instances are present.  For example, two clusters of two Cortex-R52 cores where
each cluster has a dededicated GICv3 instance.

Sebastian Huber (13):
   bsps: Add 
   bsps: Add gicv3_sgi_ppi_is_pending()
   bsps: Add gicv3_trigger_sgi()
   bsps: Add gicv3_ppi_set_pending()
   bsps: Add gicv3_ppi_clear_pending()
   bsps: Add gicv3_sgi_ppi_is_enabled()
   bsps: Add gicv3_sgi_ppi_enable()
   bsps: Add gicv3_sgi_ppi_disable()
   bsps: Move gicv3_init_dist()
   bsps: Move gicv3_init_cpu_interface()
   bsps: Add gicv3_sgi_ppi_set_priority()
   bsps: Add gicv3_sgi_ppi_get_priority()
   bsps: Add gicv3_get_attributes()

  bsps/include/dev/irq/arm-gicv3.h | 366 +++
  bsps/shared/dev/irq/arm-gicv3.c  | 286 ++--
  spec/build/bsps/aarch64/grp.yml  |   1 +
  spec/build/bsps/arm/grp.yml  |   1 +
  4 files changed, 389 insertions(+), 265 deletions(-)
  create mode 100644 bsps/include/dev/irq/arm-gicv3.h


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


Re: [PATCH 01/13] bsps: Add

2022-03-18 Thread Kinsey Moore

Nit in the commit message: "dededicated"

On 3/18/2022 02:19, Sebastian Huber wrote:

Separate the Interrupt Manager implementation from the generic Arm GICv3
support.  Move parts of the Arm GICv3 support into a new header file.  This
helps to support systems with a clustered structure in which multiple GICv3
instances are present.  For example, two clusters of two Cortex-R52 cores where
each cluster has a dededicated GICv3 instance.
---
  bsps/include/dev/irq/arm-gicv3.h | 162 +++
  bsps/shared/dev/irq/arm-gicv3.c  | 122 +--
  spec/build/bsps/aarch64/grp.yml  |   1 +
  spec/build/bsps/arm/grp.yml  |   1 +
  4 files changed, 165 insertions(+), 121 deletions(-)
  create mode 100644 bsps/include/dev/irq/arm-gicv3.h

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
new file mode 100644
index 00..60bc315962
--- /dev/null
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -0,0 +1,162 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup arm_gic
+ *
+ * @brief This header file contains interfaces to access an Arm GICv3.
+ */
+
+/*
+ * Copyright (C) 2019 On-Line Applications Research Corporation (OAR)
+ *
+ * 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 _RTEMS_DEV_IRQ_ARM_GICV3_H
+#define _RTEMS_DEV_IRQ_ARM_GICV3_H
+
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PRIORITY_DEFAULT 127
+
+#define MPIDR_AFFINITY2(val) BSP_FLD64(val, 16, 23)
+#define MPIDR_AFFINITY2_GET(reg) BSP_FLD64GET(reg, 16, 23)
+#define MPIDR_AFFINITY2_SET(reg, val) BSP_FLD64SET(reg, val, 16, 23)
+#define MPIDR_AFFINITY1(val) BSP_FLD64(val, 8, 15)
+#define MPIDR_AFFINITY1_GET(reg) BSP_FLD64GET(reg, 8, 15)
+#define MPIDR_AFFINITY1_SET(reg, val) BSP_FLD64SET(reg, val, 8, 15)
+#define MPIDR_AFFINITY0(val) BSP_FLD64(val, 0, 7)
+#define MPIDR_AFFINITY0_GET(reg) BSP_FLD64GET(reg, 0, 7)
+#define MPIDR_AFFINITY0_SET(reg, val) BSP_FLD64SET(reg, val, 0, 7)
+
+#define ICC_SGIR_AFFINITY3(val) BSP_FLD64(val, 48, 55)
+#define ICC_SGIR_AFFINITY3_GET(reg) BSP_FLD64GET(reg, 48, 55)
+#define ICC_SGIR_AFFINITY3_SET(reg, val) BSP_FLD64SET(reg, val, 48, 55)
+#define ICC_SGIR_IRM BSP_BIT32(40)
+#define ICC_SGIR_AFFINITY2(val) BSP_FLD64(val, 32, 39)
+#define ICC_SGIR_AFFINITY2_GET(reg) BSP_FLD64GET(reg, 32, 39)
+#define ICC_SGIR_AFFINITY2_SET(reg, val) BSP_FLD64SET(reg, val, 32, 39)
+#define ICC_SGIR_INTID(val) BSP_FLD64(val, 24, 27)
+#define ICC_SGIR_INTID_GET(reg) BSP_FLD64GET(reg, 24, 27)
+#define ICC_SGIR_INTID_SET(reg, val) BSP_FLD64SET(reg, val, 24, 27)
+#define ICC_SGIR_AFFINITY1(val) BSP_FLD64(val, 16, 23)
+#define ICC_SGIR_AFFINITY1_GET(reg) BSP_FLD64GET(reg, 16, 23)
+#define ICC_SGIR_AFFINITY1_SET(reg, val) BSP_FLD64SET(reg, val, 16, 23)
+#define ICC_SGIR_CPU_TARGET_LIST(val) BSP_FLD64(val, 0, 15)
+#define ICC_SGIR_CPU_TARGET_LIST_GET(reg) BSP_FLD64GET(reg, 0, 15)
+#define ICC_SGIR_CPU_TARGET_LIST_SET(reg, val) BSP_FLD64SET(reg, val, 0, 15)
+
+#ifdef ARM_MULTILIB_ARCH_V4
+/* cpuif->iccicr */
+#define ICC_CTLR"p15, 0, %0, c12, c12, 4"
+
+/* cpuif->iccpmr */
+#define ICC_PMR "p15, 0, %0,  c4,  c6, 0"
+
+/* cpuif->iccbpr */
+#define ICC_BPR0"p15, 0, %0, c12,  c8, 3"
+#define ICC_BPR1"p15, 0, %0, c12, c12, 3"
+
+/* cpuif->icciar */
+#define ICC_IAR0"p15, 0, %0, c12,  c8, 0"
+#define ICC_IAR1"p15, 0, %0, c12, c12, 0"
+
+/* cpuif->icceoir */
+#define ICC_EOIR0   "p15, 0, %0, c12,  c8, 1"
+#define ICC_EOIR1   "p15, 0, %0, c12, c12, 1"
+
+#define ICC_SRE "p15, 0, %0, c12, c12, 5"
+
+#define ICC_IGRPEN0 "p15, 0, %0, c12, c12, 6"
+#define ICC_IGRPEN1 "p15, 0, %0, c12, c12, 7"
+
+#define MPIDR   "p15, 0, %0, c0, c0, 5"
+
+#define 

Re: nfsclient rtems6 rtems-libbsd

2022-03-18 Thread Heinz Junkes
In the case of the option "nfsv4,minorversion=1" I get an 

error 2 (No such file or directory) from

error = kernel_mount(args->ma, MNT_VERIFIED);

in file ./rtemsbsd/fs/nfsclient/nfs.c


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



> On 16. Mar 2022, at 16:00, Heinz Junkes  wrote:
> 
> Hello,
> 
> I am trying the nfs-client with rtems6 and rtems-libbsd.
> (on BSP “beatnik”)
> 
> I have not analyzed everything yet.
> I just wanted to ask if, and how, someone has already managed it?
> 
> When I call mount_and_make_target_path().
> 
>rval = mount_and_make_target_path(dev, mntpoint,
>  RTEMS_FILESYSTEM_TYPE_NFS, RTEMS_FILESYSTEM_READ_WRITE,
>  mount_options);
> 
> and take as mount_options "nfsv2" comes this:
> 
> Mount 141.14.131.192:/Volume on /Volume
> nfs: mount: nfs -> 141.14.131.192:/Volume (nfsv2)
> nfs: mount: [tcp] 141.14.131.192:/Volume: RPCPROG_NFS: RPC: Port mapper 
> failure - RPC: Server can't decode arguments
> 
> as mount_options "nfs3" comes that:
> 
> Mount 141.14.131.192:/Volume on /Volume
> nfs: mount: nfs -> 141.14.131.192:/Volume (nfsv3)
> nfs: mount: [tcp] 141.14.131.192:/Volume: RPCPROG_NFS: RPC: Port mapper 
> failure - RPC: Server can't decode arguments
> mount: 5: I/O error
> 
> as mount_options "nfsv4,minorversion=1" comes that:
> 
> Mount 141.14.131.192:/Volume on /Volume
> nfs: mount: nfs -> 141.14.131.192:/Volume (nfsv4,minorversion=1)
> nfs: mount args: 8
>  16 addr=10 02 08 01 8d 0e 83 c0 00 00 00 00 00 00 00 00
>   0 nfsv4
>   8 dirpath=/Volume
>   4 fstype=nfs
>   7 fspath=Volume
>  23 hostname=141.14.131.192:/Volume
>   0 rw
>   2 minorversion=1
> nfs: mount: (2) No such file or directory
> mount: 2: No such file or directory
> 
> Is it generally the case that the nfs cannot mount a subdir with the 
> rtems-libbsd?
> i.e.
> Mount 141.14.131.192:/Volumes/Epics on /Volumes/Epics
> 
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
> 
> 
> 
> ___
> 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

[PATCH 11/13] bsps: Add gicv3_sgi_ppi_set_priority()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 11 +++
 bsps/shared/dev/irq/arm-gicv3.c  |  8 +---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 73ad05a507..6f1d5254cc 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -191,6 +191,17 @@ static inline bool gicv3_sgi_ppi_is_enabled(
   return (sgi_ppi->icspiser[0] & (1U << vector)) != 0;
 }
 
+static inline void gicv3_sgi_ppi_set_priority(
+  rtems_vector_number vector,
+  uint8_t priority,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  sgi_ppi->icspiprior[vector] = priority;
+}
+
 static inline bool gicv3_sgi_ppi_is_pending(
   rtems_vector_number vector,
   uint32_tcpu_index
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index a34e2872e5..096864a35e 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -230,9 +230,11 @@ rtems_status_code arm_gic_irq_set_priority(
   volatile gic_dist *dist = ARM_GIC_DIST;
   gic_id_set_priority(dist, vector, priority);
 } else {
-  volatile gic_sgi_ppi *sgi_ppi =
-gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-  sgi_ppi->icspiprior[vector] = priority;
+  gicv3_sgi_ppi_set_priority(
+vector,
+priority,
+_SMP_Get_current_processor()
+  );
 }
   } else {
 sc = RTEMS_INVALID_ID;
-- 
2.34.1

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


[PATCH 12/13] bsps: Add gicv3_sgi_ppi_get_priority()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 10 ++
 bsps/shared/dev/irq/arm-gicv3.c  |  7 ---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 6f1d5254cc..6a716894b4 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -202,6 +202,16 @@ static inline void gicv3_sgi_ppi_set_priority(
   sgi_ppi->icspiprior[vector] = priority;
 }
 
+static inline uint8_t gicv3_sgi_ppi_get_priority(
+  rtems_vector_number vector,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  return sgi_ppi->icspiprior[vector];
+}
+
 static inline bool gicv3_sgi_ppi_is_pending(
   rtems_vector_number vector,
   uint32_tcpu_index
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 096864a35e..d81f3b50c1 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -255,9 +255,10 @@ rtems_status_code arm_gic_irq_get_priority(
   volatile gic_dist *dist = ARM_GIC_DIST;
   *priority = gic_id_get_priority(dist, vector);
 } else {
-  volatile gic_sgi_ppi *sgi_ppi =
-gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-  *priority = sgi_ppi->icspiprior[vector];
+  *priority = gicv3_sgi_ppi_get_priority(
+vector,
+_SMP_Get_current_processor()
+  );
 }
   } else {
 sc = RTEMS_INVALID_ID;
-- 
2.34.1

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


[PATCH 10/13] bsps: Move gicv3_init_cpu_interface()

2022-03-18 Thread Sebastian Huber
Make the processor index a parameter.
---
 bsps/include/dev/irq/arm-gicv3.h | 27 +++
 bsps/shared/dev/irq/arm-gicv3.c  | 32 ++--
 2 files changed, 29 insertions(+), 30 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index de15b5cc81..73ad05a507 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -279,6 +279,33 @@ static void gicv3_init_dist(volatile gic_dist *dist)
   }
 }
 
+static void gicv3_init_cpu_interface(uint32_t cpu_index)
+{
+  uint32_t sre_value = 0x7;
+  WRITE_SR(ICC_SRE, sre_value);
+  WRITE_SR(ICC_PMR, GIC_CPUIF_ICCPMR_PRIORITY(0xff));
+  WRITE_SR(ICC_BPR0, GIC_CPUIF_ICCBPR_BINARY_POINT(0x0));
+
+  volatile gic_redist *redist = gicv3_get_redist(cpu_index);
+  uint32_t waker = redist->icrwaker;
+  uint32_t waker_mask = GIC_REDIST_ICRWAKER_PROCESSOR_SLEEP;
+  waker &= ~waker_mask;
+  redist->icrwaker = waker;
+
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+  /* Set G1NS */
+  sgi_ppi->icspigrpr[0] = 0x;
+  sgi_ppi->icspigrpmodr[0] = 0;
+  for (int id = 0; id < 32; id++) {
+sgi_ppi->icspiprior[id] = PRIORITY_DEFAULT;
+  }
+
+  /* Enable interrupt groups 0 and 1 */
+  WRITE_SR(ICC_IGRPEN0, 0x1);
+  WRITE_SR(ICC_IGRPEN1, 0x1);
+  WRITE_SR(ICC_CTLR, 0x0);
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 29ef2bb1a3..a34e2872e5 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -198,39 +198,11 @@ rtems_status_code 
bsp_interrupt_vector_disable(rtems_vector_number vector)
   return RTEMS_SUCCESSFUL;
 }
 
-static void gicv3_init_cpu_interface(void)
-{
-  uint32_t cpu_index = _SMP_Get_current_processor();
-  uint32_t sre_value = 0x7;
-  WRITE_SR(ICC_SRE, sre_value);
-  WRITE_SR(ICC_PMR, GIC_CPUIF_ICCPMR_PRIORITY(0xff));
-  WRITE_SR(ICC_BPR0, GIC_CPUIF_ICCBPR_BINARY_POINT(0x0));
-
-  volatile gic_redist *redist = gicv3_get_redist(cpu_index);
-  uint32_t waker = redist->icrwaker;
-  uint32_t waker_mask = GIC_REDIST_ICRWAKER_PROCESSOR_SLEEP;
-  waker &= ~waker_mask;
-  redist->icrwaker = waker;
-
-  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
-  /* Set G1NS */
-  sgi_ppi->icspigrpr[0] = 0x;
-  sgi_ppi->icspigrpmodr[0] = 0;
-  for (int id = 0; id < 32; id++) {
-sgi_ppi->icspiprior[id] = PRIORITY_DEFAULT;
-  }
-
-  /* Enable interrupt groups 0 and 1 */
-  WRITE_SR(ICC_IGRPEN0, 0x1);
-  WRITE_SR(ICC_IGRPEN1, 0x1);
-  WRITE_SR(ICC_CTLR, 0x0);
-}
-
 void bsp_interrupt_facility_initialize(void)
 {
   arm_interrupt_facility_set_exception_handler();
   gicv3_init_dist(ARM_GIC_DIST);
-  gicv3_init_cpu_interface();
+  gicv3_init_cpu_interface(_SMP_Get_current_processor());
 }
 
 #ifdef RTEMS_SMP
@@ -242,7 +214,7 @@ BSP_START_TEXT_SECTION void 
arm_gic_irq_initialize_secondary_cpu(void)
 /* Wait */
   }
 
-  gicv3_init_cpu_interface();
+  gicv3_init_cpu_interface(_SMP_Get_current_processor());
 }
 #endif
 
-- 
2.34.1

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


[PATCH 09/13] bsps: Move gicv3_init_dist()

2022-03-18 Thread Sebastian Huber
Make the distributor register block a parameter.
---
 bsps/include/dev/irq/arm-gicv3.h | 37 +
 bsps/shared/dev/irq/arm-gicv3.c  | 40 +---
 2 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 37e0d433cc..de15b5cc81 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -242,6 +242,43 @@ static inline void gicv3_trigger_sgi(
   WRITE64_SR(ICC_SGI1, value);
 }
 
+static inline uint32_t gicv3_get_id_count(volatile gic_dist *dist)
+{
+  uint32_t id_count = GIC_DIST_ICDICTR_IT_LINES_NUMBER_GET(dist->icdictr);
+
+  id_count = 32 * (id_count + 1);
+  id_count = id_count <= 1020 ? id_count : 1020;
+
+  return id_count;
+}
+
+static void gicv3_init_dist(volatile gic_dist *dist)
+{
+  uint32_t id_count = gicv3_get_id_count(dist);
+  uint32_t id;
+
+  dist->icddcr = GIC_DIST_ICDDCR_ARE_NS | GIC_DIST_ICDDCR_ARE_S
+   | GIC_DIST_ICDDCR_ENABLE_GRP1S | GIC_DIST_ICDDCR_ENABLE_GRP1NS
+   | GIC_DIST_ICDDCR_ENABLE_GRP0;
+
+  for (id = 0; id < id_count; id += 32) {
+/* Disable all interrupts */
+dist->icdicer[id / 32] = 0x;
+
+/* Set G1NS */
+dist->icdigr[id / 32] = 0x;
+dist->icdigmr[id / 32] = 0;
+  }
+
+  for (id = 0; id < id_count; ++id) {
+gic_id_set_priority(dist, id, PRIORITY_DEFAULT);
+  }
+
+  for (id = 32; id < id_count; ++id) {
+gic_id_set_targets(dist, id, 0x01);
+  }
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 6c623f0ccb..29ef2bb1a3 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -198,44 +198,6 @@ rtems_status_code 
bsp_interrupt_vector_disable(rtems_vector_number vector)
   return RTEMS_SUCCESSFUL;
 }
 
-static inline uint32_t get_id_count(volatile gic_dist *dist)
-{
-  uint32_t id_count = GIC_DIST_ICDICTR_IT_LINES_NUMBER_GET(dist->icdictr);
-
-  id_count = 32 * (id_count + 1);
-  id_count = id_count <= 1020 ? id_count : 1020;
-
-  return id_count;
-}
-
-static void gicv3_init_dist(void)
-{
-  volatile gic_dist *dist = ARM_GIC_DIST;
-  uint32_t id_count = get_id_count(dist);
-  uint32_t id;
-
-  dist->icddcr = GIC_DIST_ICDDCR_ARE_NS | GIC_DIST_ICDDCR_ARE_S
-   | GIC_DIST_ICDDCR_ENABLE_GRP1S | GIC_DIST_ICDDCR_ENABLE_GRP1NS
-   | GIC_DIST_ICDDCR_ENABLE_GRP0;
-
-  for (id = 0; id < id_count; id += 32) {
-/* Disable all interrupts */
-dist->icdicer[id / 32] = 0x;
-
-/* Set G1NS */
-dist->icdigr[id / 32] = 0x;
-dist->icdigmr[id / 32] = 0;
-  }
-
-  for (id = 0; id < id_count; ++id) {
-gic_id_set_priority(dist, id, PRIORITY_DEFAULT);
-  }
-
-  for (id = 32; id < id_count; ++id) {
-gic_id_set_targets(dist, id, 0x01);
-  }
-}
-
 static void gicv3_init_cpu_interface(void)
 {
   uint32_t cpu_index = _SMP_Get_current_processor();
@@ -267,7 +229,7 @@ static void gicv3_init_cpu_interface(void)
 void bsp_interrupt_facility_initialize(void)
 {
   arm_interrupt_facility_set_exception_handler();
-  gicv3_init_dist();
+  gicv3_init_dist(ARM_GIC_DIST);
   gicv3_init_cpu_interface();
 }
 
-- 
2.34.1

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


[PATCH 08/13] bsps: Add gicv3_sgi_ppi_disable()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 10 ++
 bsps/shared/dev/irq/arm-gicv3.c  |  5 +
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index effa7a8ffb..37e0d433cc 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -171,6 +171,16 @@ static inline void gicv3_sgi_ppi_enable(
   sgi_ppi->icspiser[0] = 1U << vector;
 }
 
+static inline void gicv3_sgi_ppi_disable(
+  rtems_vector_number vector,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  sgi_ppi->icspicer[0] = 1U << vector;
+}
+
 static inline bool gicv3_sgi_ppi_is_enabled(
   rtems_vector_number vector,
   uint32_tcpu_index
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index c71a9f15ab..6c623f0ccb 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -192,10 +192,7 @@ rtems_status_code 
bsp_interrupt_vector_disable(rtems_vector_number vector)
 
 gic_id_disable(dist, vector);
   } else {
-volatile gic_sgi_ppi *sgi_ppi =
-  gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-
-sgi_ppi->icspicer[0] = 1U << vector;
+gicv3_sgi_ppi_disable(vector, _SMP_Get_current_processor());
   }
 
   return RTEMS_SUCCESSFUL;
-- 
2.34.1

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


[PATCH 07/13] bsps: Add gicv3_sgi_ppi_enable()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 15 +++
 bsps/shared/dev/irq/arm-gicv3.c  | 10 +-
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 8bfa34c11e..effa7a8ffb 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -156,6 +156,21 @@ static inline volatile gic_sgi_ppi 
*gicv3_get_sgi_ppi(uint32_t cpu_index)
 ((uintptr_t)BSP_ARM_GIC_REDIST_BASE + cpu_index * 0x2 + 0x1);
 }
 
+static inline void gicv3_sgi_ppi_enable(
+  rtems_vector_number vector,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  /* Set G1NS */
+  sgi_ppi->icspigrpr[0] |= 1U << vector;
+  sgi_ppi->icspigrpmodr[0] &= ~(1U << vector);
+
+  /* Set enable */
+  sgi_ppi->icspiser[0] = 1U << vector;
+}
+
 static inline bool gicv3_sgi_ppi_is_enabled(
   rtems_vector_number vector,
   uint32_tcpu_index
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index bd0582b863..c71a9f15ab 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -177,15 +177,7 @@ rtems_status_code 
bsp_interrupt_vector_enable(rtems_vector_number vector)
 
 gic_id_enable(dist, vector);
   } else {
-volatile gic_sgi_ppi *sgi_ppi =
-  gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-
-/* Set G1NS */
-sgi_ppi->icspigrpr[0] |= 1U << vector;
-sgi_ppi->icspigrpmodr[0] &= ~(1U << vector);
-
-/* Set enable */
-sgi_ppi->icspiser[0] = 1U << vector;
+gicv3_sgi_ppi_enable(vector, _SMP_Get_current_processor());
   }
 
   return RTEMS_SUCCESSFUL;
-- 
2.34.1

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


[PATCH 13/13] bsps: Add gicv3_get_attributes()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 32 
 bsps/shared/dev/irq/arm-gicv3.c  | 27 +--
 2 files changed, 33 insertions(+), 26 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 6a716894b4..0d3ef9a1c1 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -327,6 +327,38 @@ static void gicv3_init_cpu_interface(uint32_t cpu_index)
   WRITE_SR(ICC_CTLR, 0x0);
 }
 
+static inline void gicv3_get_attributes(
+  rtems_vector_number vector,
+  rtems_interrupt_attributes *attributes
+)
+{
+  attributes->is_maskable = true;
+  attributes->maybe_enable = true;
+  attributes->maybe_disable = true;
+  attributes->can_raise = true;
+
+  if ( vector <= ARM_GIC_IRQ_SGI_LAST ) {
+/*
+ * It is implementation-defined whether implemented SGIs are permanently
+ * enabled, or can be enabled and disabled by writes to GICD_ISENABLER0 and
+ * GICD_ICENABLER0.
+ */
+attributes->can_raise_on = true;
+attributes->cleared_by_acknowledge = true;
+attributes->trigger_signal = RTEMS_INTERRUPT_NO_SIGNAL;
+  } else {
+attributes->can_disable = true;
+attributes->can_clear = true;
+attributes->trigger_signal = RTEMS_INTERRUPT_UNSPECIFIED_SIGNAL;
+
+if ( vector > ARM_GIC_IRQ_PPI_LAST ) {
+  /* SPI */
+  attributes->can_get_affinity = true;
+  attributes->can_set_affinity = true;
+}
+  }
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index d81f3b50c1..4772ff5db4 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -49,32 +49,7 @@ rtems_status_code bsp_interrupt_get_attributes(
   rtems_interrupt_attributes *attributes
 )
 {
-  attributes->is_maskable = true;
-  attributes->maybe_enable = true;
-  attributes->maybe_disable = true;
-  attributes->can_raise = true;
-
-  if ( vector <= ARM_GIC_IRQ_SGI_LAST ) {
-/*
- * It is implementation-defined whether implemented SGIs are permanently
- * enabled, or can be enabled and disabled by writes to GICD_ISENABLER0 and
- * GICD_ICENABLER0.
- */
-attributes->can_raise_on = true;
-attributes->cleared_by_acknowledge = true;
-attributes->trigger_signal = RTEMS_INTERRUPT_NO_SIGNAL;
-  } else {
-attributes->can_disable = true;
-attributes->can_clear = true;
-attributes->trigger_signal = RTEMS_INTERRUPT_UNSPECIFIED_SIGNAL;
-
-if ( vector > ARM_GIC_IRQ_PPI_LAST ) {
-  /* SPI */
-  attributes->can_get_affinity = true;
-  attributes->can_set_affinity = true;
-}
-  }
-
+  gicv3_get_attributes(vector, attributes);
   return RTEMS_SUCCESSFUL;
 }
 
-- 
2.34.1

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


[PATCH 01/13] bsps: Add

2022-03-18 Thread Sebastian Huber
Separate the Interrupt Manager implementation from the generic Arm GICv3
support.  Move parts of the Arm GICv3 support into a new header file.  This
helps to support systems with a clustered structure in which multiple GICv3
instances are present.  For example, two clusters of two Cortex-R52 cores where
each cluster has a dededicated GICv3 instance.
---
 bsps/include/dev/irq/arm-gicv3.h | 162 +++
 bsps/shared/dev/irq/arm-gicv3.c  | 122 +--
 spec/build/bsps/aarch64/grp.yml  |   1 +
 spec/build/bsps/arm/grp.yml  |   1 +
 4 files changed, 165 insertions(+), 121 deletions(-)
 create mode 100644 bsps/include/dev/irq/arm-gicv3.h

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
new file mode 100644
index 00..60bc315962
--- /dev/null
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -0,0 +1,162 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup arm_gic
+ *
+ * @brief This header file contains interfaces to access an Arm GICv3.
+ */
+
+/*
+ * Copyright (C) 2019 On-Line Applications Research Corporation (OAR)
+ *
+ * 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 _RTEMS_DEV_IRQ_ARM_GICV3_H
+#define _RTEMS_DEV_IRQ_ARM_GICV3_H
+
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PRIORITY_DEFAULT 127
+
+#define MPIDR_AFFINITY2(val) BSP_FLD64(val, 16, 23)
+#define MPIDR_AFFINITY2_GET(reg) BSP_FLD64GET(reg, 16, 23)
+#define MPIDR_AFFINITY2_SET(reg, val) BSP_FLD64SET(reg, val, 16, 23)
+#define MPIDR_AFFINITY1(val) BSP_FLD64(val, 8, 15)
+#define MPIDR_AFFINITY1_GET(reg) BSP_FLD64GET(reg, 8, 15)
+#define MPIDR_AFFINITY1_SET(reg, val) BSP_FLD64SET(reg, val, 8, 15)
+#define MPIDR_AFFINITY0(val) BSP_FLD64(val, 0, 7)
+#define MPIDR_AFFINITY0_GET(reg) BSP_FLD64GET(reg, 0, 7)
+#define MPIDR_AFFINITY0_SET(reg, val) BSP_FLD64SET(reg, val, 0, 7)
+
+#define ICC_SGIR_AFFINITY3(val) BSP_FLD64(val, 48, 55)
+#define ICC_SGIR_AFFINITY3_GET(reg) BSP_FLD64GET(reg, 48, 55)
+#define ICC_SGIR_AFFINITY3_SET(reg, val) BSP_FLD64SET(reg, val, 48, 55)
+#define ICC_SGIR_IRM BSP_BIT32(40)
+#define ICC_SGIR_AFFINITY2(val) BSP_FLD64(val, 32, 39)
+#define ICC_SGIR_AFFINITY2_GET(reg) BSP_FLD64GET(reg, 32, 39)
+#define ICC_SGIR_AFFINITY2_SET(reg, val) BSP_FLD64SET(reg, val, 32, 39)
+#define ICC_SGIR_INTID(val) BSP_FLD64(val, 24, 27)
+#define ICC_SGIR_INTID_GET(reg) BSP_FLD64GET(reg, 24, 27)
+#define ICC_SGIR_INTID_SET(reg, val) BSP_FLD64SET(reg, val, 24, 27)
+#define ICC_SGIR_AFFINITY1(val) BSP_FLD64(val, 16, 23)
+#define ICC_SGIR_AFFINITY1_GET(reg) BSP_FLD64GET(reg, 16, 23)
+#define ICC_SGIR_AFFINITY1_SET(reg, val) BSP_FLD64SET(reg, val, 16, 23)
+#define ICC_SGIR_CPU_TARGET_LIST(val) BSP_FLD64(val, 0, 15)
+#define ICC_SGIR_CPU_TARGET_LIST_GET(reg) BSP_FLD64GET(reg, 0, 15)
+#define ICC_SGIR_CPU_TARGET_LIST_SET(reg, val) BSP_FLD64SET(reg, val, 0, 15)
+
+#ifdef ARM_MULTILIB_ARCH_V4
+/* cpuif->iccicr */
+#define ICC_CTLR"p15, 0, %0, c12, c12, 4"
+
+/* cpuif->iccpmr */
+#define ICC_PMR "p15, 0, %0,  c4,  c6, 0"
+
+/* cpuif->iccbpr */
+#define ICC_BPR0"p15, 0, %0, c12,  c8, 3"
+#define ICC_BPR1"p15, 0, %0, c12, c12, 3"
+
+/* cpuif->icciar */
+#define ICC_IAR0"p15, 0, %0, c12,  c8, 0"
+#define ICC_IAR1"p15, 0, %0, c12, c12, 0"
+
+/* cpuif->icceoir */
+#define ICC_EOIR0   "p15, 0, %0, c12,  c8, 1"
+#define ICC_EOIR1   "p15, 0, %0, c12, c12, 1"
+
+#define ICC_SRE "p15, 0, %0, c12, c12, 5"
+
+#define ICC_IGRPEN0 "p15, 0, %0, c12, c12, 6"
+#define ICC_IGRPEN1 "p15, 0, %0, c12, c12, 7"
+
+#define MPIDR   "p15, 0, %0, c0, c0, 5"
+
+#define READ_SR(SR_NAME) \
+({ \
+  uint32_t value; \
+  __asm__ volatile("mrc" SR_NAME : "=r" 

[PATCH 05/13] bsps: Add gicv3_ppi_clear_pending()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 10 ++
 bsps/shared/dev/irq/arm-gicv3.c  |  5 +
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 59052bebd2..9cfbd8f207 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -176,6 +176,16 @@ static inline void gicv3_ppi_set_pending(
   sgi_ppi->icspispendr[0] = 1U << vector;
 }
 
+static inline void gicv3_ppi_clear_pending(
+  rtems_vector_number vector,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  sgi_ppi->icspicpendr[0] = 1U << vector;
+}
+
 static inline void gicv3_trigger_sgi(
   rtems_vector_number vector,
   uint32_ttargets
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 54e0c2af68..2978a0d5ad 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -138,10 +138,7 @@ rtems_status_code bsp_interrupt_clear(rtems_vector_number 
vector)
   }
 
   if ( vector <= ARM_GIC_IRQ_PPI_LAST ) {
-volatile gic_sgi_ppi *sgi_ppi =
-  gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-
-sgi_ppi->icspicpendr[0] = 1U << vector;
+gicv3_ppi_clear_pending(vector, _SMP_Get_current_processor());
   } else {
 volatile gic_dist *dist = ARM_GIC_DIST;
 
-- 
2.34.1

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


[PATCH 06/13] bsps: Add gicv3_sgi_ppi_is_enabled()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 10 ++
 bsps/shared/dev/irq/arm-gicv3.c  |  5 +
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 9cfbd8f207..8bfa34c11e 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -156,6 +156,16 @@ static inline volatile gic_sgi_ppi 
*gicv3_get_sgi_ppi(uint32_t cpu_index)
 ((uintptr_t)BSP_ARM_GIC_REDIST_BASE + cpu_index * 0x2 + 0x1);
 }
 
+static inline bool gicv3_sgi_ppi_is_enabled(
+  rtems_vector_number vector,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  return (sgi_ppi->icspiser[0] & (1U << vector)) != 0;
+}
+
 static inline bool gicv3_sgi_ppi_is_pending(
   rtems_vector_number vector,
   uint32_tcpu_index
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 2978a0d5ad..bd0582b863 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -157,10 +157,7 @@ rtems_status_code bsp_interrupt_vector_is_enabled(
   bsp_interrupt_assert(enabled != NULL);
 
   if ( vector <= ARM_GIC_IRQ_PPI_LAST ) {
-volatile gic_sgi_ppi *sgi_ppi =
-  gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-
-*enabled = (sgi_ppi->icspiser[0] & (1U << vector)) != 0;
+*enabled = gicv3_sgi_ppi_is_enabled(vector, _SMP_Get_current_processor());
   } else {
 volatile gic_dist *dist = ARM_GIC_DIST;
 
-- 
2.34.1

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


[PATCH 04/13] bsps: Add gicv3_ppi_set_pending()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 10 ++
 bsps/shared/dev/irq/arm-gicv3.c  |  5 +
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index cfc8cd3499..59052bebd2 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -166,6 +166,16 @@ static inline bool gicv3_sgi_ppi_is_pending(
   return (sgi_ppi->icspispendr[0] & (1U << vector)) != 0;
 }
 
+static inline void gicv3_ppi_set_pending(
+  rtems_vector_number vector,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  sgi_ppi->icspispendr[0] = 1U << vector;
+}
+
 static inline void gicv3_trigger_sgi(
   rtems_vector_number vector,
   uint32_ttargets
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 2f08d9bcb7..54e0c2af68 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -104,10 +104,7 @@ rtems_status_code bsp_interrupt_raise(rtems_vector_number 
vector)
   if (vector <= ARM_GIC_IRQ_SGI_LAST) {
 arm_gic_trigger_sgi(vector, 1U << _SMP_Get_current_processor());
   } else if (vector <= ARM_GIC_IRQ_PPI_LAST) {
-volatile gic_sgi_ppi *sgi_ppi =
-  gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-
-sgi_ppi->icspispendr[0] = 1U << vector;
+gicv3_ppi_set_pending(vector, _SMP_Get_current_processor());
   } else {
 volatile gic_dist *dist = ARM_GIC_DIST;
 
-- 
2.34.1

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


[PATCH 00/13] Refactor Arm GICv3 support

2022-03-18 Thread Sebastian Huber
Separate the Interrupt Manager implementation from the generic Arm GICv3
support.  Move parts of the Arm GICv3 support into a new header file.  This
helps to support systems with a clustered structure in which multiple GICv3
instances are present.  For example, two clusters of two Cortex-R52 cores where
each cluster has a dededicated GICv3 instance.

Sebastian Huber (13):
  bsps: Add 
  bsps: Add gicv3_sgi_ppi_is_pending()
  bsps: Add gicv3_trigger_sgi()
  bsps: Add gicv3_ppi_set_pending()
  bsps: Add gicv3_ppi_clear_pending()
  bsps: Add gicv3_sgi_ppi_is_enabled()
  bsps: Add gicv3_sgi_ppi_enable()
  bsps: Add gicv3_sgi_ppi_disable()
  bsps: Move gicv3_init_dist()
  bsps: Move gicv3_init_cpu_interface()
  bsps: Add gicv3_sgi_ppi_set_priority()
  bsps: Add gicv3_sgi_ppi_get_priority()
  bsps: Add gicv3_get_attributes()

 bsps/include/dev/irq/arm-gicv3.h | 366 +++
 bsps/shared/dev/irq/arm-gicv3.c  | 286 ++--
 spec/build/bsps/aarch64/grp.yml  |   1 +
 spec/build/bsps/arm/grp.yml  |   1 +
 4 files changed, 389 insertions(+), 265 deletions(-)
 create mode 100644 bsps/include/dev/irq/arm-gicv3.h

-- 
2.34.1

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


[PATCH 02/13] bsps: Add gicv3_sgi_ppi_is_pending()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 11 +++
 bsps/shared/dev/irq/arm-gicv3.c  |  5 +
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 60bc315962..0583fded0a 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -9,6 +9,7 @@
  */
 
 /*
+ * Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de)
  * Copyright (C) 2019 On-Line Applications Research Corporation (OAR)
  *
  * Redistribution and use in source and binary forms, with or without
@@ -155,6 +156,16 @@ static inline volatile gic_sgi_ppi 
*gicv3_get_sgi_ppi(uint32_t cpu_index)
 ((uintptr_t)BSP_ARM_GIC_REDIST_BASE + cpu_index * 0x2 + 0x1);
 }
 
+static inline bool gicv3_sgi_ppi_is_pending(
+  rtems_vector_number vector,
+  uint32_tcpu_index
+)
+{
+  volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index);
+
+  return (sgi_ppi->icspispendr[0] & (1U << vector)) != 0;
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 58f97c4f43..682af67b21 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -87,10 +87,7 @@ rtems_status_code bsp_interrupt_is_pending(
   bsp_interrupt_assert(pending != NULL);
 
   if (vector <= ARM_GIC_IRQ_PPI_LAST) {
-volatile gic_sgi_ppi *sgi_ppi =
-  gicv3_get_sgi_ppi(_SMP_Get_current_processor());
-
-*pending = (sgi_ppi->icspispendr[0] & (1U << vector)) != 0;
+*pending = gicv3_sgi_ppi_is_pending(vector, _SMP_Get_current_processor());
   } else {
 volatile gic_dist *dist = ARM_GIC_DIST;
 
-- 
2.34.1

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


[PATCH 03/13] bsps: Add gicv3_trigger_sgi()

2022-03-18 Thread Sebastian Huber
---
 bsps/include/dev/irq/arm-gicv3.h | 21 +
 bsps/shared/dev/irq/arm-gicv3.c  | 15 +--
 2 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h
index 0583fded0a..cfc8cd3499 100644
--- a/bsps/include/dev/irq/arm-gicv3.h
+++ b/bsps/include/dev/irq/arm-gicv3.h
@@ -166,6 +166,27 @@ static inline bool gicv3_sgi_ppi_is_pending(
   return (sgi_ppi->icspispendr[0] & (1U << vector)) != 0;
 }
 
+static inline void gicv3_trigger_sgi(
+  rtems_vector_number vector,
+  uint32_ttargets
+)
+{
+#ifndef ARM_MULTILIB_ARCH_V4
+  uint64_t mpidr;
+#else
+  uint32_t mpidr;
+#endif
+  mpidr = READ_SR(MPIDR);
+  uint64_t value = ICC_SGIR_AFFINITY2(MPIDR_AFFINITY2_GET(mpidr))
+ | ICC_SGIR_INTID(vector)
+ | ICC_SGIR_AFFINITY1(MPIDR_AFFINITY1_GET(mpidr))
+ | ICC_SGIR_CPU_TARGET_LIST(targets);
+#ifndef ARM_MULTILIB_ARCH_V4
+  value |= ICC_SGIR_AFFINITY3(MPIDR_AFFINITY3_GET(mpidr));
+#endif
+  WRITE64_SR(ICC_SGI1, value);
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/bsps/shared/dev/irq/arm-gicv3.c b/bsps/shared/dev/irq/arm-gicv3.c
index 682af67b21..2f08d9bcb7 100644
--- a/bsps/shared/dev/irq/arm-gicv3.c
+++ b/bsps/shared/dev/irq/arm-gicv3.c
@@ -385,20 +385,7 @@ rtems_status_code bsp_interrupt_get_affinity(
 
 void arm_gic_trigger_sgi(rtems_vector_number vector, uint32_t targets)
 {
-#ifndef ARM_MULTILIB_ARCH_V4
-  uint64_t mpidr;
-#else
-  uint32_t mpidr;
-#endif
-  mpidr = READ_SR(MPIDR);
-  uint64_t value = ICC_SGIR_AFFINITY2(MPIDR_AFFINITY2_GET(mpidr))
- | ICC_SGIR_INTID(vector)
- | ICC_SGIR_AFFINITY1(MPIDR_AFFINITY1_GET(mpidr))
- | ICC_SGIR_CPU_TARGET_LIST(targets);
-#ifndef ARM_MULTILIB_ARCH_V4
-  value |= ICC_SGIR_AFFINITY3(MPIDR_AFFINITY3_GET(mpidr));
-#endif
-  WRITE64_SR(ICC_SGI1, value);
+  gicv3_trigger_sgi(vector, targets);
 }
 
 uint32_t arm_gic_irq_processor_count(void)
-- 
2.34.1

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


Re: [PATCH rtems-source-builder] 6/7: Update AArch64 newlib patch

2022-03-18 Thread Sebastian Huber

On 17/03/2022 22:59, Kinsey Moore wrote:

The existing patch fails to build with the latest newlib. This picks up
an updated patch that compiles with both older and newer newlib.


Thanks for the quick fix. I checked it in an started a new RSB build.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel