Commit Graph

31193 Commits

Author SHA1 Message Date
Joel Sherrill
d6c5a97896 block06/init.c: Fix printf() format warning 2017-11-29 13:03:40 -06:00
Martin Erik Werner
ab304f4def rtems/inttypes: Clarify hexadecimal in comments
Update comments to reflect that PRIxblksize_t PRIxblkcnt_t is
hexadecimal, not decimal.

Signed-off-by: Martin Erik Werner <martin.werner@aacmicrotec.com>
2017-11-29 09:28:59 -06:00
Joel Sherrill
2292865643 REVERT */*/bsp_specs: Increase similarity to ease future
Patch was not intended to be pushed yet.

Updates #3520.
2017-11-27 09:53:52 -06:00
Joel Sherrill
d9769c96cf */*/bsp_specs: Increase similarity to ease future analysis
Done:
  arm
  bfin
  epiphany
  i386
  lm32
  m32c
  mips
  moxie
  nios2
  or1k
  powerpc
  riscv
  sh
  sparc
  sparc64
  v850

To do:
  m68k

Differences noted:
  + endfile was sometimes before startfile
  + endfile sometimes was hard-coded and did not have -qrtems version
  + Should -e XXX (e.g. entry point) be in linkcmds?
  + Should -u XXX (e.g. undefined symbols) be in linkcmds?
  + Typos: Odd spacing, "old_endfiles" typo, and *(old_endfiles) (not %)
  + nios2: Referenced crtnn.o not crtn.o (error)

Need to revisit:
  + m32c, moxie, sparc64 includes !nostdlib which is not used elsewhere
  + sh has -EL/-EB mapping. Why needed?
  + sparc64 didn't include crti.o/crtn.o but it is part of toolset
  + v850 uses something like this for link and end_file:
      "%{qrtems: %(old_link)}"
    This means that these are unnecessary. Try this on all.
  + mips uses old_link all the time also.
  + arm/tms750 adds -EB.
  + powerpc: Why do we have rtems_crt* and not use something from GCC?

Updates #3520.
2017-11-27 09:51:47 -06:00
Joel Sherrill
7d905dffad aclocal/check-bsps.m4: Do not rely on bsp_specs to find BSP families
Updates #3520.
2017-11-27 09:50:05 -06:00
Joel Sherrill
a30f707834 bootstrap: Remove reference to bsp_specs in determining BSP directories
Updates #3520.
2017-11-27 09:50:05 -06:00
Joel Sherrill
9955b24a89 gumstix/bsp_specs: Correct permissions 2017-11-27 09:50:05 -06:00
Joel Sherrill
f019651f1a ampolish3: Remove reference to bsp_specs in comment
Updates #3520.
2017-11-27 09:50:05 -06:00
Joel Sherrill
ea8dba4174 powerpc/ss555/startup/linkcmds: Remove obsolete reference to bsp_specs
Updates #3520.
2017-11-27 09:50:05 -06:00
Joel Sherrill
a0663b2ce0 libbsp/*/*/configure.ac: Remove references to bsp_specs in AC_CONFIG_SRCDIR
Updates #3250.
2017-11-27 09:50:04 -06:00
Sebastian Huber
642ef003ec bsps: Provide <tm27.h> in each BSP
Since the <tm27.h> is highly BSP-dependent and used only by the tm27
test program we must provide this header file for each BSP.  Without the
preinstall build target each header file must have a unique source
header file.

Update #3254.
2017-11-27 09:36:56 +01:00
Sebastian Huber
0d5c795afa Move Ada includes
Update #3254.
2017-11-27 07:32:53 +01:00
Sebastian Huber
affb282b11 bsps: Remove empty tm27.h variants
Update #3254.
2017-11-27 07:32:53 +01:00
Sebastian Huber
e58e29fdb9 Remove coverhd.h
This header file contained timing overhead values which are hard to
maintain.

Update #3254.
2017-11-24 15:27:01 +01:00
Sebastian Huber
57f96b999d libtests/malloctest: Fix 64-bit targets
Update #3082.
2017-11-24 15:27:01 +01:00
Sebastian Huber
54e7b81b98 libtests/stringto01: Fix 64-bit targets
Update #3082.
2017-11-24 15:18:43 +01:00
Sebastian Huber
2e7c3f68d1 sptests/splinkersets01: Fix 64-bit targets
Update #3082.
2017-11-24 15:13:09 +01:00
Sebastian Huber
83ad1c5640 ada/sp04: Fix clock get
Update #2676.
2017-11-24 13:51:37 +01:00
Sebastian Huber
c59479faa8 tests: Use exponential backoff in locked_vprintf()
Without the exponential backoff a livelock was observed on a QorIQ P2020
with test SMP 5.
2017-11-22 09:40:24 +01:00
Sebastian Huber
f64f7a2f29 bsp/qoriq: Implement bsp_reset() 2017-11-22 09:40:24 +01:00
Sebastian Huber
86a80ee1af bsps: Add BSP_VERBOSE_FATAL_EXTENSION
Add BSP_VERBOSE_FATAL_EXTENSION to RTEMS_BSP_CLEANUP_OPTIONS to
optionally print the RTEMS version, the fatal source and the fatal code
in the shared bsp_fatal_extension().

Close #3248.
2017-11-22 09:40:24 +01:00
Sebastian Huber
3dd381f043 bsps: Simplify RTEMS_BSP_CLEANUP_OPTIONS
Remove BSP-specific defaults for RTEMS_BSP_CLEANUP_OPTIONS to simplify
the BSP configuration and documentation.  Change defaults to:

BSP_PRESS_KEY_FOR_RESET=0
BSP_RESET_BOARD_AT_EXIT=1
BSP_PRINT_EXCEPTION_CONTEXT=1
2017-11-22 09:40:24 +01:00
Sebastian Huber
07d96453a9 powerpc: Remove _BSP_Fatal_error()
BSPs can use the bsp_fatal_extension() to provide BSP-specific fatal
error handling.  There is no need for a _BSP_Fatal_error().

Close #3246.
2017-11-22 09:40:23 +01:00
Sebastian Huber
1c193a26d2 powerpc: Replace BSP_panic() with rtems_panic()
Due to a new rtems_panic() implementation, it is possible to replace the
PowerPC-specific BSP_panic() with rtems_panic().  Remove BSP_panic()
implementations.

Close #3245.
2017-11-22 09:40:23 +01:00
Sebastian Huber
15e19273b2 sapi: New implementation of rtems_panic()
The previous rtems_panic() implementation was quite heavy weight.  It
depended on _exit() which calls the global destructors.  It used
fprintf(stderr, ...) for output which depends on an initialized console
device and the complex fprintf().

Introduce a new fatal source RTEMS_FATAL_SOURCE_PANIC for rtems_panic()
and output via vprintk().

Update #3244.
2017-11-22 09:40:23 +01:00
Sebastian Huber
cd3e2204c7 INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL
Delete superfluous INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL.

Update #3243.
2017-11-22 09:40:23 +01:00
Sebastian Huber
a7dcef97e9 score: Simplify global construction
Update #3243.
2017-11-22 09:40:22 +01:00
Sebastian Huber
a8bf9a3f7a bsps: Add default getentropy() implementation
Update #3239.
Close #3249.
2017-11-22 09:40:22 +01:00
Martin Erik Werner
702e820830 Fix comments for object lookup error to RTEMS status map
Based on correlation with the enum for object lookup errors in
cpukit/score/include/rtems/score/objectimpl.h:

typedef enum {
 OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL,
 OBJECTS_INVALID_NAME,
 OBJECTS_INVALID_ADDRESS,
 OBJECTS_INVALID_ID,
 OBJECTS_INVALID_NODE
} Objects_Name_or_id_lookup_errors;

update the comments regarding the object lookup error to status map to
match.

Signed-off-by: Martin Erik Werner <martin.werner@aacmicrotec.com>
2017-11-21 12:40:16 -06:00
Daniel Hellstrom
4d7e4bb213 leon, gr1553rt: adding SMP protection
Add device spin-lock around internal data structures. Since the driver
provides a low-level C API accessing the descriptors the application
still needs to implement part of the SMP synchonization needed between
Interrupt handler and tasks.

Close #2355.
2017-11-21 10:28:02 +01:00
Sebastian Huber
c0d602ea69 posix: _POSIX_Threads_Get_sched_param_sporadic()
Remove api parameter to simplify the calling functions.

Update #2514.
2017-11-21 07:42:32 +01:00
Sebastian Huber
c597fb166e score: Optimize scheduler priority updates
Thread priority changes may append or prepend the thread to its priority
group on the scheduler ready queue.  Previously, a separate priority
value and a prepend-it flag in the scheduler node were used to propagate
a priority change to the scheduler.

Now, use an append-it bit in the priority control and reduce the plain
priority value to 63 bits.

This change leads to a significant code size reduction (about 25%) of
the SMP schedulers.  The negligible increase of the standard priority
scheduler is due to some additional shift operations
(SCHEDULER_PRIORITY_MAP() and SCHEDULER_PRIORITY_UNMAP()).

Before:

   text filename
    136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o
    464 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o
     24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o
    108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o
    292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o
    264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o

   text filename
    280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o
    488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o
    200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o
    164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o
    328 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o
    200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o

   text filename
  24112 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o

   text filename
  37204 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o

   text filename
  42236 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o

After:

   text filename
    136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o
    272 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o
     24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o
    108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o
    292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o
    264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o

   text filename
    280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o
    488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o
    208 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o
    164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o
    332 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o
    200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o

   text filename
  18860 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o

   text filename
  28520 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o

   text filename
  32664 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o
2017-11-20 08:36:49 +01:00
Sebastian Huber
5018894ee1 bsps/powerpc: Fix PPC_EXC_CONFIG_USE_FIXED_HANDLER
For the SPE support we must store the upper half of r3 as well.

Update #3085.
2017-11-20 07:53:09 +01:00
Sebastian Huber
3d374d90f8 bsps: Use a state in default getentropy()
Use the boot time to initialize the state.  Use the state, the current
CPU counter and a very simple pseudo random number generator for
getentropy(). At least, this enables to pass the test "GETENTROPY 1" on
ERC32.

Update #3239.
2017-11-20 07:53:08 +01:00
Christian Mauderer
2e2a41ecd9 bsp/atsam: Add timing for RAM mt48lc16m16a2p-6a. 2017-11-17 14:14:18 +01:00
Christian Mauderer
a5d49ebd37 bsp/atsam: Improve SDRAM initialization.
According to the manual, MR has to be read back and a memory barrier has
to be added after MR is written during SDRAM initialization.
2017-11-17 14:14:18 +01:00
Christian Mauderer
d00a7d1c22 bsp/atsam: Move clock and SDRAM init to SRAM.
If necessary, the BSP can now have it's clock and SDRAM initialization
in the SRAM instead of the SDRAM. This allows to change the clock
frequency during the startup of an SDRAM application.
2017-11-17 14:13:40 +01:00
Christian Mauderer
3fbaaa8b74 bsp/atsam: Make clock application configurable. 2017-11-17 14:07:46 +01:00
Christian Mauderer
a9de9a7b95 bsp/atsam: Add getentropy().
Update #3239.
2017-11-17 07:26:57 +01:00
Christian Mauderer
1358d4c824 getentropy: Add test.
Update #3239.
2017-11-17 07:26:55 +01:00
Christian Mauderer
ca4895cb9c getentropy: Add cpu counter based implementation.
Update #3239.
2017-11-17 07:26:52 +01:00
Christian Mauderer
ddc339c51f cpukit: Add _arc4random_getentropy_fail.
Add a default implementation of _arc4random_getentropy_fail with an
internal error.

Update #3239.
2017-11-17 07:26:41 +01:00
Sebastian Huber
91a2d5e68b score: Adjust _Scheduler_EDF_SMP_Insert_ready()
Use only one parameter to compute the next generation.  Use index 0 for
LIFO ordering, and index 1 for FIFO ordering.
2017-11-17 06:55:10 +01:00
Sebastian Huber
727cf48289 sptests/spversion01: Simplify configuration
Update #3199.
2017-11-17 06:55:09 +01:00
Sebastian Huber
e24d64b77d psx05: Remove CONFIGURE_DISABLE_SMP_CONFIGURATION
Update #3020.
2017-11-16 15:26:24 +01:00
Sebastian Huber
ec771f2531 score: Fix priority ceiling updates
We must not clear the priority updates in _Thread_queue_Extract_locked()
since this function is used by the priority ceiling surrender operations
after the ceiling priority handover from the previous owner to the new
owner. This is especially important in SMP configurations.

Move the _Thread_queue_Context_clear_priority_updates() invocation to
the callers.

Close #3237.
2017-11-16 15:25:45 +01:00
Sebastian Huber
9c30c31e24 score: Fix _Thread_queue_Flush_critical()
The thread queue extract operations performed by the
_Thread_queue_Flush_critical() may result in a priority change of the
thread queue owner. Carry out the scheduler priority update operation.
This is especially important in SMP configurations.

Close #3236.
2017-11-16 14:38:07 +01:00
Sebastian Huber
79a998d862 rtems: rtems_semaphore_flush() with prio inherit
The _Semaphore_Get_operations() must return the proper operations for
priority inheritance semaphores.

Add a test case for rtems_semaphore_flush() with priority inheritance.

Close #3235.
2017-11-16 14:08:20 +01:00
Sebastian Huber
888da71502 score: Check thread resource count in timer server
The watchdog routines invoked by the timer server may use mutexes for
synchronization.  Ensure that the resource count of the timer server is
zero after each watchdog routine invocation.  This helps to detect
broken watchdog routines.
2017-11-16 07:45:17 +01:00
Sebastian Huber
d4b99ae3f8 libio: Add assert to rtems_libio_iop_drop()
This assert helps to detect an invalid reference counting in RTEMS_DEBUG
configurations.

Update #3132.
2017-11-15 13:22:40 +01:00