Commit Graph

29690 Commits

Author SHA1 Message Date
Sebastian Huber
8af1663acc score: Fix for RTEMS_DEBUG 2016-09-08 09:55:26 +02:00
Sebastian Huber
275032b85a powerpc: Fix SMP context switch
We need the unmodified r4 for get_potential_new_heir.

This partially reverts commit 8d785f72d9.
2016-09-08 09:55:26 +02:00
Chris Johns
d416061846 testsuite: Add libdl/dl05 reloc test. 2016-09-08 16:52:39 +10:00
Chris Johns
11323b7da9 libdl: Add ARM C++ relocation record support.
Closes #2767
2016-09-08 16:41:59 +10:00
Sebastian Huber
84e960e951 stackchk: Fix stack checker thread initialization
Commit 0fd6f25507 relaxed the thread begin
extension execution environment.  This broke the stack check which only
partially initialized the stack pattern in its create extension.  Move
the part of the begin extension to the create extension.
2016-09-08 07:43:02 +02:00
Sebastian Huber
8bb9d4100c stackchk: Use a const pattern to check 2016-09-08 07:43:02 +02:00
Sebastian Huber
bba988d313 stackchk: Remove superfluous internal header file 2016-09-08 07:43:02 +02:00
Sebastian Huber
531924df8b bsp/raspberrypi: Rename file 2016-09-08 07:43:02 +02:00
Pavel Pisa
5d369c8572 arm/raspberrypi: use GPU/system timer as clock source.
It has advantage that it is designed as free-running counter
with compare registers and can easily serve for for both
timecounter and tick interrupt.
2016-09-07 20:29:39 +02:00
Pavel Pisa
40f49d11cf arm/raspberrypi: correct and extend definitions for GPU timer. 2016-09-07 20:29:39 +02:00
Pavel Pisa
df2ee9d377 arm/raspberrypi: basic BCM2836 SMP implementation.
The BSP support is divided to startup/bspsmp_api.c file where
functions required by SuperCore are defined and BCM2836 hardware
initialization part in startup/bspsmp_init.c.

Separation is done to prevent smpfatal08 test build failure.
2016-09-07 20:29:39 +02:00
Pavel Pisa
38a5385bc0 arm/raspberrypi: propagate number of configured CPUs into linker script. 2016-09-07 20:29:39 +02:00
Pavel Pisa
dfbedf366d arm/raspberrypi: rename linkcmds to linkcmds.in to allow their configure processing. 2016-09-07 20:29:39 +02:00
Pavel Pisa
4c53be196d arm/raspberrypi: more definitions of BCM2836 core local peripherals. 2016-09-07 20:29:39 +02:00
Rohini Kulkarni
bf62c39021 arm/raspberrypi: include definitions of BCM2836 SMP mailboxes. 2016-09-07 20:29:39 +02:00
Pavel Pisa
6e6a77a690 bsps/arm: reorganize CP15 code to allow clean and invalidate ARMv7 cache by level.
New function arm_cp15_cache_invalidate_level and arm_cp15_cache_clean_level
can be used to maintain single cache level (instruction or data).
2016-09-07 20:29:39 +02:00
Pavel Pisa
5c49464108 bsps/arm: remove lock in arm_cp15_set_translation_table_entries().
Protection by rtems_interrupt_disable() is incompatible with SMP build.
Actual page table entries manipulation function does not need locking
and disabling cache and can be run concurrently even on multiple
CPUs as long as changes do not modify same region. If the function
is called from more threads/CPUs to modify same region with different
mapping options concurrently then there is problem at another level
of virtual address space management  and has to be solved by mutex
or other locking at that level.
2016-09-07 20:29:38 +02:00
Pavel Pisa
7ec689adc7 bsps/arm: use defines for cache type register format field.
The change documents meaning of codes and opens
well defined way to use cache type format for cache
examination/debugging outside of arm-cp15.h file.
2016-09-07 20:29:38 +02:00
Christian Mauderer
b9cc5aa9d3 bsp/atsam: Add SDRAM IS42S16320F-7BL. 2016-09-07 13:38:53 +02:00
Christian Mauderer
beb289eb5b bsp/atsam: Move ram init values to structure. 2016-09-07 13:38:53 +02:00
Sebastian Huber
29594b4dbc score: Remove superfluous SMP debug support
This information turned out to be useless in the last couple of months.
2016-09-07 09:27:59 +02:00
Sebastian Huber
cac586e6e8 bsp/xilinx-zynq: Avoid duplicate declaration 2016-09-06 10:56:27 +02:00
Sebastian Huber
3709987d96 score: Add _Chain_Initialize_one() 2016-09-06 10:52:20 +02:00
Sebastian Huber
da15db787b score: Improve red-black tree debug support
Ensure that we extract a node only from the right tree.
2016-09-06 10:52:19 +02:00
Sebastian Huber
83b0229071 score: Add _RBTree_Initialize_one() 2016-09-06 10:52:19 +02:00
Sebastian Huber
796f12a85a score: Add missing const qualifiers 2016-09-06 10:52:19 +02:00
Sebastian Huber
1dd8ffff9f capture: Use proper accessor functions 2016-09-06 10:52:19 +02:00
Sebastian Huber
7af6b58c5c capture: Workaround to avoid misaligned access
Move the 64-bit field to a not 64-bit aligned structure offset to stop
the compiler from generating 64-bit load/store operations.
2016-09-06 09:53:08 +02:00
Chris Johns
1c18ebf0d6 libmisc/capture: Remove the reserved _t in the types. 2016-09-01 11:11:45 +10:00
Chris Johns
6da06c559f libmisc/capture: Fix the capture engine on SMP.
This patches some issues with the capture engine:

 1. Check is the engine is open in ctrace commands.
 2. Check all record open and appends for overflow.
 3. Fix the record open to take the size of user data and
    not the record header.
 4. Use packed structs for data being written to the per
    cpu buffers.
 5. Remove direct struct access to the capture buffers to
    avoid misaligned accesses.
 6. Add support to extract records, no struct access to the
    capture buffers.
 7. Update ctrace to extract records from the capture buffers.
 8. Add support to ctrace to always print the task name if it
    has one.
 9. Add support to manage names or the lack of a name.
10. Range of minor fixes.
11. Fix a long standing bug in ctset's handling of args.

Closes #2780.
2016-09-01 11:11:22 +10:00
Chris Johns
caf2cbd813 arm/xilinx_zynq: Start the second core when an SMP build. 2016-09-01 11:11:09 +10:00
Pavel Pisa
13c985c4f4 arm/xilinx_zynq: ensure that cache is cleaned and MMU disabled when initialization starts.
The u-boot loader enables the MMU plus the data and instruction caches
in some versions which results in RTEMS boot failure.

Closes #2774.
2016-09-01 11:10:54 +10:00
Chris Johns
6deb41905a libdl: The dl04 is too big for some BSPs. Do not built it. 2016-08-30 18:03:52 +10:00
Mudit Jain
3c74f4aa4d arm/raspberrypi: Mailbox : Extending functionality
Adding functionality to get board serial,
power state & clock rate
2016-08-27 10:18:19 +02:00
Alexander Krutwig
8099e0ae86 bsp/atsam: Add missing break statement 2016-08-24 16:31:44 +02:00
Alexander Krutwig
8cf102dd6b bsp/atsam: Fix data cache flush 2016-08-24 16:08:16 +02:00
Chris Johns
89a319a0f8 libbsp/arm: Fix ARM BSPs missing the bsp_translation_table_end symbol.
Closes #2775.
2016-08-23 11:13:47 +10:00
Kevin Kirspel
36fad91f00 arm: Add VFP context validate support for ARMv5 2016-08-19 07:40:45 +02:00
Alexander Krutwig
fea392a350 bsp/atsam: Add timeout to QSPI send command 2016-08-18 08:56:45 +02:00
Sebastian Huber
5d1fc66ce7 psxtests: Adjust sporadic server tests
According to POSIX priority value returned from pthread_getschedparam()
shall be the value specified by the most recent pthread_setschedparam(),
pthread_setschedprio(), or pthread_create() call affecting the target
thread.  Read this as though a temporary lower priority due to the
sporadic server policy shall not be visible through
pthread_getschedparam().  Thus, use rtems_task_set_priority() to get the
current priority of the threads.

Use a priority ceiling mutex to prevent sporadic server priority
adjustments.
2016-08-18 07:28:00 +02:00
Sebastian Huber
9c42752cac score: Fix undefined behaviour
Cast POSIX error codes to unsigned int to avoid undefined behaviour in
case of PTHREAD_BARRIER_SERIAL_THREAD which is -1.
2016-08-18 07:27:51 +02:00
Chris Johns
381c42b01e testsuite: Add libdl/dl04 cache test. 2016-08-15 17:58:01 +10:00
Chris Johns
97d395bac3 testsuite: Add libdl/dl03 cache test. 2016-08-15 15:45:10 +10:00
Chris Johns
58c34961ca libdl: Fix cache corruption bugs.
This patch fixes a number of bugs in the cache when requests are
made to read close to the end of the file and the data is copied
from the top of the cache buffer to the bottom of the buffer. This
was compounded by attempting to read past the end of the file.

Closes #2754.
2016-08-15 15:44:38 +10:00
Chris Johns
75386e1131 libdl: Add trace output when reading section headers. 2016-08-15 15:41:52 +10:00
Chris Johns
01aa1ba34a libbsp/arm: Add the TTB table to the default MMU set up as read/write.
This lets the table be changed at runtime for dynamic loading and
debugger support.

Closes #2775.
2016-08-15 09:18:27 +10:00
Sebastian Huber
55faa44768 score: Improve _RBTree_Insert_inline()
Return if the inserted node is the new minimum node or not.
2016-08-12 11:16:45 +02:00
Sebastian Huber
424ffe4db0 score: Introduce thread queue surrender operation
This is an optimization for _Thread_queue_Surrender().  It helps to
encapsulate the priority boosting in the priority inheritance thread
queue operations.
2016-08-11 11:13:42 +02:00
Sebastian Huber
a827447b20 score: Dismantle _Thread_queue_Do_extract_locked()
Dismantle _Thread_queue_Do_extract_locked() into re-usable parts like
_Thread_queue_MP_set_callout() and _Thread_queue_Make_ready_again().
Use them in _Thread_queue_Surrender() to propare for a new thread queue
surrender operation.
2016-08-11 11:13:42 +02:00
Sebastian Huber
fef3ea9e87 score: Add _Thread_queue_Surrender()
Add _Thread_queue_Surrender() to unify the mutex surrender procedures
which involve a thread queue operation.
2016-08-11 11:13:36 +02:00