Index: cpukit/sapi/src/chainappendnotify.c
===================================================================
--- cpukit/sapi/src/chainappendnotify.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicChains
- *
- * @brief This source file contains the implementation of
- *   rtems_chain_append_with_notification().
- */
-
-/*
- * Copyright (c) 2010 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/chain.h>
-
-rtems_status_code rtems_chain_append_with_notification(
-  rtems_chain_control *chain,
-  rtems_chain_node *node,
-  rtems_id task,
-  rtems_event_set events
-)
-{
-  rtems_status_code sc = RTEMS_SUCCESSFUL;
-  bool was_empty = rtems_chain_append_with_empty_check( chain, node );
-
-  if ( was_empty ) {
-    sc = rtems_event_send( task, events );
-  }
-
-  return sc;
-}
Index: cpukit/sapi/src/chaingetnotify.c
===================================================================
--- cpukit/sapi/src/chaingetnotify.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicChains
- *
- * @brief This source file contains the implementation of
- *   rtems_chain_get_with_notification().
- */
-
-/*
- * Copyright (c) 2010 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/chain.h>
-
-rtems_status_code rtems_chain_get_with_notification(
-  rtems_chain_control *chain,
-  rtems_id task,
-  rtems_event_set events,
-  rtems_chain_node **node
-)
-{
-  rtems_status_code sc = RTEMS_SUCCESSFUL;
-  bool is_empty = rtems_chain_get_with_empty_check( chain, node );
-
-  if ( is_empty ) {
-    sc = rtems_event_send( task, events );
-  }
-
-  return sc;
-}
Index: cpukit/sapi/src/chaingetwait.c
===================================================================
--- cpukit/sapi/src/chaingetwait.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicChains
- *
- * @brief This source file contains the implementation of
- *   rtems_chain_get_with_wait().
- */
-
-/*
- * Copyright (c) 2010 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/chain.h>
-
-rtems_status_code rtems_chain_get_with_wait(
-  rtems_chain_control *chain,
-  rtems_event_set events,
-  rtems_interval timeout,
-  rtems_chain_node **node_ptr
-)
-{
-  rtems_status_code sc = RTEMS_SUCCESSFUL;
-  rtems_chain_node *node = NULL;
-
-  while (
-    sc == RTEMS_SUCCESSFUL
-      && (node = rtems_chain_get( chain )) == NULL
-  ) {
-    rtems_event_set out;
-    sc = rtems_event_receive(
-      events,
-      RTEMS_EVENT_ALL | RTEMS_WAIT,
-      timeout,
-      &out
-    );
-  }
-
-  *node_ptr = node;
-
-  return sc;
-}
Index: cpukit/sapi/src/chainprependnotify.c
===================================================================
--- cpukit/sapi/src/chainprependnotify.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicChains
- *
- * @brief This source file contains the implementation of
- *   rtems_chain_prepend_with_notification().
- */
-
-/*
- * Copyright (c) 2010 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/chain.h>
-
-rtems_status_code rtems_chain_prepend_with_notification(
-  rtems_chain_control *chain,
-  rtems_chain_node *node,
-  rtems_id task,
-  rtems_event_set events
-)
-{
-  rtems_status_code sc = RTEMS_SUCCESSFUL;
-  bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
-
-  if (was_empty) {
-    sc = rtems_event_send( task, events );
-  }
-
-  return sc;
-}
Index: cpukit/sapi/src/chainprotected.c
===================================================================
--- cpukit/sapi/src/chainprotected.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,156 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicChains
- *
- * @brief This source file contains the implementation of rtems_chain_append(),
- *   rtems_chain_append_with_empty_check(), rtems_chain_extract(),
- *   rtems_chain_get(), rtems_chain_get_with_empty_check(),
- *   rtems_chain_insert(), rtems_chain_prepend(), and
- *   rtems_chain_prepend_with_empty_check().
- */
-
-/*
- * Copyright (C) 2013, 2016 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/chain.h>
-#include <rtems/rtems/intr.h>
-
-RTEMS_INTERRUPT_LOCK_DEFINE( static, chain_lock, "Chains" )
-
-static void chain_acquire( rtems_interrupt_lock_context *lock_context )
-{
-  rtems_interrupt_lock_acquire( &chain_lock, lock_context );
-}
-
-static void chain_release( rtems_interrupt_lock_context *lock_context )
-{
-  rtems_interrupt_lock_release( &chain_lock, lock_context );
-}
-
-void rtems_chain_extract( rtems_chain_node *node )
-{
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  _Chain_Extract_unprotected( node );
-  chain_release( &lock_context );
-}
-
-rtems_chain_node *rtems_chain_get( rtems_chain_control *chain )
-{
-  rtems_chain_node *node;
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  node = _Chain_Get_unprotected( chain );
-  chain_release( &lock_context );
-
-  return node;
-}
-
-void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *node )
-{
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  _Chain_Insert_unprotected( after_node, node );
-  chain_release( &lock_context );
-}
-
-void rtems_chain_append(
-  rtems_chain_control *chain,
-  rtems_chain_node *node
-)
-{
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  _Chain_Append_unprotected( chain, node );
-  chain_release( &lock_context );
-}
-
-void rtems_chain_prepend(
-  rtems_chain_control *chain,
-  rtems_chain_node *node
-)
-{
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  _Chain_Prepend_unprotected( chain, node );
-  chain_release( &lock_context );
-}
-
-bool rtems_chain_append_with_empty_check(
-  rtems_chain_control *chain,
-  rtems_chain_node *node
-)
-{
-  bool was_empty;
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  was_empty = _Chain_Append_with_empty_check_unprotected( chain, node );
-  chain_release( &lock_context );
-
-  return was_empty;
-}
-
-bool rtems_chain_prepend_with_empty_check(
-  rtems_chain_control *chain,
-  rtems_chain_node *node
-)
-{
-  bool was_empty;
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  was_empty = _Chain_Prepend_with_empty_check_unprotected( chain, node );
-  chain_release( &lock_context );
-
-  return was_empty;
-}
-
-bool rtems_chain_get_with_empty_check(
-  rtems_chain_control *chain,
-  rtems_chain_node **node
-)
-{
-  bool is_empty_now;
-  rtems_interrupt_lock_context lock_context;
-
-  chain_acquire( &lock_context );
-  is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
-  chain_release( &lock_context );
-
-  return is_empty_now;
-}
Index: cpukit/sapi/src/cpucounterconverter.c
===================================================================
--- cpukit/sapi/src/cpucounterconverter.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,92 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImpl
- *
- * @brief This source file contains a implementation of the counter value
- *   conversion functions.
- */
-
-/*
- * Copyright (C) 2014, 2018 embedded brains GmbH & Co. KG
- *
- * 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 <rtems/counter.h>
-#include <rtems/sysinit.h>
-
-RTEMS_STATIC_ASSERT(sizeof(rtems_counter_ticks) <= sizeof(uint32_t), type);
-
-static uint64_t to_ns_scaler;
-
-static uint64_t from_ns_scaler;
-
-static uint64_t to_sbt_scaler;
-
-static uint64_t from_sbt_scaler;
-
-uint64_t rtems_counter_ticks_to_nanoseconds( rtems_counter_ticks ticks )
-{
-  return (uint32_t) ((ticks * to_ns_scaler) >> 32);
-}
-
-rtems_counter_ticks rtems_counter_nanoseconds_to_ticks( uint32_t nanoseconds )
-{
-  return (rtems_counter_ticks) ((nanoseconds * from_ns_scaler) >> 32);
-}
-
-int64_t rtems_counter_ticks_to_sbintime( rtems_counter_ticks ticks )
-{
-  return (int64_t) ((ticks * to_sbt_scaler) >> 31);
-}
-
-rtems_counter_ticks rtems_counter_sbintime_to_ticks( int64_t sbt )
-{
-  return (rtems_counter_ticks) (((uint64_t) sbt * from_sbt_scaler) >> 32);
-}
-
-void rtems_counter_initialize_converter( uint32_t frequency )
-{
-  uint64_t ns_per_s = UINT64_C(1000000000);
-  uint64_t bin_per_s = UINT64_C(1) << 32;
-  uint64_t bin_freq = (uint64_t) frequency << 32;
-
-  to_ns_scaler = ((ns_per_s << 32) + frequency - 1) / frequency;
-  from_ns_scaler = (bin_freq + ns_per_s - 1) / ns_per_s;
-
-  to_sbt_scaler = ((bin_per_s << 31) + frequency - 1) / frequency;
-  from_sbt_scaler = (bin_freq + bin_per_s - 1) / bin_per_s;
-}
-
-static void rtems_counter_sysinit( void )
-{
-  rtems_counter_initialize_converter( rtems_counter_frequency() );
-}
-
-RTEMS_SYSINIT_ITEM(
-  rtems_counter_sysinit,
-  RTEMS_SYSINIT_CPU_COUNTER,
-  RTEMS_SYSINIT_ORDER_LAST_BUT_5
-);
Index: cpukit/sapi/src/debug.c
===================================================================
--- cpukit/sapi/src/debug.c	(revision ac7d5ef06a6d6e8d84abbd1f0b82162725f98326)
+++ cpukit/sapi/src/debug.c	(revision ac7d5ef06a6d6e8d84abbd1f0b82162725f98326)
@@ -0,0 +1,62 @@
+/*
+ *  Debug Manager
+ *
+ *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ *  On-Line Applications Research Corporation (OAR).
+ *  All rights assigned to U.S. Government, 1994.
+ *
+ *  This material may be reproduced by or for the U.S. Government pursuant
+ *  to the copyright license under the clause at DFARS 252.227-7013.  This
+ *  notice must appear in all copies of this file and its derivatives.
+ *
+ *  $Id$
+ */
+
+#include <rtems/system.h>
+#include <rtems/debug.h>
+
+/*PAGE
+ *
+ *  _Debug_Manager_initialization
+ */
+ 
+void _Debug_Manager_initialization( void )
+{
+  rtems_debug_disable( RTEMS_DEBUG_ALL_MASK );
+}
+ 
+/*PAGE
+ *
+ *  rtems_debug_enable
+ */
+ 
+void rtems_debug_enable (
+  rtems_debug_control  to_be_enabled
+)
+{
+  _Debug_Level |= to_be_enabled;
+}
+ 
+/*PAGE
+ *
+ *  rtems_debug_disable
+ */
+ 
+void rtems_debug_disable (
+  rtems_debug_control  to_be_disabled
+)
+{
+  _Debug_Level &= ~to_be_disabled;
+}
+
+/*PAGE
+ *
+ *  _Debug_Is_enabled
+ */
+
+boolean _Debug_Is_enabled(
+  rtems_debug_control  level
+)
+{
+  return (_Debug_Level & level);
+}
Index: cpukit/sapi/src/delaynano.c
===================================================================
--- cpukit/sapi/src/delaynano.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPICounter
- *
- * @brief This source file contains the implementation of
- *   rtems_counter_delay_nanoseconds().
- */
-
-/*
- * Copyright (c) 2014 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/counter.h>
-
-void rtems_counter_delay_nanoseconds( uint32_t nanoseconds )
-{
-  rtems_counter_ticks ticks =
-    rtems_counter_nanoseconds_to_ticks( nanoseconds );
-
-  rtems_counter_delay_ticks( ticks );
-}
Index: cpukit/sapi/src/delayticks.c
===================================================================
--- cpukit/sapi/src/delayticks.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPICounter
- *
- * @brief This source file contains the implementation of
- *   rtems_counter_delay_ticks().
- */
-
-/*
- * Copyright (c) 2014 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/counter.h>
-
-void rtems_counter_delay_ticks( rtems_counter_ticks ticks )
-{
-  rtems_counter_ticks a = rtems_counter_read();
-  rtems_counter_ticks delta = 0;
-
-  do {
-    rtems_counter_ticks b;
-
-    ticks -= delta;
-
-    b = rtems_counter_read();
-    delta = rtems_counter_difference( b, a );
-    a = b;
-  } while ( ticks > delta );
-}
Index: cpukit/sapi/src/exinit.c
===================================================================
--- cpukit/sapi/src/exinit.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ cpukit/sapi/src/exinit.c	(revision ac7d5ef06a6d6e8d84abbd1f0b82162725f98326)
@@ -1,152 +1,245 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the definition of ::_Copyright_Notice,
- *   ::_Objects_Information_table, the flexible per-CPU data linker set limits,
- *   the system initialization linker set limits and the implementation of
- *   rtems_initialize_executive().
- */
-
 /*
- *  COPYRIGHT (c) 1989-2014.
+ *  Initialization Manager
+ *
+ *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
  *  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"
-#endif
-
+ *  All rights assigned to U.S. Government, 1994.
+ *
+ *  This material may be reproduced by or for the U.S. Government pursuant
+ *  to the copyright license under the clause at DFARS 252.227-7013.  This
+ *  notice must appear in all copies of this file and its derivatives.
+ *
+ *  $Id$
+ */
+
+/*
+ *  INIT is defined so all of the data will be included in this
+ *  file.
+ */
+
+#define INIT
+
+#include <rtems/system.h>
 #include <rtems/config.h>
-#include <rtems/extensionimpl.h>
+#include <rtems/copyrt.h>
+#include <rtems/clock.h>
+#include <rtems/tasks.h>
+#include <rtems/debug.h>
+#include <rtems/dpmem.h>
+#include <rtems/event.h>
+#include <rtems/extension.h>
+#include <rtems/fatal.h>
+#include <rtems/heap.h>
 #include <rtems/init.h>
-#include <rtems/sysinit.h>
-#include <rtems/score/sysstate.h>
-
-#include <rtems/score/copyrt.h>
-#include <rtems/score/heap.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/schedulerimpl.h>
-#include <rtems/score/smpimpl.h>
-#include <rtems/score/timecounter.h>
-#include <rtems/score/threadimpl.h>
-#include <rtems/score/todimpl.h>
-
-RTEMS_SECTION(".rtemsroset.copyright") const char _Copyright_Notice[] =
-  "Copyright (C) 1989, 2021 RTEMS Project and contributors";
-
-static Objects_Information *
-_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
-
-static Objects_Information *_RTEMS_Objects[ OBJECTS_RTEMS_CLASSES_LAST + 1 ];
-
-static Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ];
-
-Objects_Information ** const
-_Objects_Information_table[ OBJECTS_APIS_LAST + 1 ] = {
-  NULL,
-  &_Internal_Objects[ 0 ],
-  &_RTEMS_Objects[ 0 ],
-  &_POSIX_Objects[ 0 ]
+#include <rtems/intthrd.h>
+#include <rtems/isr.h>
+#include <rtems/intr.h>
+#include <rtems/io.h>
+#include <rtems/message.h>
+#include <rtems/mp.h>
+#include <rtems/mpci.h>
+#include <rtems/part.h>
+#include <rtems/priority.h>
+#include <rtems/ratemon.h>
+#include <rtems/region.h>
+#include <rtems/sem.h>
+#include <rtems/signal.h>
+#include <rtems/sysstate.h>
+#include <rtems/thread.h>
+#include <rtems/timer.h>
+#include <rtems/tod.h>
+#include <rtems/userext.h>
+#include <rtems/watchdog.h>
+#include <rtems/wkspace.h>
+
+#include <rtems/sptables.h>
+
+/*PAGE
+ *
+ *  rtems_initialize_executive
+ *
+ *  This directive initializes all the kernels data structures
+ *  to the states necessary for the kernel to begin execution.  All
+ *  include files that contain global variable definitions should be
+ *  included in this file.  The system threads and initialization threads
+ *  are created and started by this routine.  This routine then
+ *  initiates multithreading.
+ *
+ *  Input parameters:
+ *    configuration_table - pointer to the user's configuration table
+ *    cpu_table           - pointer to the user's CPU configuration table
+ *
+ *  Output parameters:  NONE
+ */
+
+struct months {
+  unsigned32 months[2][13];
 };
 
-static void rtems_initialize_data_structures(void)
-{
+void rtems_initialize_executive(
+  rtems_configuration_table *configuration_table,
+  rtems_cpu_table           *cpu_table
+)
+{
+  rtems_interrupt_level bsp_level;
+
+  bsp_level = rtems_initialize_executive_early(configuration_table, cpu_table);
+  rtems_initialize_executive_late( bsp_level );
+}
+
+rtems_interrupt_level rtems_initialize_executive_early(
+  rtems_configuration_table *configuration_table,
+  rtems_cpu_table           *cpu_table
+)
+{
+  rtems_interrupt_level        bsp_level;
+  rtems_multiprocessing_table *multiprocessing_table;
+
   /*
    *  Dispatching and interrupts are disabled until the end of the
    *  initialization sequence.  This prevents an inadvertent context
    *  switch before the executive is initialized.
-   *
-   *  WARNING: Interrupts should have been disabled by the BSP and
-   *           are disabled by boot_card().
    */
 
+  _ISR_Disable( bsp_level );
+
+  _System_state_Set( SYSTEM_STATE_BEFORE_INITIALIZATION );
+
+  _CPU_Initialize( cpu_table, _Thread_Dispatch );
+
+  multiprocessing_table = configuration_table->User_multiprocessing_table;
+  if ( multiprocessing_table == NULL )
+    multiprocessing_table =
+      (void *) &_Configuration_Default_multiprocessing_table;
+
+  _Configuration_Handler_initialization(
+    configuration_table,
+    multiprocessing_table,
+    multiprocessing_table->User_mpci_table
+  );
+
+  _Attributes_Handler_initialization();
+
+  _Thread_Dispatch_initialization();
+
+  _User_extensions_Handler_initialization(
+    configuration_table->User_extension_table
+  );
+
+  _Workspace_Handler_initialization(
+     (void *)configuration_table->work_space_start,
+     configuration_table->work_space_size
+  );
+
+  _ISR_Handler_initialization();
+
+  _Objects_Handler_initialization(
+    multiprocessing_table->node,
+    multiprocessing_table->maximum_global_objects
+  );
+
+  _Priority_Handler_initialization();
+
+  _Watchdog_Handler_initialization();
+
+  _TOD_Handler_initialization( configuration_table->microseconds_per_tick );
+
+  _Thread_Handler_initialization(
+    configuration_table->maximum_tasks,
+    configuration_table->ticks_per_timeslice,
+    multiprocessing_table->maximum_proxies
+  );
+
+  _MPCI_Handler_initialization();
+
+/* MANAGERS */
+
+  _Interrupt_Manager_initialization();
+
+  _Multiprocessing_Manager_initialization();
+
+  _Timer_Manager_initialization( configuration_table->maximum_timers );
+
+  _Extension_Manager_initialization( configuration_table->maximum_extensions );
+
+  _IO_Manager_initialization(
+    configuration_table->Device_driver_table,
+    configuration_table->number_of_device_drivers
+  );
+
+  _Event_Manager_initialization();
+
+  _Message_queue_Manager_initialization(
+    configuration_table->maximum_message_queues,
+    configuration_table->maximum_messages
+  );
+
+  _Semaphore_Manager_initialization(
+    configuration_table->maximum_semaphores
+  );
+
+  _Partition_Manager_initialization(
+    configuration_table->maximum_partitions
+  );
+
+  _Region_Manager_initialization( configuration_table->maximum_regions );
+
+  _Dual_ported_memory_Manager_initialization(
+    configuration_table->maximum_ports
+  );
+
+  _Rate_monotonic_Manager_initialization(
+    configuration_table->maximum_periods
+  );
+
+  _Internal_threads_Initialization();
+
+  if ( cpu_table->pretasking_hook )
+    (*cpu_table->pretasking_hook)();
+
+  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
+
+  return bsp_level;
+}
+
+void rtems_initialize_executive_late(
+  rtems_interrupt_level bsp_level
+)
+{
+
+  _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
+
+  _Thread_Start_multitasking(
+    _Internal_threads_System_initialization_thread,
+    _Internal_threads_Idle_thread
+  );
+
   /*
-   * Initialize any target architecture specific support as early as possible
+   *  Restore the interrupt level to what the BSP had.  Technically,
+   *  this is unnecessary since the BSP should have all interrupts
+   *  disabled when rtems_initialize_executive is invoked.  But this keeps
+   *  the ISR Disable/Enable calls paired.
    */
-  _CPU_Initialize();
-
-  _Thread_Dispatch_initialization();
-
-  _ISR_Handler_initialization();
-
-  _Thread_Handler_initialization();
-
-  _Scheduler_Handler_initialization();
-
-  _SMP_Handler_initialize();
-}
-
-RTEMS_LINKER_ROSET( _Sysinit, rtems_sysinit_item );
-
-RTEMS_SYSINIT_ITEM(
-  rtems_initialize_data_structures,
-  RTEMS_SYSINIT_DATA_STRUCTURES,
-  RTEMS_SYSINIT_ORDER_MIDDLE
-);
-
-/*
- *  No threads should be created before this point!!!
- *  _Thread_Executing and _Thread_Heir are not set.
- *
- *  At this point all API extensions are in place.  After the call to
- *  _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
- *
- *  Scheduling can properly occur afterwards as long as we avoid dispatching.
- */
-RTEMS_SYSINIT_ITEM(
-  _Thread_Create_idle,
-  RTEMS_SYSINIT_IDLE_THREADS,
-  RTEMS_SYSINIT_ORDER_MIDDLE
-);
-
-void rtems_initialize_executive(void)
-{
-  const rtems_sysinit_item *item;
-
-  /* Invoke the registered system initialization handlers */
-  RTEMS_LINKER_SET_FOREACH( _Sysinit, item ) {
-    ( *item->handler )();
-  }
-
-  _System_state_Set( SYSTEM_STATE_UP );
-
-  _SMP_Request_start_multitasking();
-
-  _Thread_Start_multitasking();
-
-  /*******************************************************************
-   *******************************************************************
-   *******************************************************************
-   ******                 APPLICATION RUNS HERE                 ******
-   ******              THE FUNCTION NEVER RETURNS               ******
-   *******************************************************************
-   *******************************************************************
-   *******************************************************************/
-}
+
+  _ISR_Enable( bsp_level );
+}
+
+/*PAGE
+ *
+ *  rtems_shutdown_executive
+ *
+ *  This kernel routine shutdowns the executive.  It halts multitasking
+ *  and returns control to the application execution "thread" which
+ *  initialially invoked the rtems_initialize_executive directive.
+ *
+ *  Input parameters:   NONE
+ *
+ *  Output parameters:  NONE
+ */
+
+void rtems_shutdown_executive(
+   unsigned32 result
+)
+{
+  _Thread_Stop_multitasking();
+}
Index: cpukit/sapi/src/exshutdown.c
===================================================================
--- cpukit/sapi/src/exshutdown.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_shutdown_executive().
- */
-
-/*
- *  Initialization Manager
- *
- *  COPYRIGHT (c) 1989-2011.
- *  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"
-#endif
-
-#include <rtems/init.h>
-#include <rtems/score/interr.h>
-
-void rtems_shutdown_executive( uint32_t result )
-{
-  _Terminate( RTEMS_FATAL_SOURCE_EXIT, result );
-
-  /***************************************************************
-   ***************************************************************
-   *   SYSTEM SHUTS DOWN!!!  WE DO NOT RETURN TO THIS POINT!!!   *
-   ***************************************************************
-   ***************************************************************/
-}
Index: cpukit/sapi/src/extension.c
===================================================================
--- cpukit/sapi/src/extension.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ cpukit/sapi/src/extension.c	(revision ac7d5ef06a6d6e8d84abbd1f0b82162725f98326)
@@ -1,48 +1,156 @@
-/**
- * @file
+/*
+ *  Extension Manager
  *
- * @ingroup RTEMSImplClassicUserExt
  *
- * @brief This source file contains a definition of the
- *   ::_Extension_Information with zero objects.
+ *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ *  On-Line Applications Research Corporation (OAR).
+ *  All rights assigned to U.S. Government, 1994.
+ *
+ *  This material may be reproduced by or for the U.S. Government pursuant
+ *  to the copyright license under the clause at DFARS 252.227-7013.  This
+ *  notice must appear in all copies of this file and its derivatives.
+ *
+ *  $Id$
  */
 
-/*
- * SPDX-License-Identifier: BSD-2-Clause
+#include <rtems/system.h>
+#include <rtems/object.h>
+#include <rtems/thread.h>
+#include <rtems/extension.h>
+
+/*PAGE
  *
- * Copyright (C) 2018 embedded brains GmbH & Co. KG
+ *  _Extension_Manager_initialization
  *
- * 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 routine initializes all extension manager related data structures.
  *
- * 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.
+ *  Input parameters:
+ *    maximum_extensions - number of extensions to initialize
+ *
+ *  Output parameters:  NONE
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+void _Extension_Manager_initialization(
+  unsigned32 maximum_extensions
+)
+{
+  _Objects_Initialize_information(
+     &_Extension_Information,
+     FALSE,
+     maximum_extensions,
+     sizeof( Extension_Control )
+  );
+}
 
-#include <rtems/extensiondata.h>
+/*PAGE
+ *
+ *  rtems_extension_create
+ *
+ *  This directive creates a extension and performs some initialization.
+ *
+ *  Input parameters:
+ *    name            - extension name
+ *    extension_table - pointer to extension set information
+ *    id              - pointer to extension id
+ *
+ *  Output parameters:
+ *    id                - extension id
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code        - if unsuccessful
+ */
 
-OBJECTS_INFORMATION_DEFINE_ZERO(
-  _Extension,
-  OBJECTS_CLASSIC_API,
-  OBJECTS_RTEMS_EXTENSIONS,
-  OBJECTS_NO_STRING_NAME
-);
+rtems_status_code rtems_extension_create(
+  Objects_Name                   name,
+  rtems_extensions_table *extension_table,
+  Objects_Id                    *id
+)
+{
+  Extension_Control *the_extension;
+
+  if ( !_Objects_Is_name_valid( name ) )
+    return ( RTEMS_INVALID_NAME );
+
+  _Thread_Disable_dispatch();         /* to prevent deletion */
+
+  the_extension = _Extension_Allocate();
+
+  if ( !the_extension ) {
+    _Thread_Enable_dispatch();
+    return( RTEMS_TOO_MANY );
+  }
+
+  _User_extensions_Add_set( &the_extension->Extension, extension_table );
+
+  _Objects_Open( &_Extension_Information, &the_extension->Object, name );
+
+  *id = the_extension->Object.id;
+  _Thread_Enable_dispatch();
+  return( RTEMS_SUCCESSFUL );
+}
+
+/*PAGE
+ *
+ *  rtems_extension_ident
+ *
+ *  This directive returns the system ID associated with
+ *  the extension name.
+ *
+ *  Input parameters:
+ *    name - user defined message queue name
+ *    id   - pointer to extension id
+ *
+ *  Output parameters:
+ *    *id               - message queue id
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code        - if unsuccessful
+ */
+
+rtems_status_code rtems_extension_ident(
+  Objects_Name  name,
+  Objects_Id   *id
+)
+{
+  return _Objects_Name_to_id(
+    &_Extension_Information,
+    name,
+    RTEMS_SEARCH_LOCAL_NODE,
+    id
+  );
+}
+
+/*PAGE
+ *
+ *  rtems_extension_delete
+ *
+ *  This directive allows a thread to delete a extension.
+ *
+ *  Input parameters:
+ *    id - extension id
+ *
+ *  Output parameters:
+ *    RTEMS_SUCCESSFUL - if successful
+ *    error code - if unsuccessful
+ */
+
+rtems_status_code rtems_extension_delete(
+  Objects_Id id
+)
+{
+  Extension_Control   *the_extension;
+  Objects_Locations    location;
+
+  the_extension = _Extension_Get( id, &location );
+  switch ( location ) {
+    case OBJECTS_ERROR:
+    case OBJECTS_REMOTE:            /* should never return this */
+      return( RTEMS_INVALID_ID );
+    case OBJECTS_LOCAL:
+      _User_extensions_Remove_set( &the_extension->Extension );
+      _Objects_Close( &_Extension_Information, &the_extension->Object );
+      _Extension_Free( the_extension );
+      _Thread_Enable_dispatch();
+      return( RTEMS_SUCCESSFUL );
+  }
+
+  return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
+}
Index: cpukit/sapi/src/extensioncreate.c
===================================================================
--- cpukit/sapi/src/extensioncreate.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,95 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicUserExt
- *
- * @brief This source file contains the implementation of
- *   rtems_extension_create() and the User Extensions Manager system
- *   initialization.
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/extensionimpl.h>
-#include <rtems/rtems/support.h>
-#include <rtems/score/userextimpl.h>
-#include <rtems/sysinit.h>
-
-rtems_status_code rtems_extension_create(
-  rtems_name                    name,
-  const rtems_extensions_table *extension_table,
-  rtems_id                     *id
-)
-{
-  Extension_Control *the_extension;
-
-  if ( !rtems_is_name_valid( name ) ) {
-    return RTEMS_INVALID_NAME;
-  }
-
-  if ( extension_table == NULL ) {
-    return RTEMS_INVALID_ADDRESS;
-  }
-
-  if ( id == NULL ) {
-    return RTEMS_INVALID_ADDRESS;
-  }
-
-  the_extension = _Extension_Allocate();
-
-  if ( the_extension == NULL ) {
-    _Objects_Allocator_unlock();
-    return RTEMS_TOO_MANY;
-  }
-
-  _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table );
-
-  *id = _Objects_Open_u32(
-    &_Extension_Information,
-    &the_extension->Object,
-    name
-  );
-  _Objects_Allocator_unlock();
-  return RTEMS_SUCCESSFUL;
-}
-
-static void _Extension_Manager_initialization( void )
-{
-  _Objects_Initialize_information( &_Extension_Information);
-}
-
-RTEMS_SYSINIT_ITEM(
-  _Extension_Manager_initialization,
-  RTEMS_SYSINIT_USER_EXTENSIONS,
-  RTEMS_SYSINIT_ORDER_MIDDLE
-);
Index: cpukit/sapi/src/extensiondelete.c
===================================================================
--- cpukit/sapi/src/extensiondelete.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicUserExt
- *
- * @brief This source file contains the implementation of
- *   rtems_extension_delete().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/extensionimpl.h>
-#include <rtems/score/userextimpl.h>
-
-rtems_status_code rtems_extension_delete(
-  rtems_id id
-)
-{
-  rtems_status_code  status;
-  Extension_Control *the_extension;
-
-  _Objects_Allocator_lock();
-
-  the_extension = _Extension_Get( id );
-
-  if ( the_extension != NULL ) {
-    _Objects_Close( &_Extension_Information, &the_extension->Object );
-    _User_extensions_Remove_set( &the_extension->Extension );
-    _Extension_Free( the_extension );
-    status = RTEMS_SUCCESSFUL;
-  } else {
-    status = RTEMS_INVALID_ID;
-  }
-
-  _Objects_Allocator_unlock();
-  return status;
-}
Index: cpukit/sapi/src/extensionident.c
===================================================================
--- cpukit/sapi/src/extensionident.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicUserExt
- *
- * @brief This source file contains the implementation of
- *   rtems_extension_ident().
- */
-
-/*
- * Copyright (C) 2020 embedded brains GmbH & Co. KG
- * Copyright (C) 1989 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"
-#endif
-
-#include <rtems/extensionimpl.h>
-#include <rtems/rtems/objectimpl.h>
-
-rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id )
-{
-  return _RTEMS_Name_to_id(
-    name,
-    OBJECTS_SEARCH_LOCAL_NODE,
-    id,
-    &_Extension_Information
-  );
-}
Index: cpukit/sapi/src/fatal.c
===================================================================
--- cpukit/sapi/src/fatal.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ cpukit/sapi/src/fatal.c	(revision ac7d5ef06a6d6e8d84abbd1f0b82162725f98326)
@@ -1,53 +1,53 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_fatal_error_occurred().
- */
-
 /*
  *  Fatal Error Manager
  *
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
  *  On-Line Applications Research Corporation (OAR).
+ *  All rights assigned to U.S. Government, 1994.
  *
- * 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 material may be reproduced by or for the U.S. Government pursuant
+ *  to the copyright license under the clause at DFARS 252.227-7013.  This
+ *  notice must appear in all copies of this file and its derivatives.
  *
- * 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.
+ *  $Id$
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/fatal.h>
+#include <rtems/sysstate.h>
+#include <rtems/userext.h>
 
-#include <rtems/fatal.h>
-#include <rtems/score/interr.h>
+/*PAGE
+ *
+ *  rtems_fatal_error_occurred
+ *
+ *  This directive will invoke the fatal error handler supplied by the user
+ *  followed by the the default one provided by the executive.  The default
+ *  error handler assumes no hardware is present to help inform the user
+ *  of the problem.  Halt stores the error code in a known register,
+ *  disables interrupts, and halts the CPU.  If the CPU does not have a
+ *  halt instruction, it will loop to itself.
+ *
+ *  Input parameters:
+ *    the_error - fatal error status code
+ *
+ *  Output parameters:
+ *    the_error       - on stack
+ *    status register - on stack
+ *
+ *  NOTE: The the_error is not necessarily a directive status code.
+ */
 
-void rtems_fatal_error_occurred(
-  uint32_t   the_error
+void volatile rtems_fatal_error_occurred(
+  unsigned32 the_error
 )
 {
-  _Terminate( INTERNAL_ERROR_RTEMS_API, the_error );
+
+  _User_extensions_Fatal( the_error );
+
+  _System_state_Set( SYSTEM_STATE_FAILED );
+
+  _CPU_Fatal_halt( the_error );
 
 /* will not return from this routine */
Index: cpukit/sapi/src/fatalsrctext.c
===================================================================
--- cpukit/sapi/src/fatalsrctext.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_fatal_source_text().
- */
-
-/*
- * Copyright (C) 2013, 2019 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/fatal.h>
-
-static const char *const fatal_source_text[] = {
-  "INTERNAL_ERROR_CORE",
-  "INTERNAL_ERROR_RTEMS_API",
-  "INTERNAL_ERROR_POSIX_API",
-  "RTEMS_FATAL_SOURCE_BDBUF",
-  "RTEMS_FATAL_SOURCE_APPLICATION",
-  "RTEMS_FATAL_SOURCE_EXIT",
-  "RTEMS_FATAL_SOURCE_BSP",
-  "RTEMS_FATAL_SOURCE_ASSERT",
-  "RTEMS_FATAL_SOURCE_STACK_CHECKER",
-  "RTEMS_FATAL_SOURCE_EXCEPTION",
-  "RTEMS_FATAL_SOURCE_SMP",
-  "RTEMS_FATAL_SOURCE_PANIC",
-  "RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE",
-  "RTEMS_FATAL_SOURCE_HEAP",
-  "RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT"
-};
-
-const char *rtems_fatal_source_text( rtems_fatal_source source )
-{
-  size_t i = source;
-  const char *text = "?";
-
-  if ( i < RTEMS_ARRAY_SIZE( fatal_source_text ) ) {
-    text = fatal_source_text[ i ];
-  }
-
-  return text;
-}
Index: cpukit/sapi/src/getbuildlabel.c
===================================================================
--- cpukit/sapi/src/getbuildlabel.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_get_build_label().
- */
-
-/*
- * Copyright (C) 2021 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/config.h>
-
-const char *rtems_get_build_label( void )
-{
-#ifdef RTEMS_BUILD_LABEL
-  return RTEMS_BUILD_LABEL;
-#else
-  return "DEFAULT";
-#endif
-}
Index: cpukit/sapi/src/getconfigmax.c
===================================================================
--- cpukit/sapi/src/getconfigmax.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_configuration_get_maximum_barriers(),
- *   rtems_configuration_get_maximum_extensions(),
- *   rtems_configuration_get_maximum_message_queues(),
- *   rtems_configuration_get_maximum_partitions(),
- *   rtems_configuration_get_maximum_periods(),
- *   rtems_configuration_get_maximum_ports(),
- *   rtems_configuration_get_maximum_regions(),
- *   rtems_configuration_get_maximum_semaphores(),
- *   rtems_configuration_get_maximum_tasks(), and
- *   rtems_configuration_get_maximum_timers().
- */
-
-/*
- * Copyright (C) 2018 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/config.h>
-#include <rtems/extensionimpl.h>
-#include <rtems/rtems/barrierimpl.h>
-#include <rtems/rtems/dpmemimpl.h>
-#include <rtems/rtems/messageimpl.h>
-#include <rtems/rtems/partimpl.h>
-#include <rtems/rtems/ratemonimpl.h>
-#include <rtems/rtems/regionimpl.h>
-#include <rtems/rtems/semimpl.h>
-#include <rtems/rtems/tasksimpl.h>
-#include <rtems/rtems/timerimpl.h>
-#include <rtems/score/objectimpl.h>
-
-static uint32_t get_config_max( const Objects_Information *info )
-{
-	if ( _Objects_Is_auto_extend( info ) ) {
-		return info->objects_per_block | RTEMS_UNLIMITED_OBJECTS;
-	}
-
-	return _Objects_Get_maximum_index( info );
-}
-
-uint32_t rtems_configuration_get_maximum_barriers( void )
-{
-	return get_config_max( &_Barrier_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_extensions( void )
-{
-	return get_config_max( &_Extension_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_message_queues( void )
-{
-	return get_config_max( &_Message_queue_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_partitions( void )
-{
-	return get_config_max( &_Partition_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_periods( void )
-{
-	return get_config_max( &_Rate_monotonic_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_ports( void )
-{
-	return get_config_max( &_Dual_ported_memory_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_regions( void )
-{
-	return get_config_max( &_Region_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_semaphores( void )
-{
-	return get_config_max( &_Semaphore_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_timers( void )
-{
-	return get_config_max( &_Timer_Information );
-}
-
-uint32_t rtems_configuration_get_maximum_tasks( void )
-{
-	return get_config_max( &_RTEMS_tasks_Information.Objects );
-}
Index: cpukit/sapi/src/getcopyrightnotice.c
===================================================================
--- cpukit/sapi/src/getcopyrightnotice.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_get_copyright_notice().
- */
-
-/*
- * Copyright (C) 2020 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-#include <rtems/config.h>
-#include <rtems/score/copyrt.h>
-
-const char *rtems_get_copyright_notice( void )
-{
-  return _Copyright_Notice;
-}
Index: cpukit/sapi/src/getversionstring.c
===================================================================
--- cpukit/sapi/src/getversionstring.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_get_version_string().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2008.
- *  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"
-#endif
-
-#include <rtems/config.h>
-#include <rtems/score/copyrt.h>
-
-const char *rtems_get_version_string(void)
-{
-  return _RTEMS_version;
-}
Index: cpukit/sapi/src/interrtext.c
===================================================================
--- cpukit/sapi/src/interrtext.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,102 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   rtems_internal_error_text().
- */
-
-/*
- * Copyright (C) 2012, 2020 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/fatal.h>
-
-static const char *const internal_error_text[] = {
-  "INTERNAL_ERROR_NO_CONFIGURATION_TABLE",
-  "INTERNAL_ERROR_NO_CPU_TABLE",
-  "INTERNAL_ERROR_TOO_LITTLE_WORKSPACE",
-  "INTERNAL_ERROR_WORKSPACE_ALLOCATION",
-  "INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL",
-  "INTERNAL_ERROR_THREAD_EXITTED",
-  "INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION",
-  "INTERNAL_ERROR_INVALID_NODE",
-  "INTERNAL_ERROR_NO_MPCI",
-  "INTERNAL_ERROR_BAD_PACKET",
-  "INTERNAL_ERROR_OUT_OF_PACKETS",
-  "INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS",
-  "INTERNAL_ERROR_OUT_OF_PROXIES",
-  "INTERNAL_ERROR_INVALID_GLOBAL_ID",
-  "INTERNAL_ERROR_BAD_STACK_HOOK",
-  "INTERNAL_ERROR_BAD_ATTRIBUTES",
-  "INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY",
-  "INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL",
-  "INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_FROM_BAD_STATE",
-  "INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0",
-  "INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP",
-  "INTERNAL_ERROR_GXX_KEY_ADD_FAILED",
-  "INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED",
-  "INTERNAL_ERROR_NO_MEMORY_FOR_HEAP",
-  "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR",
-  "INTERNAL_ERROR_RESOURCE_IN_USE",
-  "INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL",
-  "INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL",
-  "INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK",
-  "INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE",
-  "INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL",
-  "INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT",
-  "INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED",
-  "INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED",
-  "INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED",
-  "INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED",
-  "INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED",
-  "INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED",
-  "INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT",
-  "INTERNAL_ERROR_ARC4RANDOM_GETENTROPY_FAIL",
-  "INTERNAL_ERROR_NO_MEMORY_FOR_PER_CPU_DATA",
-  "INTERNAL_ERROR_TOO_LARGE_TLS_SIZE",
-  "INTERNAL_ERROR_RTEMS_INIT_TASK_CONSTRUCT_FAILED",
-  "INTERNAL_ERROR_IDLE_THREAD_CREATE_FAILED",
-  "INTERNAL_ERROR_NO_MEMORY_FOR_IDLE_TASK_STORAGE",
-  "INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL"
-};
-
-const char *rtems_internal_error_text( rtems_fatal_code error )
-{
-  size_t i = error;
-  const char *text = "?";
-
-  if ( i < RTEMS_ARRAY_SIZE( internal_error_text ) ) {
-    text = internal_error_text[ i ];
-  }
-
-  return text;
-}
Index: cpukit/sapi/src/io.c
===================================================================
--- cpukit/sapi/src/io.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ cpukit/sapi/src/io.c	(revision ac7d5ef06a6d6e8d84abbd1f0b82162725f98326)
@@ -1,55 +1,316 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the definition of
- *   ::_IO_All_drivers_initialized and implementation of
- *   _IO_Initialize_all_drivers().
- */
-
 /*
- *  COPYRIGHT (c) 1989-2008.
+ *  Input/Output Manager
+ *
+ *
+ *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
  *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-
-bool _IO_All_drivers_initialized;
+ *  All rights assigned to U.S. Government, 1994.
+ *
+ *  This material may be reproduced by or for the U.S. Government pursuant
+ *  to the copyright license under the clause at DFARS 252.227-7013.  This
+ *  notice must appear in all copies of this file and its derivatives.
+ *
+ *  $Id$
+ */
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/io.h>
+#include <rtems/isr.h>
+#include <rtems/thread.h>
+
+/*PAGE
+ *
+ *  _IO_Initialize_all_drivers
+ *
+ *  This routine initializes all device drivers
+ *
+ *  Input Paramters:   NONE
+ *
+ *  Output Parameters: NONE
+ */
 
 void _IO_Initialize_all_drivers( void )
 {
    rtems_device_major_number major;
-
-   _IO_All_drivers_initialized = true;
+   unsigned32                ignored;
 
    for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
-     (void) rtems_io_initialize( major, 0, NULL );
-}
+     (void) rtems_io_initialize( major, 0, _Configuration_Table, &ignored );
+}
+
+/*PAGE
+ *
+ *  rtems_io_initialize
+ *
+ *  This routine is the initialization directive of the IO manager.
+ *
+ *  Input Paramters:
+ *    major        - device driver number
+ *    minor        - device number
+ *    argument     - pointer to argument(s)
+ *    return_value - pointer to driver's return value
+ *
+ *  Output Parameters:
+ *    returns       - return code
+ *    *return_value - driver's return code
+ */
+
+rtems_status_code rtems_io_initialize(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void             *argument,
+  unsigned32       *return_value
+)
+{
+  return _IO_Handler_routine(
+            IO_INITIALIZE_OPERATION,
+            major,
+            minor,
+            argument,
+            return_value
+         );
+}
+
+/*PAGE
+ *
+ *  rtems_io_open
+ *
+ *  This routine is the open directive of the IO manager.
+ *
+ *  Input Paramters:
+ *    major        - device driver number
+ *    minor        - device number
+ *    argument     - pointer to argument(s)
+ *    return_value - pointer to driver's return value
+ *
+ *  Output Parameters:
+ *    returns       - return code
+ *    *return_value - driver's return code
+ */
+
+rtems_status_code rtems_io_open(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void             *argument,
+  unsigned32       *return_value
+)
+{
+  return _IO_Handler_routine(
+            IO_OPEN_OPERATION,
+            major,
+            minor,
+            argument,
+            return_value
+         );
+}
+
+/*PAGE
+ *
+ *  rtems_io_close
+ *
+ *  This routine is the close directive of the IO manager.
+ *
+ *  Input Paramters:
+ *    major        - device driver number
+ *    minor        - device number
+ *    argument     - pointer to argument(s)
+ *    return_value - pointer to driver's return value
+ *
+ *  Output Parameters:
+ *    returns       - return code
+ *    *return_value - driver's return code
+ */
+
+rtems_status_code rtems_io_close(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void             *argument,
+  unsigned32       *return_value
+)
+{
+  return _IO_Handler_routine(
+            IO_CLOSE_OPERATION,
+            major,
+            minor,
+            argument,
+            return_value
+         );
+}
+
+/*PAGE
+ *
+ *  rtems_io_read
+ *
+ *  This routine is the read directive of the IO manager.
+ *
+ *  Input Paramters:
+ *    major        - device driver number
+ *    minor        - device number
+ *    argument     - pointer to argument(s)
+ *    return_value - pointer to driver's return value
+ *
+ *  Output Parameters:
+ *    returns       - return code
+ *    *return_value - driver's return code
+ */
+
+rtems_status_code rtems_io_read(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void             *argument,
+  unsigned32       *return_value
+)
+{
+  return _IO_Handler_routine(
+            IO_READ_OPERATION,
+            major,
+            minor,
+            argument,
+            return_value
+         );
+}
+
+/*PAGE
+ *
+ *  rtems_io_write
+ *
+ *  This routine is the write directive of the IO manager.
+ *
+ *  Input Paramters:
+ *    major        - device driver number
+ *    minor        - device number
+ *    argument     - pointer to argument(s)
+ *    return_value - pointer to driver's return value
+ *
+ *  Output Parameters:
+ *    returns       - return code
+ *    *return_value - driver's return code
+ */
+
+rtems_status_code rtems_io_write(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void             *argument,
+  unsigned32       *return_value
+)
+{
+  return _IO_Handler_routine(
+            IO_WRITE_OPERATION,
+            major,
+            minor,
+            argument,
+            return_value
+         );
+}
+
+/*PAGE
+ *
+ *  rtems_io_control
+ *
+ *  This routine is the control directive of the IO manager.
+ *
+ *  Input Paramters:
+ *    major        - device driver number
+ *    minor        - device number
+ *    argument     - pointer to argument(s)
+ *    return_value - pointer to driver's return value
+ *
+ *  Output Parameters:
+ *    returns       - return code
+ *    *return_value - driver's return code
+ */
+
+rtems_status_code rtems_io_control(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void             *argument,
+  unsigned32       *return_value
+)
+{
+  return _IO_Handler_routine(
+            IO_CONTROL_OPERATION,
+            major,
+            minor,
+            argument,
+            return_value
+         );
+}
+
+/*PAGE
+ *
+ *  _IO_Handler_routine
+ *
+ *  This routine implements all IO manager directives.
+ *
+ *  Input Paramters:
+ *    operation    - I/O operation to be performed
+ *    major        - device driver number
+ *    minor        - device number
+ *    argument     - pointer to argument(s)
+ *    return_value - pointer to driver's return value
+ *
+ *  Output Parameters:
+ *    returns       - return code
+ *    *return_value - driver's return code
+ */
+
+rtems_status_code _IO_Handler_routine(
+  IO_operations     operation,
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void             *argument,
+  unsigned32       *return_value
+)
+{
+  rtems_device_driver_entry io_callout;
+
+  /*
+   *  NOTE:  There is no range checking as in Ada because:
+   *           + arrays in Ada are not always zero based.
+   *           + with zero based arrays, a comparison of an unsigned
+   *             number being less than zero would be necessary to
+   *             check it as a range.  This would cause a warning for
+   *             checking an unsigned number for being negative.
+   */
+
+  if ( major >= _IO_Number_of_drivers )
+    return ( RTEMS_INVALID_NUMBER );
+
+  switch ( operation ) {
+     case IO_INITIALIZE_OPERATION:
+        io_callout = _IO_Driver_address_table[ major ].initialization;
+        break;
+     case IO_OPEN_OPERATION:
+        io_callout = _IO_Driver_address_table[ major ].open;
+        break;
+     case IO_CLOSE_OPERATION:
+        io_callout = _IO_Driver_address_table[ major ].close;
+        break;
+     case IO_READ_OPERATION:
+        io_callout = _IO_Driver_address_table[ major ].read;
+        break;
+     case IO_WRITE_OPERATION:
+        io_callout = _IO_Driver_address_table[ major ].write;
+        break;
+     case IO_CONTROL_OPERATION:
+        io_callout = _IO_Driver_address_table[ major ].control;
+        break;
+     default:             /* unreached -- only to remove warnings */
+        io_callout = NULL;
+        break;
+  }
+
+  if ( io_callout != NULL )
+     (*io_callout)(
+        major,
+        minor,
+        argument,
+        _Thread_Executing->Object.id,
+        return_value
+     );
+  else
+     *return_value = 0;
+
+  return( RTEMS_SUCCESSFUL );
+}
Index: cpukit/sapi/src/ioclose.c
===================================================================
--- cpukit/sapi/src/ioclose.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of rtems_io_close().
- */
-
-/*
- *  Input/Output Manager -- Close Device
- *
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-
-rtems_status_code rtems_io_close(
-  rtems_device_major_number  major,
-  rtems_device_minor_number  minor,
-  void                      *argument
-)
-{
-  rtems_device_driver_entry callout;
-
-  if ( major >= _IO_Number_of_drivers )
-    return RTEMS_INVALID_NUMBER;
-
-  callout = _IO_Driver_address_table[major].close_entry;
-  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
Index: cpukit/sapi/src/iocontrol.c
===================================================================
--- cpukit/sapi/src/iocontrol.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of rtems_io_control().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-
-rtems_status_code rtems_io_control(
-  rtems_device_major_number  major,
-  rtems_device_minor_number  minor,
-  void                      *argument
-)
-{
-  rtems_device_driver_entry callout;
-
-  if ( major >= _IO_Number_of_drivers )
-    return RTEMS_INVALID_NUMBER;
-
-  callout = _IO_Driver_address_table[major].control_entry;
-  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
Index: cpukit/sapi/src/iodefault.c
===================================================================
--- cpukit/sapi/src/iodefault.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains a definition of ::_IO_Driver_address_table
- *   and ::_IO_Number_of_drivers with zero drivers.
- */
-
-/*
- * Copyright (C) 2020 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/ioimpl.h>
-
-rtems_driver_address_table _IO_Driver_address_table[ 0 ];
-
-const size_t _IO_Number_of_drivers = 0;
Index: cpukit/sapi/src/ioinitialize.c
===================================================================
--- cpukit/sapi/src/ioinitialize.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of rtems_io_initialize().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-
-rtems_status_code rtems_io_initialize(
-  rtems_device_major_number  major,
-  rtems_device_minor_number  minor,
-  void                      *argument
-)
-{
-  rtems_device_driver_entry callout;
-
-  if ( major >= _IO_Number_of_drivers )
-    return RTEMS_INVALID_NUMBER;
-
-  callout = _IO_Driver_address_table[major].initialization_entry;
-  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
Index: cpukit/sapi/src/ioopen.c
===================================================================
--- cpukit/sapi/src/ioopen.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of rtems_io_open().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-
-rtems_status_code rtems_io_open(
-  rtems_device_major_number  major,
-  rtems_device_minor_number  minor,
-  void                      *argument
-)
-{
-  rtems_device_driver_entry callout;
-
-  if ( major >= _IO_Number_of_drivers )
-    return RTEMS_INVALID_NUMBER;
-
-  callout = _IO_Driver_address_table[major].open_entry;
-  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
Index: cpukit/sapi/src/ioread.c
===================================================================
--- cpukit/sapi/src/ioread.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of rtems_io_read().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-
-rtems_status_code rtems_io_read(
-  rtems_device_major_number  major,
-  rtems_device_minor_number  minor,
-  void                      *argument
-)
-{
-  rtems_device_driver_entry callout;
-
-  if ( major >= _IO_Number_of_drivers )
-    return RTEMS_INVALID_NUMBER;
-
-  callout = _IO_Driver_address_table[major].read_entry;
-  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
Index: cpukit/sapi/src/ioregisterdriver.c
===================================================================
--- cpukit/sapi/src/ioregisterdriver.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,144 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of
- *   rtems_io_register_driver().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2009.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  Copyright (c) 2009 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/ioimpl.h>
-#include <rtems/rtems/intr.h>
-
-ISR_LOCK_DEFINE( , _IO_Driver_registration_lock, "IO Driver Registration" )
-
-static inline bool rtems_io_is_empty_table(
-  const rtems_driver_address_table *table
-)
-{
-  return table->initialization_entry == NULL && table->open_entry == NULL;
-}
-
-static rtems_status_code rtems_io_obtain_major_number(
-  rtems_device_major_number *major
-)
-{
-  rtems_device_major_number n = _IO_Number_of_drivers;
-  rtems_device_major_number m = 0;
-
-  /* major is error checked by caller */
-
-  for ( m = 0; m < n; ++m ) {
-    rtems_driver_address_table *const table = _IO_Driver_address_table + m;
-
-    if ( rtems_io_is_empty_table( table ) )
-      break;
-  }
-
-  /* Assigns invalid value in case of failure */
-  *major = m;
-
-  if ( m != n )
-    return RTEMS_SUCCESSFUL;
-
-  return RTEMS_TOO_MANY;
-}
-
-rtems_status_code rtems_io_register_driver(
-  rtems_device_major_number         major,
-  const rtems_driver_address_table *driver_table,
-  rtems_device_major_number        *registered_major
-)
-{
-  rtems_device_major_number major_limit = _IO_Number_of_drivers;
-  ISR_lock_Context lock_context;
-
-  if ( rtems_interrupt_is_in_progress() )
-    return RTEMS_CALLED_FROM_ISR;
-
-  if ( registered_major == NULL )
-    return RTEMS_INVALID_ADDRESS;
-
-  /* Set it to an invalid value */
-  *registered_major = major_limit;
-
-  if ( driver_table == NULL )
-    return RTEMS_INVALID_ADDRESS;
-
-  if ( rtems_io_is_empty_table( driver_table ) )
-    return RTEMS_INVALID_ADDRESS;
-
-  if ( major >= major_limit )
-    return RTEMS_INVALID_NUMBER;
-
-  _IO_Driver_registration_acquire( &lock_context );
-
-  if ( major == 0 ) {
-    rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
-
-    if ( sc != RTEMS_SUCCESSFUL ) {
-      _IO_Driver_registration_release( &lock_context );
-      return sc;
-    }
-    major = *registered_major;
-  } else {
-    rtems_driver_address_table *const table = _IO_Driver_address_table + major;
-
-    if ( !rtems_io_is_empty_table( table ) ) {
-      _IO_Driver_registration_release( &lock_context );
-      return RTEMS_RESOURCE_IN_USE;
-    }
-
-    *registered_major = major;
-  }
-
-  _IO_Driver_address_table [major] = *driver_table;
-
-  _IO_Driver_registration_release( &lock_context );
-
-  if ( _IO_All_drivers_initialized ) {
-    /* Other drivers have already been initialized, we initialize
-     * the driver directly.
-     */
-    return rtems_io_initialize( major, 0, NULL );
-  } else {
-    /* The driver will be initialized together with all other drivers
-     * in a later stage by _IO_Initialize_all_drivers().
-     */
-    return RTEMS_SUCCESSFUL;
-  }
-}
Index: cpukit/sapi/src/iounregisterdriver.c
===================================================================
--- cpukit/sapi/src/iounregisterdriver.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of
- *   rtems_io_unregister_driver().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-#include <rtems/rtems/intr.h>
-
-#include <string.h>
-
-rtems_status_code rtems_io_unregister_driver(
-  rtems_device_major_number major
-)
-{
-  if ( rtems_interrupt_is_in_progress() )
-    return RTEMS_CALLED_FROM_ISR;
-
-  if ( major < _IO_Number_of_drivers ) {
-    ISR_lock_Context lock_context;
-
-    _IO_Driver_registration_acquire( &lock_context );
-    memset(
-      &_IO_Driver_address_table[major],
-      0,
-      sizeof( rtems_driver_address_table )
-    );
-    _IO_Driver_registration_release( &lock_context );
-
-    return RTEMS_SUCCESSFUL;
-  }
-
-  return RTEMS_UNSATISFIED;
-}
Index: cpukit/sapi/src/iowrite.c
===================================================================
--- cpukit/sapi/src/iowrite.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassicIO
- *
- * @brief This source file contains the implementation of rtems_io_write().
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  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"
-#endif
-
-#include <rtems/ioimpl.h>
-
-rtems_status_code rtems_io_write(
-  rtems_device_major_number  major,
-  rtems_device_minor_number  minor,
-  void                      *argument
-)
-{
-  rtems_device_driver_entry callout;
-
-  if ( major >= _IO_Number_of_drivers )
-    return RTEMS_INVALID_NUMBER;
-
-  callout = _IO_Driver_address_table[major].write_entry;
-  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
-}
Index: cpukit/sapi/src/panic.c
===================================================================
--- cpukit/sapi/src/panic.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/**
- * @file
- *
- * @ingroup ErrorPanicSupport
- *
- * @brief This source file contains the implementation of
- *   rtems_panic().
- */
-
-/*
- * Copyright (c) 2017 embedded brains GmbH & Co. KG
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/fatal.h>
-#include <rtems/bspIo.h>
-
-#include <stdarg.h>
-
-void rtems_panic( const char *fmt, ... )
-{
-  va_list ap;
-
-  va_start( ap, fmt );
-  vprintk( fmt, ap );
-  va_end( ap);
-
-  _Terminate( RTEMS_FATAL_SOURCE_PANIC, (Internal_errors_t) fmt );
-}
Index: cpukit/sapi/src/profilingiterate.c
===================================================================
--- cpukit/sapi/src/profilingiterate.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,172 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIProfiling
- *
- * @brief This source file contains the implementation of
- *   rtems_profiling_iterate().
- */
-
-/*
- * Copyright (c) 2014 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/profiling.h>
-#include <rtems/counter.h>
-#include <rtems/score/percpu.h>
-#include <rtems/score/smplock.h>
-#include <rtems.h>
-
-#include <string.h>
-
-static void per_cpu_stats_iterate(
-  rtems_profiling_visitor visitor,
-  void *visitor_arg,
-  rtems_profiling_data *data
-)
-{
-#ifdef RTEMS_PROFILING
-  uint32_t n = rtems_scheduler_get_processor_maximum();
-  uint32_t i;
-
-  memset(data, 0, sizeof(*data));
-  data->header.type = RTEMS_PROFILING_PER_CPU;
-  for (i = 0; i < n; ++i) {
-    const Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index(i);
-    const Per_CPU_Stats *stats = &per_cpu->Stats;
-    rtems_profiling_per_cpu *per_cpu_data = &data->per_cpu;
-
-    per_cpu_data->processor_index = i;
-
-    per_cpu_data->max_thread_dispatch_disabled_time =
-      rtems_counter_ticks_to_nanoseconds(
-        stats->max_thread_dispatch_disabled_time
-      );
-
-    per_cpu_data->max_interrupt_time =
-      rtems_counter_ticks_to_nanoseconds(stats->max_interrupt_time);
-
-    per_cpu_data->max_interrupt_delay =
-      rtems_counter_ticks_to_nanoseconds(stats->max_interrupt_delay);
-
-    per_cpu_data->thread_dispatch_disabled_count =
-      stats->thread_dispatch_disabled_count;
-
-    per_cpu_data->total_thread_dispatch_disabled_time =
-      rtems_counter_ticks_to_nanoseconds(
-        stats->total_thread_dispatch_disabled_time
-      );
-
-    per_cpu_data->interrupt_count = stats->interrupt_count;
-
-    per_cpu_data->total_interrupt_time =
-      rtems_counter_ticks_to_nanoseconds(
-        stats->total_interrupt_time
-      );
-
-    (*visitor)(visitor_arg, data);
-  }
-#else
-  (void) visitor;
-  (void) visitor_arg;
-  (void) data;
-#endif
-}
-
-#if defined(RTEMS_PROFILING) && defined(RTEMS_SMP)
-RTEMS_STATIC_ASSERT(
-  RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS
-    == SMP_LOCK_STATS_CONTENTION_COUNTS,
-  smp_lock_contention_counts
-);
-#endif
-
-static void smp_lock_stats_iterate(
-  rtems_profiling_visitor visitor,
-  void *visitor_arg,
-  rtems_profiling_data *data
-)
-{
-#if defined(RTEMS_PROFILING) && defined(RTEMS_SMP)
-  SMP_lock_Stats_iteration_context iteration_context;
-  SMP_lock_Stats snapshot;
-  char name[64];
-
-  memset(data, 0, sizeof(*data));
-  data->header.type = RTEMS_PROFILING_SMP_LOCK;
-
-  _SMP_lock_Stats_iteration_start(&iteration_context);
-  while (
-    _SMP_lock_Stats_iteration_next(
-      &iteration_context,
-      &snapshot,
-      &name[0],
-      sizeof(name)
-    )
-  ) {
-    rtems_profiling_smp_lock *smp_lock_data = &data->smp_lock;
-
-    smp_lock_data->name = name;
-    smp_lock_data->max_acquire_time =
-      rtems_counter_ticks_to_nanoseconds(snapshot.max_acquire_time);
-    smp_lock_data->max_section_time =
-      rtems_counter_ticks_to_nanoseconds(snapshot.max_section_time);
-    smp_lock_data->usage_count = snapshot.usage_count;
-    smp_lock_data->total_acquire_time =
-      rtems_counter_ticks_to_nanoseconds(snapshot.total_acquire_time);
-    smp_lock_data->total_section_time =
-      rtems_counter_ticks_to_nanoseconds(snapshot.total_section_time);
-
-    memcpy(
-      &smp_lock_data->contention_counts[0],
-      &snapshot.contention_counts[0],
-      sizeof(smp_lock_data->contention_counts)
-    );
-
-    (*visitor)(visitor_arg, data);
-  }
-  _SMP_lock_Stats_iteration_stop(&iteration_context);
-#else
-  (void) visitor;
-  (void) visitor_arg;
-  (void) data;
-#endif
-}
-
-void rtems_profiling_iterate(
-  rtems_profiling_visitor visitor,
-  void *visitor_arg
-)
-{
-  rtems_profiling_data data;
-
-  per_cpu_stats_iterate(visitor, visitor_arg, &data);
-  smp_lock_stats_iterate(visitor, visitor_arg, &data);
-}
Index: cpukit/sapi/src/profilingreportxml.c
===================================================================
--- cpukit/sapi/src/profilingreportxml.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,330 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIProfiling
- *
- * @brief This source file contains the implementation of
- *   rtems_profiling_report_xml().
- */
-
-/*
- * Copyright (c) 2014 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/profiling.h>
-
-#ifdef RTEMS_PROFILING
-
-#include <inttypes.h>
-
-typedef struct {
-  const rtems_printer *printer;
-  uint32_t indentation_level;
-  const char *indentation;
-  int retval;
-} context;
-
-static void update_retval(context *ctx, int rv)
-{
-  if (rv > 0 && ctx->retval >= 0) {
-    ctx->retval += rv;
-  }
-}
-
-static void indent(context *ctx, uint32_t indentation_level)
-{
-  uint32_t n = ctx->indentation_level + indentation_level;
-  uint32_t i;
-
-  for (i = 0; i < n; ++i) {
-    int rv = rtems_printf(ctx->printer, "%s", ctx->indentation);
-
-    update_retval(ctx, rv);
-  }
-}
-
-static uint64_t arithmetic_mean(uint64_t total, uint64_t count)
-{
-  return count != 0 ? total / count : 0;
-}
-
-static void report_per_cpu(context *ctx, const rtems_profiling_per_cpu *per_cpu)
-{
-  int rv;
-
-  indent(ctx, 1);
-  rv = rtems_printf(
-    ctx->printer,
-    "<PerCPUProfilingReport processorIndex=\"%" PRIu32 "\">\n",
-    per_cpu->processor_index
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MaxThreadDispatchDisabledTime unit=\"ns\">%" PRIu32
-      "</MaxThreadDispatchDisabledTime>\n",
-    per_cpu->max_thread_dispatch_disabled_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MeanThreadDispatchDisabledTime unit=\"ns\">%" PRIu64
-      "</MeanThreadDispatchDisabledTime>\n",
-    arithmetic_mean(
-      per_cpu->total_thread_dispatch_disabled_time,
-      per_cpu->thread_dispatch_disabled_count
-    )
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<TotalThreadDispatchDisabledTime unit=\"ns\">%" PRIu64
-      "</TotalThreadDispatchDisabledTime>\n",
-    per_cpu->total_thread_dispatch_disabled_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<ThreadDispatchDisabledCount>%" PRIu64 "</ThreadDispatchDisabledCount>\n",
-    per_cpu->thread_dispatch_disabled_count
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MaxInterruptDelay unit=\"ns\">%" PRIu32 "</MaxInterruptDelay>\n",
-    per_cpu->max_interrupt_delay
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MaxInterruptTime unit=\"ns\">%" PRIu32
-      "</MaxInterruptTime>\n",
-    per_cpu->max_interrupt_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MeanInterruptTime unit=\"ns\">%" PRIu64
-      "</MeanInterruptTime>\n",
-    arithmetic_mean(
-      per_cpu->total_interrupt_time,
-      per_cpu->interrupt_count
-    )
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<TotalInterruptTime unit=\"ns\">%" PRIu64 "</TotalInterruptTime>\n",
-    per_cpu->total_interrupt_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<InterruptCount>%" PRIu64 "</InterruptCount>\n",
-    per_cpu->interrupt_count
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 1);
-  rv = rtems_printf(
-    ctx->printer,
-    "</PerCPUProfilingReport>\n"
-  );
-  update_retval(ctx, rv);
-}
-
-static void report_smp_lock(context *ctx, const rtems_profiling_smp_lock *smp_lock)
-{
-  int rv;
-  uint32_t i;
-
-  indent(ctx, 1);
-  rv = rtems_printf(
-    ctx->printer,
-    "<SMPLockProfilingReport name=\"%s\">\n",
-    smp_lock->name
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MaxAcquireTime unit=\"ns\">%" PRIu32 "</MaxAcquireTime>\n",
-    smp_lock->max_acquire_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MaxSectionTime unit=\"ns\">%" PRIu32 "</MaxSectionTime>\n",
-    smp_lock->max_section_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MeanAcquireTime unit=\"ns\">%" PRIu64
-      "</MeanAcquireTime>\n",
-    arithmetic_mean(
-      smp_lock->total_acquire_time,
-      smp_lock->usage_count
-    )
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<MeanSectionTime unit=\"ns\">%" PRIu64
-      "</MeanSectionTime>\n",
-    arithmetic_mean(
-      smp_lock->total_section_time,
-      smp_lock->usage_count
-    )
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<TotalAcquireTime unit=\"ns\">%" PRIu64 "</TotalAcquireTime>\n",
-    smp_lock->total_acquire_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<TotalSectionTime unit=\"ns\">%" PRIu64 "</TotalSectionTime>\n",
-    smp_lock->total_section_time
-  );
-  update_retval(ctx, rv);
-
-  indent(ctx, 2);
-  rv = rtems_printf(
-    ctx->printer,
-    "<UsageCount>%" PRIu64 "</UsageCount>\n",
-    smp_lock->usage_count
-  );
-  update_retval(ctx, rv);
-
-  for (i = 0; i < RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS; ++i) {
-    indent(ctx, 2);
-    rv = rtems_printf(
-      ctx->printer,
-      "<ContentionCount initialQueueLength=\"%" PRIu32 "\">%"
-        PRIu64 "</ContentionCount>\n",
-      i,
-      smp_lock->contention_counts[i]
-    );
-    update_retval(ctx, rv);
-  }
-
-  indent(ctx, 1);
-  rv = rtems_printf(
-    ctx->printer,
-    "</SMPLockProfilingReport>\n"
-  );
-  update_retval(ctx, rv);
-}
-
-static void report(void *arg, const rtems_profiling_data *data)
-{
-  context *ctx = arg;
-
-  switch (data->header.type) {
-    case RTEMS_PROFILING_PER_CPU:
-      report_per_cpu(ctx, &data->per_cpu);
-      break;
-    case RTEMS_PROFILING_SMP_LOCK:
-      report_smp_lock(ctx, &data->smp_lock);
-      break;
-  }
-}
-
-#endif /* RTEMS_PROFILING */
-
-int rtems_profiling_report_xml(
-  const char *name,
-  const rtems_printer *printer,
-  uint32_t indentation_level,
-  const char *indentation
-)
-{
-#ifdef RTEMS_PROFILING
-  context ctx_instance = {
-    .printer = printer,
-    .indentation_level = indentation_level,
-    .indentation = indentation,
-    .retval = 0
-  };
-  context *ctx = &ctx_instance;
-  int rv;
-
-  indent(ctx, 0);
-  rv = rtems_printf(printer, "<ProfilingReport name=\"%s\">\n", name);
-  update_retval(ctx, rv);
-
-  rtems_profiling_iterate(report, ctx);
-
-  indent(ctx, 0);
-  rv = rtems_printf(printer, "</ProfilingReport>\n");
-  update_retval(ctx, rv);
-
-  return ctx->retval;
-#else /* RTEMS_PROFILING */
-  (void) name;
-  (void) printer;
-  (void) indentation_level;
-  (void) indentation;
-
-  return 0;
-#endif /* RTEMS_PROFILING */
-}
Index: cpukit/sapi/src/rbheap.c
===================================================================
--- cpukit/sapi/src/rbheap.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,298 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIRBHeap
- *
- * @brief This source file contains the implementation of
- *   rtems_rbheap_allocate(), rtems_rbheap_extend_descriptors_never(),
- *   rtems_rbheap_extend_descriptors_with_malloc(), rtems_rbheap_free(), and
- *   rtems_rbheap_initialize().
- */
-
-/*
- * Copyright (C) 2012, 2015 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/rbheap.h>
-
-#include <stdlib.h>
-
-static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
-{
-  uintptr_t excess = value % alignment;
-
-  if (excess > 0) {
-    value += alignment - excess;
-  }
-
-  return value;
-}
-
-static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
-{
-  uintptr_t excess = value % alignment;
-
-  return value - excess;
-}
-
-static rtems_rbtree_compare_result chunk_compare(
-  const rtems_rbtree_node *a,
-  const rtems_rbtree_node *b
-)
-{
-  const rtems_rbheap_chunk *left = rtems_rbheap_chunk_of_node(a);
-  const rtems_rbheap_chunk *right = rtems_rbheap_chunk_of_node(b);
-
-  return (rtems_rbtree_compare_result)
-    ((left->begin >> 1) - (right->begin >> 1));
-}
-
-static rtems_rbheap_chunk *get_chunk(rtems_rbheap_control *control)
-{
-  rtems_chain_control *chain = &control->spare_descriptor_chain;
-  rtems_chain_node *chunk = rtems_chain_get_unprotected(chain);
-
-  if (chunk == NULL) {
-    (*control->extend_descriptors)(control);
-    chunk = rtems_chain_get_unprotected(chain);
-  }
-
-  return (rtems_rbheap_chunk *) chunk;
-}
-
-static void add_to_chain(
-  rtems_chain_control *chain,
-  rtems_rbheap_chunk *chunk
-)
-{
-  rtems_chain_initialize_node(&chunk->chain_node);
-  rtems_chain_prepend_unprotected(chain, &chunk->chain_node);
-}
-
-static void insert_into_tree(
-  rtems_rbtree_control *tree,
-  rtems_rbheap_chunk *chunk
-)
-{
-  rtems_rbtree_insert(tree, &chunk->tree_node, chunk_compare, true);
-}
-
-rtems_status_code rtems_rbheap_initialize(
-  rtems_rbheap_control *control,
-  void *area_begin,
-  uintptr_t area_size,
-  uintptr_t alignment,
-  rtems_rbheap_extend_descriptors extend_descriptors,
-  void *handler_arg
-)
-{
-  rtems_status_code sc = RTEMS_SUCCESSFUL;
-  uintptr_t begin = (uintptr_t) area_begin;
-  uintptr_t end = begin + area_size;
-  uintptr_t aligned_begin;
-  uintptr_t aligned_end;
-
-  /*
-   * Ensure that the alignment is at least two, so that we can keep
-   * chunk_compare() that simple.
-   */
-  alignment = alignment < 2 ? 2 : alignment;
-
-  aligned_begin = align_up(alignment, begin);
-  aligned_end = align_down(alignment, end);
-
-  if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
-    rtems_chain_control *free_chain = &control->free_chunk_chain;
-    rtems_rbtree_control *chunk_tree = &control->chunk_tree;
-    rtems_rbheap_chunk *first = NULL;
-
-    rtems_chain_initialize_empty(free_chain);
-    rtems_chain_initialize_empty(&control->spare_descriptor_chain);
-    rtems_rbtree_initialize_empty(chunk_tree);
-    control->alignment = alignment;
-    control->handler_arg = handler_arg;
-    control->extend_descriptors = extend_descriptors;
-
-    first = get_chunk(control);
-    if (first != NULL) {
-      first->begin = aligned_begin;
-      first->size = aligned_end - aligned_begin;
-      add_to_chain(free_chain, first);
-      insert_into_tree(chunk_tree, first);
-    } else {
-      sc = RTEMS_NO_MEMORY;
-    }
-  } else {
-    sc = RTEMS_INVALID_ADDRESS;
-  }
-
-  return sc;
-}
-
-static rtems_rbheap_chunk *search_free_chunk(
-  rtems_chain_control *free_chain,
-  size_t size
-)
-{
-  rtems_chain_node *current = rtems_chain_first(free_chain);
-  const rtems_chain_node *tail = rtems_chain_tail(free_chain);
-  rtems_rbheap_chunk *big_enough = NULL;
-
-  while (current != tail && big_enough == NULL) {
-    rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
-
-    if (free_chunk->size >= size) {
-      big_enough = free_chunk;
-    }
-
-    current = rtems_chain_next(current);
-  }
-
-  return big_enough;
-}
-
-void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
-{
-  void *ptr = NULL;
-  rtems_chain_control *free_chain = &control->free_chunk_chain;
-  rtems_rbtree_control *chunk_tree = &control->chunk_tree;
-  uintptr_t alignment = control->alignment;
-  uintptr_t aligned_size = align_up(alignment, size);
-
-  if (size > 0 && size <= aligned_size) {
-    rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
-
-    if (free_chunk != NULL) {
-      uintptr_t free_size = free_chunk->size;
-
-      if (free_size > aligned_size) {
-        rtems_rbheap_chunk *new_chunk = get_chunk(control);
-
-        if (new_chunk != NULL) {
-          uintptr_t new_free_size = free_size - aligned_size;
-
-          free_chunk->size = new_free_size;
-          new_chunk->begin = free_chunk->begin + new_free_size;
-          new_chunk->size = aligned_size;
-          rtems_chain_set_off_chain(&new_chunk->chain_node);
-          insert_into_tree(chunk_tree, new_chunk);
-          ptr = (void *) new_chunk->begin;
-        }
-      } else {
-        rtems_chain_extract_unprotected(&free_chunk->chain_node);
-        rtems_chain_set_off_chain(&free_chunk->chain_node);
-        ptr = (void *) free_chunk->begin;
-      }
-    }
-  }
-
-  return ptr;
-}
-
-#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
-
-static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
-{
-  rtems_rbheap_chunk chunk = { .begin = key };
-
-  return rtems_rbheap_chunk_of_node(
-    rtems_rbtree_find(chunk_tree, &chunk.tree_node, chunk_compare, true)
-  );
-}
-
-static rtems_rbheap_chunk *pred(const rtems_rbheap_chunk *chunk)
-{
-  return rtems_rbheap_chunk_of_node(
-    rtems_rbtree_predecessor(&chunk->tree_node)
-  );
-}
-
-static rtems_rbheap_chunk *succ(const rtems_rbheap_chunk *chunk)
-{
-  return rtems_rbheap_chunk_of_node(
-    rtems_rbtree_successor(&chunk->tree_node)
-  );
-}
-
-static void check_and_merge(
-  rtems_rbheap_control *control,
-  rtems_rbheap_chunk *a,
-  rtems_rbheap_chunk *b,
-  rtems_rbheap_chunk *c
-)
-{
-  if (c != NULL_PAGE && rtems_rbheap_is_chunk_free(c)) {
-    a->size += b->size;
-    rtems_chain_extract_unprotected(&b->chain_node);
-    rtems_rbheap_add_to_spare_descriptor_chain(control, b);
-    rtems_rbtree_extract(&control->chunk_tree, &b->tree_node);
-  }
-}
-
-rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
-{
-  rtems_status_code sc = RTEMS_SUCCESSFUL;
-
-  if (ptr != NULL) {
-    rtems_rbheap_chunk *chunk = find(&control->chunk_tree, (uintptr_t) ptr);
-
-    if (chunk != NULL_PAGE) {
-      if (!rtems_rbheap_is_chunk_free(chunk)) {
-        rtems_rbheap_chunk *other;
-
-        add_to_chain(&control->free_chunk_chain, chunk);
-        other = succ(chunk);
-        check_and_merge(control, chunk, other, other);
-        other = pred(chunk);
-        check_and_merge(control, other, chunk, other);
-      } else {
-        sc = RTEMS_INCORRECT_STATE;
-      }
-    } else {
-      sc = RTEMS_INVALID_ID;
-    }
-  }
-
-  return sc;
-}
-
-void rtems_rbheap_extend_descriptors_never(rtems_rbheap_control *control)
-{
-  /* Do nothing */
-}
-
-void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
-{
-  rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
-
-  if (chunk != NULL) {
-    rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
-  }
-}
Index: cpukit/sapi/src/rbtree.c
===================================================================
--- cpukit/sapi/src/rbtree.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicRBTrees
- *
- * @brief This source file contains the implementation of
- *   rtems_rbtree_initialize().
- */
-
-/*
- *  Copyright (c) 2010 Gedare Bloom.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/rbtree.h>
-#include <rtems/score/address.h>
-
-void rtems_rbtree_initialize(
-  rtems_rbtree_control *the_rbtree,
-  rtems_rbtree_compare  compare,
-  void                 *starting_address,
-  size_t                number_nodes,
-  size_t                node_size,
-  bool                  is_unique
-)
-{
-  size_t             count;
-  rtems_rbtree_node *next;
-
-  /* could do sanity checks here */
-  rtems_rbtree_initialize_empty( the_rbtree );
-
-  count = number_nodes;
-  next = starting_address;
-
-  while ( count-- ) {
-    rtems_rbtree_insert( the_rbtree, next, compare, is_unique );
-    next = (rtems_rbtree_node *) _Addresses_Add_offset( next, node_size );
-  }
-}
Index: cpukit/sapi/src/rbtreefind.c
===================================================================
--- cpukit/sapi/src/rbtreefind.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicRBTrees
- *
- * @brief This source file contains the implementation of
- *   rtems_rbtree_find().
- */
-
-/*
- *  Copyright (c) 2010 Gedare Bloom.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/rbtree.h>
-
-rtems_rbtree_node *rtems_rbtree_find(
-  const rtems_rbtree_control *the_rbtree,
-  const rtems_rbtree_node    *the_node,
-  rtems_rbtree_compare        compare,
-  bool                  is_unique
-)
-{
-  rtems_rbtree_node *iter_node = rtems_rbtree_root( the_rbtree );
-  rtems_rbtree_node *found = NULL;
-
-  while ( iter_node != NULL ) {
-    rtems_rbtree_compare_result compare_result =
-      ( *compare )( the_node, iter_node );
-
-    if ( rtems_rbtree_is_equal( compare_result ) ) {
-      found = iter_node;
-
-      if ( is_unique )
-        break;
-    }
-
-    if ( rtems_rbtree_is_greater( compare_result ) ) {
-      iter_node = rtems_rbtree_right( iter_node );
-    } else {
-      iter_node = rtems_rbtree_left( iter_node );
-    }
-  }
-
-  return found;
-}
Index: cpukit/sapi/src/sapirbtreeinsert.c
===================================================================
--- cpukit/sapi/src/sapirbtreeinsert.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,85 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicRBTrees
- *
- * @brief This source file contains the implementation of
- *   rtems_rbtree_insert().
- */
-
-/*
- *  Copyright (c) 2010-2012 Gedare Bloom.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/rbtree.h>
-
-RTEMS_STATIC_ASSERT(
-  sizeof( rtems_rbtree_compare_result ) >= sizeof( intptr_t ),
-  rtems_rbtree_compare_result_intptr_t
-);
-
-RTEMS_STATIC_ASSERT(
-  sizeof( rtems_rbtree_compare_result ) >= sizeof( int32_t ),
-  rtems_rbtree_compare_result_int32_t
-);
-
-rtems_rbtree_node *rtems_rbtree_insert(
-  rtems_rbtree_control *the_rbtree,
-  rtems_rbtree_node    *the_node,
-  rtems_rbtree_compare  compare,
-  bool                  is_unique
-)
-{
-  rtems_rbtree_node **which = _RBTree_Root_reference( the_rbtree );
-  rtems_rbtree_node  *parent = NULL;
-
-  while ( *which != NULL ) {
-    rtems_rbtree_compare_result compare_result;
-
-    parent = *which;
-    compare_result = ( *compare )( the_node, parent );
-
-    if ( is_unique && rtems_rbtree_is_equal( compare_result ) ) {
-      return parent;
-    }
-
-    if ( rtems_rbtree_is_lesser( compare_result ) ) {
-      which = _RBTree_Left_reference( parent );
-    } else {
-      which = _RBTree_Right_reference( parent );
-    }
-  }
-
-  _RBTree_Initialize_node( the_node );
-  _RBTree_Add_child( the_node, parent, which );
-  _RBTree_Insert_color( the_rbtree, the_node );
-
-  return NULL;
-}
Index: cpukit/sapi/src/sysinitverbose.c
===================================================================
--- cpukit/sapi/src/sysinitverbose.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,599 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of
- *   _Sysinit_Verbose().
- */
-
-/*
- * Copyright (C) 2020 embedded brains GmbH & Co. KG
- *
- * 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 <rtems/sysinit.h>
-#include <rtems/score/memory.h>
-#include <rtems/bspIo.h>
-
-#include <inttypes.h>
-
-RTEMS_LINKER_RWSET_ITEM_DECLARE(
-  _Sysinit,
-  rtems_sysinit_item,
-  _Sysinit_Verbose
-);
-
-#define SYSINIT_VERBOSE(x) \
-  static void _Sysinit_Verbose_##x( void ); \
-  RTEMS_SYSINIT_ITEM( \
-    _Sysinit_Verbose_##x, \
-    RTEMS_SYSINIT_##x, \
-    RTEMS_SYSINIT_ORDER_LAST \
-  )
-
-SYSINIT_VERBOSE( BSP_EARLY );
-SYSINIT_VERBOSE( MEMORY );
-SYSINIT_VERBOSE( DIRTY_MEMORY );
-SYSINIT_VERBOSE( ZERO_MEMORY );
-SYSINIT_VERBOSE( ISR_STACK );
-SYSINIT_VERBOSE( PER_CPU_DATA );
-SYSINIT_VERBOSE( SBRK );
-SYSINIT_VERBOSE( STACK_ALLOCATOR );
-SYSINIT_VERBOSE( WORKSPACE );
-SYSINIT_VERBOSE( MALLOC );
-SYSINIT_VERBOSE( BSP_START );
-SYSINIT_VERBOSE( CPU_COUNTER );
-SYSINIT_VERBOSE( TARGET_HASH );
-SYSINIT_VERBOSE( INITIAL_EXTENSIONS );
-SYSINIT_VERBOSE( MP_EARLY );
-SYSINIT_VERBOSE( DATA_STRUCTURES );
-SYSINIT_VERBOSE( MP );
-SYSINIT_VERBOSE( USER_EXTENSIONS );
-SYSINIT_VERBOSE( CLASSIC_TASKS );
-SYSINIT_VERBOSE( CLASSIC_TASKS_MP );
-SYSINIT_VERBOSE( CLASSIC_TIMER );
-SYSINIT_VERBOSE( CLASSIC_SIGNAL_MP );
-SYSINIT_VERBOSE( CLASSIC_EVENT_MP );
-SYSINIT_VERBOSE( CLASSIC_MESSAGE_QUEUE );
-SYSINIT_VERBOSE( CLASSIC_MESSAGE_QUEUE_MP );
-SYSINIT_VERBOSE( CLASSIC_SEMAPHORE );
-SYSINIT_VERBOSE( CLASSIC_SEMAPHORE_MP );
-SYSINIT_VERBOSE( CLASSIC_PARTITION );
-SYSINIT_VERBOSE( CLASSIC_PARTITION_MP );
-SYSINIT_VERBOSE( CLASSIC_REGION );
-SYSINIT_VERBOSE( CLASSIC_DUAL_PORTED_MEMORY );
-SYSINIT_VERBOSE( CLASSIC_RATE_MONOTONIC );
-SYSINIT_VERBOSE( CLASSIC_BARRIER );
-SYSINIT_VERBOSE( POSIX_SIGNALS );
-SYSINIT_VERBOSE( POSIX_THREADS );
-SYSINIT_VERBOSE( POSIX_MESSAGE_QUEUE );
-SYSINIT_VERBOSE( POSIX_SEMAPHORE );
-SYSINIT_VERBOSE( POSIX_TIMER );
-SYSINIT_VERBOSE( POSIX_SHM );
-SYSINIT_VERBOSE( POSIX_KEYS );
-SYSINIT_VERBOSE( POSIX_CLEANUP );
-SYSINIT_VERBOSE( IDLE_THREADS );
-SYSINIT_VERBOSE( LIBIO );
-SYSINIT_VERBOSE( USER_ENVIRONMENT );
-SYSINIT_VERBOSE( ROOT_FILESYSTEM );
-SYSINIT_VERBOSE( DRVMGR );
-SYSINIT_VERBOSE( MP_SERVER );
-SYSINIT_VERBOSE( BSP_PRE_DRIVERS );
-SYSINIT_VERBOSE( DRVMGR_LEVEL_1 );
-SYSINIT_VERBOSE( DEVICE_DRIVERS );
-SYSINIT_VERBOSE( DRVMGR_LEVEL_2 );
-SYSINIT_VERBOSE( DRVMGR_LEVEL_3 );
-SYSINIT_VERBOSE( DRVMGR_LEVEL_4 );
-SYSINIT_VERBOSE( MP_FINALIZE );
-SYSINIT_VERBOSE( CLASSIC_USER_TASKS );
-SYSINIT_VERBOSE( POSIX_USER_THREADS );
-SYSINIT_VERBOSE( STD_FILE_DESCRIPTORS );
-SYSINIT_VERBOSE( LAST );
-
-static bool _Sysinit_Verbose_is_adjacent(
-  const rtems_sysinit_item *a,
-  const rtems_sysinit_item *b
-)
-{
-  RTEMS_OBFUSCATE_VARIABLE( a );
-  RTEMS_OBFUSCATE_VARIABLE( b );
-
-  return a + 1 == b;
-}
-
-#define SYSINIT_IS_ADJACENT( x, y ) \
-  _Sysinit_Verbose_is_adjacent( \
-    &_Linker_set__Sysinit__Sysinit_Verbose_##x, \
-    &_Linker_set__Sysinit__Sysinit_Verbose_##y \
-  )
-
-static void _Sysinit_Print_free_memory( void )
-{
-  const Memory_Information *mem;
-  size_t                    i;
-
-  mem = _Memory_Get();
-
-  for ( i = 0; i < _Memory_Get_count( mem ); ++i ) {
-    const Memory_Area *area;
-
-    area = _Memory_Get_area( mem, i );
-    printk(
-      "sysinit: memory area %zu: free begin = 0x%08" PRIxPTR
-        ", free size = 0x%08" PRIxPTR "\n",
-      i,
-      (uintptr_t) _Memory_Get_free_begin( area ),
-      _Memory_Get_free_size( area )
-    );
-  }
-}
-
-void _Sysinit_Verbose( void )
-{
-  printk( "sysinit: begin\n" );
-}
-
-static void _Sysinit_Verbose_BSP_EARLY( void )
-{
-  if (
-    !_Sysinit_Verbose_is_adjacent(
-      &_Linker_set__Sysinit__Sysinit_Verbose,
-      &_Linker_set__Sysinit__Sysinit_Verbose_BSP_EARLY
-    )
-  ) {
-    printk( "sysinit: BSP early: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_MEMORY( void )
-{
-  const Memory_Information *mem;
-  size_t                    i;
-
-  if ( !SYSINIT_IS_ADJACENT( BSP_EARLY, MEMORY ) ) {
-    printk( "sysinit: memory: done\n" );
-  }
-
-  printk(
-    "sysinit: stack pointer: 0x%08" PRIxPTR "\n",
-    (uintptr_t) __builtin_frame_address( 0 )
-  );
-
-  mem = _Memory_Get();
-
-  for ( i = 0; i < _Memory_Get_count( mem ); ++i ) {
-    const Memory_Area *area;
-
-    area = _Memory_Get_area( mem, i );
-    printk(
-      "sysinit: memory area %zu: begin = 0x%08" PRIxPTR
-        ", size = 0x%08" PRIxPTR "\n",
-      i,
-      (uintptr_t) _Memory_Get_begin( area ),
-      _Memory_Get_size( area )
-    );
-  }
-}
-
-static void _Sysinit_Verbose_DIRTY_MEMORY( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( BSP_EARLY, DIRTY_MEMORY ) ) {
-    printk( "sysinit: DIRTY_MEMORY: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_ZERO_MEMORY( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DIRTY_MEMORY, ZERO_MEMORY ) ) {
-    printk( "sysinit: ZERO_MEMORY: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_ISR_STACK( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( ZERO_MEMORY, ISR_STACK ) ) {
-    printk( "sysinit: ISR_STACK: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_PER_CPU_DATA( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( ISR_STACK, PER_CPU_DATA ) ) {
-    _Sysinit_Print_free_memory();
-    printk( "sysinit: PER_CPU_DATA: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_SBRK( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( PER_CPU_DATA, SBRK ) ) {
-    _Sysinit_Print_free_memory();
-    printk( "sysinit: SBRK: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_STACK_ALLOCATOR( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( SBRK, STACK_ALLOCATOR ) ) {
-    _Sysinit_Print_free_memory();
-    printk( "sysinit: STACK_ALLOCATOR: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_WORKSPACE( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( STACK_ALLOCATOR, WORKSPACE ) ) {
-    _Sysinit_Print_free_memory();
-    printk( "sysinit: WORKSPACE: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_MALLOC( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( WORKSPACE, MALLOC ) ) {
-    _Sysinit_Print_free_memory();
-    printk( "sysinit: MALLOC: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_BSP_START( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( MALLOC, BSP_START ) ) {
-    printk( "sysinit: BSP_START: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CPU_COUNTER( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( BSP_START, CPU_COUNTER ) ) {
-    printk( "sysinit: CPU_COUNTER: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_TARGET_HASH( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CPU_COUNTER, TARGET_HASH ) ) {
-    printk( "sysinit: TARGET_HASH: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_INITIAL_EXTENSIONS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( TARGET_HASH, INITIAL_EXTENSIONS ) ) {
-    printk( "sysinit: INITIAL_EXTENSIONS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_MP_EARLY( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( INITIAL_EXTENSIONS, MP_EARLY ) ) {
-    printk( "sysinit: MP_EARLY: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_DATA_STRUCTURES( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( MP_EARLY, DATA_STRUCTURES ) ) {
-    printk( "sysinit: DATA_STRUCTURES: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_MP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DATA_STRUCTURES, MP ) ) {
-    printk( "sysinit: MP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_USER_EXTENSIONS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( MP, USER_EXTENSIONS ) ) {
-    printk( "sysinit: USER_EXTENSIONS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_TASKS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_USER_TASKS, CLASSIC_TASKS ) ) {
-    printk( "sysinit: CLASSIC_TASKS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_TASKS_MP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_TASKS, CLASSIC_TASKS_MP ) ) {
-    printk( "sysinit: CLASSIC_TASKS_MP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_TIMER( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_TASKS_MP, CLASSIC_TIMER ) ) {
-    printk( "sysinit: CLASSIC_TIMER: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_SIGNAL_MP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_TIMER, CLASSIC_SIGNAL_MP ) ) {
-    printk( "sysinit: CLASSIC_SIGNAL_MP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_EVENT_MP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_SIGNAL_MP, CLASSIC_EVENT_MP ) ) {
-    printk( "sysinit: CLASSIC_EVENT_MP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_MESSAGE_QUEUE( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_EVENT_MP, CLASSIC_MESSAGE_QUEUE ) ) {
-    printk( "sysinit: CLASSIC_MESSAGE_QUEUE: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_MESSAGE_QUEUE_MP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_MESSAGE_QUEUE, CLASSIC_MESSAGE_QUEUE_MP ) ) {
-    printk( "sysinit: CLASSIC_MESSAGE_QUEUE_MP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_SEMAPHORE( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_MESSAGE_QUEUE_MP, CLASSIC_SEMAPHORE ) ) {
-    printk( "sysinit: CLASSIC_SEMAPHORE: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_SEMAPHORE_MP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_SEMAPHORE, CLASSIC_SEMAPHORE_MP ) ) {
-    printk( "sysinit: CLASSIC_SEMAPHORE_MP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_PARTITION( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_SEMAPHORE_MP, CLASSIC_PARTITION ) ) {
-    printk( "sysinit: CLASSIC_PARTITION: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_PARTITION_MP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_PARTITION, CLASSIC_PARTITION_MP ) ) {
-    printk( "sysinit: CLASSIC_PARTITION_MP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_REGION( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_PARTITION_MP, CLASSIC_REGION ) ) {
-    printk( "sysinit: CLASSIC_REGION: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_DUAL_PORTED_MEMORY( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_REGION, CLASSIC_DUAL_PORTED_MEMORY ) ) {
-    printk( "sysinit: CLASSIC_DUAL_PORTED_MEMORY: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_RATE_MONOTONIC( void )
-{
-  if (
-    !SYSINIT_IS_ADJACENT(
-      CLASSIC_DUAL_PORTED_MEMORY,
-      CLASSIC_RATE_MONOTONIC
-    )
-  ) {
-    printk( "sysinit: CLASSIC_RATE_MONOTONIC: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_BARRIER( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_RATE_MONOTONIC, CLASSIC_BARRIER ) ) {
-    printk( "sysinit: CLASSIC_BARRIER: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_SIGNALS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_BARRIER, POSIX_SIGNALS ) ) {
-    printk( "sysinit: POSIX_SIGNALS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_THREADS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_SIGNALS, POSIX_THREADS ) ) {
-    printk( "sysinit: POSIX_THREADS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_MESSAGE_QUEUE( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_THREADS, POSIX_MESSAGE_QUEUE ) ) {
-    printk( "sysinit: POSIX_MESSAGE_QUEUE: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_SEMAPHORE( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_MESSAGE_QUEUE, POSIX_SEMAPHORE ) ) {
-    printk( "sysinit: POSIX_SEMAPHORE: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_TIMER( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_SEMAPHORE, POSIX_TIMER ) ) {
-    printk( "sysinit: POSIX_TIMER: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_SHM( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_TIMER, POSIX_SHM ) ) {
-    printk( "sysinit: POSIX_SHM: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_KEYS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_SHM, POSIX_KEYS ) ) {
-    printk( "sysinit: POSIX_KEYS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_CLEANUP( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_KEYS, POSIX_CLEANUP ) ) {
-    printk( "sysinit: POSIX_CLEANUP: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_IDLE_THREADS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_CLEANUP, IDLE_THREADS ) ) {
-    printk( "sysinit: IDLE_THREADS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_LIBIO( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( IDLE_THREADS, LIBIO ) ) {
-    printk( "sysinit: LIBIO: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_USER_ENVIRONMENT( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( LIBIO, USER_ENVIRONMENT ) ) {
-    printk( "sysinit: USER_ENVIRONMENT: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_ROOT_FILESYSTEM( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( USER_ENVIRONMENT, ROOT_FILESYSTEM ) ) {
-    printk( "sysinit: ROOT_FILESYSTEM: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_DRVMGR( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( ROOT_FILESYSTEM, DRVMGR ) ) {
-    printk( "sysinit: DRVMGR: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_MP_SERVER( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DRVMGR, MP_SERVER ) ) {
-    printk( "sysinit: MP_SERVER: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_BSP_PRE_DRIVERS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( MP_SERVER, BSP_PRE_DRIVERS ) ) {
-    printk( "sysinit: BSP_PRE_DRIVERS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_DRVMGR_LEVEL_1( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( BSP_PRE_DRIVERS, DRVMGR_LEVEL_1 ) ) {
-    printk( "sysinit: DRVMGR_LEVEL_1: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_DEVICE_DRIVERS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DRVMGR_LEVEL_1, DEVICE_DRIVERS ) ) {
-    printk( "sysinit: DEVICE_DRIVERS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_DRVMGR_LEVEL_2( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DEVICE_DRIVERS, DRVMGR_LEVEL_2 ) ) {
-    printk( "sysinit: DRVMGR_LEVEL_2: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_DRVMGR_LEVEL_3( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DRVMGR_LEVEL_2, DRVMGR_LEVEL_3 ) ) {
-    printk( "sysinit: DRVMGR_LEVEL_3: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_DRVMGR_LEVEL_4( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DRVMGR_LEVEL_3, DRVMGR_LEVEL_4 ) ) {
-    printk( "sysinit: DRVMGR_LEVEL_4: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_MP_FINALIZE( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( DRVMGR_LEVEL_4, MP_FINALIZE ) ) {
-    printk( "sysinit: MP_FINALIZE: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_CLASSIC_USER_TASKS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( MP_FINALIZE, CLASSIC_USER_TASKS ) ) {
-    printk( "sysinit: CLASSIC_USER_TASKS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_POSIX_USER_THREADS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( CLASSIC_USER_TASKS, POSIX_USER_THREADS ) ) {
-    printk( "sysinit: POSIX_USER_THREADS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_STD_FILE_DESCRIPTORS( void )
-{
-  if ( !SYSINIT_IS_ADJACENT( POSIX_USER_THREADS, STD_FILE_DESCRIPTORS ) ) {
-    printk( "sysinit: STD_FILE_DESCRIPTORS: done\n" );
-  }
-}
-
-static void _Sysinit_Verbose_LAST( void )
-{
-  printk( "sysinit: done\n" );
-}
Index: cpukit/sapi/src/tcsimpleinstall.c
===================================================================
--- cpukit/sapi/src/tcsimpleinstall.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSAPIClassicTimecounter
- *
- * @brief This source file contains the implementation of
- *   rtems_timecounter_simple_install().
- */
-
-/*
- * Copyright (c) 2015 embedded brains GmbH & Co. KG
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/timecounter.h>
-
-void rtems_timecounter_simple_install(
-  rtems_timecounter_simple *tc,
-  uint32_t                  frequency_in_hz,
-  uint32_t                  counter_ticks_per_clock_tick,
-  timecounter_get_t        *get_timecount
-)
-{
-  uint32_t power_of_two = 1;
-  uint32_t mask;
-  uint64_t scaler;
-  int i;
-
-  for ( i = 0; i < 32; ++i ) {
-    if ( power_of_two >= counter_ticks_per_clock_tick ) {
-      break;
-    }
-
-    power_of_two *= 2;
-  }
-
-  mask = ( 2 * power_of_two ) - 1;
-  scaler = ( (uint64_t) power_of_two << 32 ) / counter_ticks_per_clock_tick;
-
-  tc->scaler = scaler;
-  tc->real_interval = counter_ticks_per_clock_tick;
-  tc->binary_interval = ( mask + 1 ) / 2;
-  tc->tc.tc_get_timecount = get_timecount;
-  tc->tc.tc_counter_mask = mask;
-  tc->tc.tc_frequency = (uint32_t) ( ( frequency_in_hz * scaler ) >> 32 );
-  tc->tc.tc_quality = RTEMS_TIMECOUNTER_QUALITY_CLOCK_DRIVER;
-  _Timecounter_Install( &tc->tc );
-}
Index: cpukit/sapi/src/version.c
===================================================================
--- cpukit/sapi/src/version.c	(revision 17f744b8c81be98f68d53a82583c9a0b1c690579)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
-
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the implementation of rtems_version(),
- *   rtems_version_control_key(), rtems_version_major(), rtems_version_minor(),
- *   and rtems_version_revision().
- *
- * The version strings are created from the various pieces of version
- * information.  The main version number is part of the build system and is
- * stamped into <rtems/score/cpuopts.h>.  The version control key string is
- * extracted from the version control tool when the code is being built and is
- * updated if it has changed.  It is defined in "version-vc-key.h".  The key
- * may indicate there are local modification.
- */
-
-/*
- *  Copyright (C) 2017.
- *  Chris Johns <chrisj@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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/version.h>
-#include <rtems/score/cpuopts.h>
-
-#include "version-vc-key.h"
-
-const char *rtems_version( void )
-{
-#ifdef RTEMS_VERSION_CONTROL_KEY
-  return RTEMS_VERSION "." RTEMS_VERSION_CONTROL_KEY;
-#else
-  return RTEMS_VERSION;
-#endif
-}
-
-int rtems_version_major( void )
-{
-  return __RTEMS_MAJOR__;
-}
-
-int rtems_version_minor( void )
-{
-  return __RTEMS_MINOR__;
-}
-
-int rtems_version_revision( void )
-{
-  return __RTEMS_REVISION__;
-}
-
-const char *rtems_version_control_key( void )
-{
-#ifdef RTEMS_VERSION_CONTROL_KEY
-  return RTEMS_VERSION_CONTROL_KEY;
-#else
-  return "";
-#endif
-}
