Commit Graph

29645 Commits

Author SHA1 Message Date
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
Chris Johns
03c1038edb librtems++: Remove from RTEMS.
This is old and there are better design patterns for threading and C++.
We recommend you use the new C++ standards based support.

Closes #2777.
2016-08-11 17:24:06 +10:00
Chris Johns
9a4eca5843 build-system: Always enable C++ if the compiler is present.
We always build a C++ compiler and building with C++ does not effect
RTEMS or the runtime. This patch always enabled the support. There is
no need to manually enable it any more.

You can disable C++ with '--disable-cxx'.

If an architecture does not have a C++ compiler support is automatically
disabled.
2016-08-11 17:20:10 +10:00
Gedare Bloom
709594f0fb posix: nanosleep: adjust elapsed time calculation
Use clock_gettime before and after sleep to calculate
the time spent asleep, and the amount of time remaining.

updates #2732
2016-08-10 12:09:50 -04:00
Sebastian Huber
21d736554c sptests/splinkersets01: Fix for small-data area 2016-08-10 10:00:11 +02:00
Chris Johns
b0f08c83e2 libmisc/untar: Set the perms to the value in the tar file.
This patch parses the mode field in the tar header and sets the
directory or file to the mode value in the header.

Closes #2768.
2016-08-09 17:22:26 +10:00
Alexander Krutwig
5d0f0de4aa bsp/atsam: Add power support 2016-08-08 13:56:36 +02:00
Sebastian Huber
5c09e9dd1f sptests/splinkersets01: Fix warnings 2016-08-08 09:47:06 +02:00
Alexander Krutwig
e5fd901141 atsam: Add atsam_rtc_get_time() 2016-08-08 09:34:58 +02:00
Sebastian Huber
aaaf9610db score: Add debug support to red-black trees
This helps to detect double insert and extract errors.
2016-08-08 09:34:29 +02:00
Sebastian Huber
2cb9b86e6a posix: Fix for RTEMS_DEBUG 2016-08-08 08:30:17 +02:00
Sebastian Huber
69dd99be43 score: Simplify _Thread_Finalize_life_change() 2016-08-05 08:19:39 +02:00
Sebastian Huber
ee0e41355d score: Fix a release/cancel job race condition
Split up the potential thread priority change in the scheduler
release/cancel job operation.  Protect the rate monotonic period state
with a dedicated SMP lock.  This avoids a race condition during
_Rate_monotonic_Timeout() while _Rate_monotonic_Cancel() is called on
another processor.
2016-08-04 10:20:29 +02:00
Sebastian Huber
ca783bbe4c score: Fix _Thread_queue_Path_release()
It is possible that the owner of the terminal link of a thread queue
path waits on a thread queue.  However, this thread queue has no owner,
e.g. a thread queue of a message queue.
2016-08-04 10:17:54 +02:00
Sebastian Huber
6117f29cd4 score: Fix _Scheduler_EDF_Cancel_job_filter()
Commit 21bdca49ee accidentally used a
function which may be added later.
2016-08-04 08:33:00 +02:00
Sebastian Huber
1c1e31f788 score: Optimize _Thread_queue_Path_release()
Update #2556.
2016-08-04 08:10:29 +02:00
Sebastian Huber
21bdca49ee score: Indroduce cancel job scheduler operation
Do not use a deadline value of zero to indicate a job cancellation.  Use
a dedicated scheduler operation for this.
2016-08-04 07:44:47 +02:00
Sebastian Huber
ff2e6c647d score: Fix and simplify thread wait locks
There was a subtile race condition in _Thread_queue_Do_extract_locked().
It must first update the thread wait flags and then restore the default
thread wait state.  In the previous implementation this could lead under
rare timing conditions to an ineffective _Thread_Wait_tranquilize()
resulting to a corrupt system state.

Update #2556.
2016-08-03 13:57:30 +02:00
Sebastian Huber
3b3552bf01 posix: Fix for RTEMS_DEBUG 2016-08-03 13:56:06 +02:00
Sebastian Huber
ec735c6a76 score: Fix for RTEMS_DEBUG 2016-08-03 13:56:06 +02:00
Christian Mauderer
5fe6d07ad5 linker set: Allow adding any variable into content
The newly created macro adds any kind of variable into a linker set. It
allows (for example) the saving an execution state of a function using
the following method:

- put a group of different variables into one linker set
- save the memory area containing the group of variables before the
  execution of a function
- restore the memory area after the function has been executed
2016-08-02 07:47:04 +02:00
Sebastian Huber
501b11baab score: Fix for RTEMS_DEBUG 2016-08-01 14:00:55 +02:00
Chris Johns
db6a6375e1 score: Fix for RTEMS_DEBUG. 2016-08-01 17:53:57 +10:00
Pavel Pisa
912a1a90ce arm/raspberrypi: framebuffer driver checks for initialization and tries runtime init if required.
Code works but there is problem how to setup caching for the regions
(arm_cp15_set_translation_table_entries arguments).

If ARMV7_MMU_DATA_READ_WRITE_CACHED is used then CPU
accesses are noncoherent with VideoCore and some
part of image update are not visible until pushed from
cache by other activities. If ARMV7_MMU_DATA_READ_WRITE
is used then access is extremely slow.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
2016-07-31 13:10:28 +02:00
Pavel Pisa
3d3ad4dc1c arm/raspberrypi: VideoCore access corrections in cache operation and more error checking.
The first, mistake in buffer size computation for cache flush
and invalidate has been corrected.

GCC __attribute__( ( aligned( 64 ) ) ) should work and works for local
variables. Code ensures right stack alignment. But attribute has
to be moved to type declaration to ensure that structure size is affected
by attribute. But even this seems to not work reliably for some reason.
May it be, the stack area between frame start and end of local variable buffer
accessed during context switch or some stack prefetch during resturn
such way that some cache lines belonging to buffer are filled to cache.
Extending buffer by one more cache line padding helps there.

In the longer term perspective, buffer should be moved to some static
area or cache aligned dynamic memory allocated. Concurrent calls
to the VideoCore operations and access serialization should be added
too but problem is that some calls are required during workspace and MMU
setup so variant without need of mutex would be required as well.

Framebuffer setup code and other VideoCore calls check more
precisely for errors and do not proceed forward with incorrect
data now.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
2016-07-31 11:33:06 +02:00
Gedare Bloom
842005e432 posix: nanosleep: optimize away a time conversion
updates #2732
2016-07-29 13:13:41 -04:00
Sebastian Huber
f383f4bf6e bsp/qoriq: Remove legacy U-Boot support 2016-07-28 12:05:28 +02:00
Sebastian Huber
cecc1097ff bsp/qoriq: Fix start stack setup 2016-07-28 10:50:12 +02:00
Sebastian Huber
6446773000 bsp/qoriq: Fix tlbwe synchronization 2016-07-28 10:50:12 +02:00
Sebastian Huber
b1ef3674c0 bsp/qoriq: Add QORIQ_HAS_WRITE_BACK_L1_CACHE
Fixes start via U-Boot on P1020.
2016-07-27 11:30:48 +02:00
Sebastian Huber
d79df38c2b score: Add deadlock detection
The mutex objects use the owner field of the thread queues for the mutex
owner.  Use this and add a deadlock detection to
_Thread_queue_Enqueue_critical() for thread queues with an owner.

Update #2412.
Update #2556.
Close #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber
1fcac5adc5 score: Turn thread lock into thread wait lock
The _Thread_Lock_acquire() function had a potentially infinite run-time
due to the lack of fairness at atomic operations level.

Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber
3a58dc8631 score: Priority inherit thread queue operations
Move the priority change due to priority interitance to the thread queue
enqueue operation to simplify the locking on SMP configurations.

Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber
ac8402ddd6 score: Simplify _Thread_queue_Boost_priority()
Raise the priority under thread queue lock protection and omit the
superfluous thread queue priority change, since the thread is extracted
anyway.  The unblock operation will pick up the new priority.

Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber
f4d1f30792 score: Split _Thread_Change_priority()
Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber
0b83633729 score: Fix for RTEMS_DEBUG 2016-07-27 10:55:29 +02:00
Sebastian Huber
dfa2cdb15d posix: Fix error status 2016-07-27 09:09:53 +02:00
Gedare Bloom
39d97ab78c cpukit: refactor nanosleep and use 64-bit timeout for threadq
* Fixes a bug with elapsed time calculations misusing absolute time
  arguments in nanosleep_helper by passing the requested relative interval.
* Fixes a bug with truncation of absolute timeouts by passing the
  full 64-bit value to Thread_queue_Enqueue.
* Share yield logic between nanosleep and clock_nanosleep.

updates #2732
2016-07-26 14:13:36 -04:00
Alexander Krutwig
f6fdf2eb7b atsam: Add user defined RX/TX descriptor counts 2016-07-26 14:18:19 +02:00
Alexander Krutwig
c51e6d915c atsam: Use normal memory for DTCM
Avoids problems with unaligned data access.
2016-07-26 10:02:57 +02:00
Alexander Krutwig
84008f9e43 bsps/arm: Clear pending exceptions for ARMv7-M 2016-07-26 10:00:05 +02:00
Alexander Krutwig
6a174c024a Add Untar_FromGzChunk_Print() + Test 2016-07-26 10:00:04 +02:00
Alexander Krutwig
1a8fe67acf Add Untar_FromChunk_Print() + Test 2016-07-26 10:00:04 +02:00
Sebastian Huber
c1b815abe0 sptests/spextensions01: Avoid NULL pointer access 2016-07-26 09:57:11 +02:00
Sebastian Huber
ea9384425a score: Format 2016-07-26 08:01:58 +02:00
Sebastian Huber
75fc27ad39 score: Fix printk() format specifiers 2016-07-26 07:54:05 +02:00