Commit Graph

29635 Commits

Author SHA1 Message Date
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
Sebastian Huber
00c620c1a1 score: Format 2016-07-26 07:53:34 +02:00
Chris Johns
f78a5f55da score: Add a STATES_DEBUGGER for use by debugging agents to a thread's state. 2016-07-26 09:54:11 +10:00
Gedare Bloom
e0f17fcf6f posix: fix clock_nanosleep and nanosleep clock use
Sleeping with CLOCK_REALTIME should use the WATCHDOG_ABSOLUTE
clock discipline for the threadq so that the timeout interval
may change in case the clock source changes. Similarly,
CLOCK_MONOTONIC uses the WATCHDOG_RELATIVE threadq that will
only wakeup the thread after the requested count of ticks elapse.

updates #2732
2016-07-25 12:44:48 -04:00
Gedare Bloom
b5bfaaf9c2 posix: cond_timedwait remember and use clock from condattr
updates #2745
2016-07-25 12:44:47 -04:00
Gedare Bloom
127c20ebd7 posix: refactor cond wait support to defer abstime conversion
updates #2745
2016-07-25 12:44:47 -04:00
Gedare Bloom
10e4000221 cpukit/rtems: fix return type mismatch for _TOD_To_seconds 2016-07-25 12:44:47 -04:00
Gedare Bloom
6e98ea9157 posix: add clock_nanosleep and tests
updates #2732
2016-07-25 12:44:47 -04:00
Gedare Bloom
f23d470616 cpukit: Add and use Watchdog_Discipline.
Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE,
or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with
a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline
of WATCHDOG_NO_TIMEOUT.

updates #2732
2016-07-25 12:44:47 -04:00
Sebastian Huber
7f616dddcf score: Fix for RTEMS_DEBUG 2016-07-25 14:48:05 +02:00
Sebastian Huber
57a00bc6af smptests/smpmutex02: New test
Update #2765.
2016-07-25 14:18:34 +02:00