Commit Graph

26597 Commits

Author SHA1 Message Date
Daniel Hellstrom
a20c114f4a GRETH: remove TCP/UDP HW checksum generation
The GRETH doesn't support IP fragments.
2014-06-05 09:34:51 +02:00
Chris Johns
bb581906a6 shell: Add rtems_shell_dup_current_env to get a default env.
Remove rtems_current_shell_env as this is dangerous because
the env can be NULL if used outside of a valid shell with the
POSIX key to an env set up.

Clean up the usage of rtems_current_shell_env.
2014-06-04 22:32:55 +10:00
Sebastian Huber
4d1f5008db score: Rename _Scheduler_Update()
Rename _Scheduler_Update() to _Scheduler_Update_priority().  Add
parameter for the new thread priority to avoid direct usage of
Thread_Control::current_priority in the scheduler operation.
2014-06-04 09:47:11 +02:00
Sebastian Huber
8e46738436 score: Replace _Scheduler_Allocate/Free()
Replace _Scheduler_Allocate() with _Scheduler_Node_initialize().  Remove
the return status and thus the node initialization must be always
successful.

Rename _Scheduler_Free() to _Scheduler_Node_destroy().
2014-06-04 08:37:06 +02:00
Sebastian Huber
f6fc635943 sptests/spsem03: New test 2014-06-03 12:01:13 +02:00
Sebastian Huber
1d799ad6d6 rhealstone: Produce proper begin/end messages 2014-06-03 10:24:55 +02:00
Christian Mauderer
8df1f408fd score/sparc: Add support for paravirtualization
Guest systems in paravirtualization environments run usually in user
mode.  Thus it is not possible to directly access the PSR and TBR
registers.  Use functions instead of inline assembler to access these
registers if RTEMS_PARAVIRT is defined.
2014-06-03 08:35:47 +02:00
Sebastian Huber
98f2d5c505 libblock: Avoid recursive mutex 2014-06-03 08:28:46 +02:00
Christian Mauderer
5abe5a8122 smptests/smpthreadlife01: Fix for debug enabled 2014-06-03 08:17:12 +02:00
Christian Mauderer
1ee0d5f719 smptests/smpmrsp01: Fix scheduler ids 2014-06-03 08:16:09 +02:00
Sebastian Huber
9553e7a60d score: Use Resource Handler for MrsP semaphores
This enables proper resource dependency tracking and as a side-effect
deadlock detection.
2014-06-03 08:15:16 +02:00
Sebastian Huber
3045738843 score: Add resource node to thread control block 2014-06-03 08:15:16 +02:00
Sebastian Huber
6c7caa1a9e score: Add and use _Thread_Owns_resources() 2014-06-03 08:15:16 +02:00
Sebastian Huber
3e2011394d score: Add Resource Handler
A resource is something that has at most one owner at a time and may
have multiple rivals in case an owner is present.  The owner and rivals
are impersonated via resource nodes.  A resource is represented via the
resource control structure.  The resource controls and nodes are
organized as trees.  It is possible to detect deadlocks via such a
resource tree.  The _Resource_Iterate() function can be used to iterate
through such a resource tree starting at a top node.
2014-06-03 08:15:16 +02:00
Ralf Kirchner
1fc2e960ce libblock: Add RTEMS_BDBUF_USE_PTHREAD
Use the PTHREAD mutexes and condition variables if available.  This
helps on SMP configurations to avoid the home grown condition variables
via disabled preemption.
2014-06-02 16:26:25 +02:00
Ralf Kirchner
d8ac087a8c rtems: Avoid copy and paste in confdefs.h
Add and use CONFIGURE_POSIX_MUTEXES.
Add and use CONFIGURE_POSIX_CONDITION_VARIABLES.
2014-06-02 15:47:09 +02:00
Sebastian Huber
7c90670c81 arm: Add ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS 2014-06-02 13:48:58 +02:00
Ralf Kirchner
606ed52568 libblock: Use pthread_once() for initialization
Enabling and disabling preemption as done for single core will not work
for SMP.  In the bdbuf initialization preemption handling can be avoided
in general by using pthread_once().
2014-06-02 13:48:41 +02:00
Sebastian Huber
25f5730fe5 score: _Scheduler_Set_affinity()
Do not change the scheduler with this function.  Documentation.  Coding
style.
2014-06-02 08:28:42 +02:00
Sebastian Huber
a92c4882bb score: _Scheduler_Get_affinity()
Drop scheduler parameter.  Coding style.
2014-06-02 08:28:42 +02:00
Sebastian Huber
d7a1863be2 rtems: Coding style 2014-06-02 08:28:42 +02:00
Joel Sherrill
36601543db mrm332: Tests now build and fewer warnings 2014-06-01 18:18:28 -05:00
Joel Sherrill
6ddc4dab20 m68k/shared/misc/memProbe.c: Add prototype to eliminate warning 2014-06-01 18:18:00 -05:00
Joel Sherrill
e91ab8ce79 cpusetimpl.h: Add _CPU_set_Set() and improve Doxygen 2014-05-30 15:07:39 -05:00
Joel Sherrill
8e7db68c38 Minor conditionals to enable building Scheduler Simulator on GNU/Linux
- rtems/score/assert.h: Scheduler Simulator uses glibc assert.h on GNU/Linux.
  This will likely need to be adjusted more for other host compilers and
  C libraries. Also disable _Assert_Not_reached() because some of these
  paths do actually return to the called on the Scheduler Simulator.

- basedefs.h: Do not use noreturn attribute when on Scheduler Simulator.
  Paths which context switch can return to the command interpreter on
  the Scheduler Simulator.
2014-05-30 15:07:39 -05:00
Chris Johns
4d5845824e bsps/gdbarmsim: Add the missing bspstarthooks.c. 2014-05-30 09:11:30 +10:00
Chris Johns
9cec7addbd Revert "Ignore emacs backfiles and TAGS."
This reverts commit dac56968e3.

Use local git ignore for development tool files.
2014-05-30 08:38:09 +10:00
Joel Sherrill
69c3f07682 rtems/score/thread*.h: Really correct spelling error 2014-05-28 16:53:58 -05:00
Joel Sherrill
27caaa60f3 rtems/score/thread*.h: TERMINTING to TERMINATING 2014-05-28 16:42:50 -05:00
Sebastian Huber
5f0ab5cfb5 shell: Make rtems_global_shell_env public
Provide rtems_global_shell_env as a public read-only variable for
backward compatibility.
2014-05-28 17:39:27 +02:00
Daniel Hellstrom
d6f1ec91b6 SPARC: syscall optimizations and PSR-write fix
The last optimization missed was incorrect in regards to
PSR write instruction delay must be 3 instructions.

New optimizations:
 * align to 32-byte cache line.
 * rearrange code into three "blocks" of 4 instructions that
   is executed by syscall 2 and 3. This is to optimize for
   16/32 byte cache lines.
 * use delay-slot instruction in trap table to reduce by one
   instruction.
 * use the fact that "wr %PSR" implements XOR to reduce by
   one instruction.
2014-05-28 17:33:22 +02:00
Daniel Hellstrom
70eff78971 LEON3: coding style clean bsp_irq_fixup() 2014-05-28 17:33:22 +02:00
Daniel Hellstrom
3a76d83098 LEON3: add support for IRQ16..31 for CPU!=0 2014-05-28 17:33:22 +02:00
Chris Johns
5b45d51a59 bsps: Do not build tests that require a tick interrupt.
The following BSPs do not have tick support so the tests fail:

 arm1136jfs
 arm1136js
 arm7tdmi
 arm920
 armcortexa9 (does not run any more)
 avrtest
 h8sim
 h8sxsim
 m32csim
 m32rsim
 moxiesim
 simsh1
 simsh2
 simsh4
 v850e1sim
 v850e2sim
 v850e2v3sim
 v850esim
 v850essim
 v850sim

This list was provided by Joel in the following post:

 http://www.rtems.org/pipermail/rtems-devel/2014-April/006526.html
2014-05-28 23:44:26 +10:00
Chris Johns
431bb85dde rtems-test-check: Ignore tests which require real ISR based clock tick
BSPs for simulators which do not include a clock tick interrupt source
are incapable of running some tests successfully. This is a common
characteristic of some BSPs and a fixed set of tests. There is no point
in duplicating this list of tests in those BSPs test configuration.

Read testsuites/testdata/require-tick-isr.tcfg for details.
2014-05-28 23:44:26 +10:00
Chris Johns
dac56968e3 Ignore emacs backfiles and TAGS. 2014-05-28 23:42:44 +10:00
Ralf Kirchner
7280fe3f24 bsp/altera-cyclone-v: Cleanup 2014-05-28 15:01:37 +02:00
Ralf Kirchner
12a4d08553 bsp/altera-cyclone-v: Reduce size of nocache heap
Network mbufs and clusters now are cached. Thus the nocache heap can get reduced to 1 MByte.
2014-05-28 15:01:31 +02:00
Ralf Kirchner
bb70bea198 bsp/altera-cyclone-v: Cache mbufs and clusters 2014-05-28 14:59:01 +02:00
Ralf Kirchner
32c8960925 bsp/altera-cyclone-v: Enable L2 cache for network driver 2014-05-28 14:59:01 +02:00
Ralf Kirchner
dda78f43d5 bsp/altera-vyclone-v: Broadcast cache maintenances 2014-05-28 14:59:01 +02:00
Ralf Kirchner
5fd4e35f9b bsp/arm: Broadcast cache maintenances 2014-05-28 14:59:01 +02:00
Sebastian Huber
8fcafdd553 score: Multiprocessor Resource Sharing Protocol
Add basic support for the Multiprocessor Resource Sharing Protocol
(MrsP).

The Multiprocessor Resource Sharing Protocol (MrsP) is defined in A.
Burns and A.J.  Wellings, A Schedulability Compatible Multiprocessor
Resource Sharing Protocol - MrsP, Proceedings of the 25th Euromicro
Conference on Real-Time Systems (ECRTS 2013), July 2013.  It is a
generalization of the Priority Ceiling Protocol to SMP systems.  Each
MrsP semaphore uses a ceiling priority per scheduler instance.  These
ceiling priorities can be specified with rtems_semaphore_set_priority().
A task obtaining or owning a MrsP semaphore will execute with the
ceiling priority for its scheduler instance as specified by the MrsP
semaphore object.  Tasks waiting to get ownership of a MrsP semaphore
will not relinquish the processor voluntarily.  In case the owner of a
MrsP semaphore gets preempted it can ask all tasks waiting for this
semaphore to help out and temporarily borrow the right to execute on one
of their assigned processors.

The help out feature is not implemented with this patch.
2014-05-28 10:50:41 +02:00
Daniel Cederman
9f058fb1c2 bsps/sparc: Change tabs to spaces. 2014-05-27 09:46:30 +02:00
Daniel Cederman
c903fc28a9 bsps/sparc: Add copyright and license information 2014-05-27 09:46:22 +02:00
Daniel Cederman
363b1f7f02 bsps/sparc: Make lines in SPARC BSPs adhere to 80 character limit. 2014-05-27 09:46:13 +02:00
Chris Johns
97d0b9bb6a bsp/gdbarmsim: Switch to the standard arm/shared/startup.
Switch to the standard ARM startup code. This requires adding the
standard interrupt code. The interrupt code does nothing at this
point in time. I do not know if the ARM simulator in GDB supports
interrupts.
2014-05-26 22:02:00 +10:00
Sebastian Huber
d134adeba3 score: Fix race condition in SMP startup
Do not use the Per_CPU_Control::started in
_SMP_Start_multitasking_on_secondary_processor() since this field may be
not up to date when a secondary processor reads it.  Use the read-only
scheduler assignment instead.

Add a new fatal error SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR.
This prevents out-of-bounds access.

It is currently not possible to test these fatal errors.  One option
would be to fake values of the _CPU_SMP_Get_current_processor(), but
unfortunately this function is inline on some architectures.
2014-05-26 08:56:44 +02:00
Chris Johns
b3fb2fff42 bsp/gdbarmsim: Change syscall functions to not clash with RTEMS functions.
The syscall functions overlapped with RTEMS, for example _write, _read, etc.
Change these to be internal to the BSP and avoid any clash with names in
RTEMS. Add support for SWI_Write0.

Change the console driver to use SWI_Write0. This outputs the character
to the host's stdout. Writing to file name 0 is not captured and managed
by GDB's simulation code while the SWI_Write0 is. The managed stdout
data is encapulated in the MI protocol while writes to file handle 0 are
dropped by GDB when in MI mode.
2014-05-26 11:52:02 +10:00
Chris Johns
5c123985a1 tools: Add rtems-bsp to list BSPs in the source tree.
This is a shell script that lists the BSPs in the source tree by
architecture. The BSP name is given plus the relative path to
BSP source files.

The script uses the same hack, ie looking for *.cfg files, as the
build system so it sees what the build system sees.
2014-05-24 11:04:45 +10:00