[PATCH] librpc: Include or1knd part of the recongnized CPUs at xdr_float.c

2015-03-03 Thread Hesham ALMatary
Close #2256
---
 cpukit/librpc/src/xdr/xdr_float.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/librpc/src/xdr/xdr_float.c 
b/cpukit/librpc/src/xdr/xdr_float.c
index cf081a7..c470e28 100644
--- a/cpukit/librpc/src/xdr/xdr_float.c
+++ b/cpukit/librpc/src/xdr/xdr_float.c
@@ -69,7 +69,7 @@ static char *rcsid = "$FreeBSD: 
src/lib/libc/xdr/xdr_float.c,v 1.7 1999/08/28 00
 defined(__mips__) || defined(__moxie__) || \
 defined(__nios2__) || \
 defined(__ns32k__) || \
-defined(__or1k__)  || \
+defined(__or1k__)  || defined(__or1knd__) \
 defined(__sparc__) || \
 defined(__ppc__) || defined(__PPC__) || \
 defined(__sh__) || \
-- 
2.1.0

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


[PATCH] or1k/or1k-exception-default.c: Eliminate dependency on BSP provided .h file

2015-03-03 Thread Hesham ALMatary
---
 cpukit/score/cpu/or1k/or1k-exception-default.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cpukit/score/cpu/or1k/or1k-exception-default.c 
b/cpukit/score/cpu/or1k/or1k-exception-default.c
index 645a7f9..037a169 100644
--- a/cpukit/score/cpu/or1k/or1k-exception-default.c
+++ b/cpukit/score/cpu/or1k/or1k-exception-default.c
@@ -12,7 +12,6 @@
 
 #include 
 #include 
-#include 
 #include 
 
 void _OR1K_Exception_default(uint32_t vector, CPU_Exception_frame *frame);
-- 
2.1.0

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


Fwd: [PATCH 009/111] DRVMGR: added driver manager to cpukit/libdrvmgr

2015-03-03 Thread Gedare Bloom
On Thu, Feb 26, 2015 at 11:38 AM, Daniel Hellstrom  wrote:
[...]
> diff --git a/c/src/aclocal/enable-drvmgr.m4 b/c/src/aclocal/enable-drvmgr.m4
> new file mode 100644
> index 000..489f60e
> --- /dev/null
> +++ b/c/src/aclocal/enable-drvmgr.m4
> @@ -0,0 +1,12 @@
> +AC_DEFUN([RTEMS_ENABLE_DRVMGR],
> +[
> +## AC_BEFORE([$0], [RTEMS_CHECK_DRVMGR_STARTUP])dnl
> +
> +AC_ARG_ENABLE(drvmgr,
> +[AS_HELP_STRING([--enable-drvmgr],[enable Driver Manager at Startup])],
> +[case "${enableval}" in
> +  yes) RTEMS_DRVMGR_STARTUP=yes ;;
> +  no) RTEMS_DRVMGR_STARTUP=no ;;
> +  *)  AC_MSG_ERROR(bad value ${enableval} for enable-drvmgr option) ;;
> +esac],[RTEMS_DRVMGR_STARTUP=yes])
> +])
Is a configure-time option the best solution for this? The more
'switches' we have, the harder it is to test RTEMS.

> diff --git a/c/src/lib/libbsp/shared/bspdriverlevelhook.c 
> b/c/src/lib/libbsp/shared/bspdriverlevelhook.c
> new file mode 100644
> index 000..93406f9
> --- /dev/null
> +++ b/c/src/lib/libbsp/shared/bspdriverlevelhook.c
> @@ -0,0 +1,16 @@
> +/*
> + *  This is a dummy bsp_driver_level_hook routine.
> + *
> + *  COPYRIGHT (c) 2015.
> + *  Cobham Gaisler.
> + *
> + *  The license and distribution terms for this file may be
> + *  found in the file LICENSE in this distribution or at
> + *  http://www.rtems.org/license/LICENSE.
> + */
> +
> +#include 
> +
> +void bsp_driver_level_hook( int level )
> +{
> +}
We'll need some documentation added to the BSP guide on this.

[...]

> diff --git a/cpukit/libdrvmgr/README b/cpukit/libdrvmgr/README
> new file mode 100644
> index 000..6e55370
> --- /dev/null
> +++ b/cpukit/libdrvmgr/README
> @@ -0,0 +1,112 @@
> +DRIVER MANAGER
> +==
> +
> +See documentation in Aeroflex Gaisler Driver manual.
Should either have a link to a hosted version somewhere or we should
provide the document in our manuals.

> +
> +
> +INITIALIZATION
> +==
> +The Driver Manager can be intialized in two different ways:
> + 1. during RTEMS startup
> + 2. started by user, typically in the Init task
> +
> +The driver manager is initalized during RTEMS startup in the
> +rtems_initialize_device_drivers() function when RTEMS is
> +configured with driver manager support.
> +
> +When RTEMS is not configured with the driver manager, the manager
> +may still be initialized by the user after system startup, typically
> +from the Init() task.
> +
> +The main difference between the two ways is when interrupt
> +is enabled. Interrupt is enabled for the first time by RTEMS when
> +the Init task is started. This means, for the first case, that
> +drivers can not use interrupt services until after the
> +initialization phase is over and the user request services from
> +the drivers. For the second case of initialization, this means
> +that driver must take extra care during initalization when interrupt
s/initalization/initialization

> +is enabled so that spurious interrupts are not generated and that the
> +system does not hang in an infinite IRQ loop.
> +
> +Most of the problems above are solved for the two methods by
> +specifying in which initialization levels IRQ handling is done.
> +See Level 1 and Level 2 below.
> +
> +Other differences is that IRQ, System Clock Timer, debug Console
> +and Console can be initalized by the help of the driver manager
s/initalized/initialized

> +when initialized during start up. Between Level0 and Level1 the
> +RTEMS I/O Manager drivers are initialized. The LEON3 BSP has
> +therefore two different versions of the basic drivers.
> +
What is the advantage to having the two different approaches? I don't
clearly see, and it obviously complicated the initialization code, and
seems to have led to two versions of the same drivers.

[...]

> diff --git a/cpukit/libdrvmgr/drvmgr.c b/cpukit/libdrvmgr/drvmgr.c
> new file mode 100644
> index 000..0471865
> --- /dev/null
> +++ b/cpukit/libdrvmgr/drvmgr.c
> @@ -0,0 +1,643 @@
> +/* Driver Manager Interface Implementation.
> + *
> + * COPYRIGHT (c) 2009.
> + * Cobham Gaisler AB.
> + *
> + * The license and distribution terms for this file may be
> + * found in the file LICENSE in this distribution or at
> + * http://www.rtems.com/license/LICENSE.
use rtems.org for the url. (it redirects there now.)

> + */
> +
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +
> +#include "drvmgr_internal.h"
> +
> +/* Enable debugging */
> +/*#define DEBUG 1*/
Consider inheriting the debug macro from --enable-rtems-debug

> +
> +#ifdef DEBUG
> +#define DBG(x...) printk(x)
> +#else
> +#define DBG(x...)
> +#endif
> +
> +struct rtems_driver_manager drv_mgr = {
This struct type (and name) should probably be part of the "drvmgr"
namespace? If only used in this file, the global var should be
declared 'static'.

> +   .level =0,
> +   .initializing_objs =0,
> +   .lock = 0,
> +   .root_dev = {0},
> +   .root_drv = NULL,
> +
> +   .drivers =