Commit Graph

29608 Commits

Author SHA1 Message Date
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
Sebastian Huber
ba5de7531a bsps: Fix shared polled console fatal error
Fatal errors must uniquely identify the source location.
2016-07-25 14:03:00 +02:00
Sebastian Huber
0fd6f25507 score: Relax thread begin extension environment
Update #2752.
2016-07-25 08:40:14 +02:00
Sebastian Huber
3ae199a553 score: Disable RTEMS_NO_RETURN for RTEMS_DEBUG
Do not use RTEMS_NO_RETURN hints for debug configurations to ease use of
stack traces in case of fatal errors.
2016-07-25 08:40:14 +02:00
Pavel Pisa
ba0471d9f5 arm/raspberrypi: add Secure Digital (SD) controller interrupt source ID from Mudit Jain'a tree. 2016-07-23 15:15:17 +02:00
Pavel Pisa
d216c5d6a2 arm/raspberrypi: change interrupt dispatch and enable to generic vector id based approach.
Using conditional branches to find bits is extremely inefficient
and for asynchronous delivery of different interrupt sources
lead to total confusion of branch prediction unit.
2016-07-23 12:10:34 +02:00
Pavel Pisa
d5483181a8 arm/raspberrypi: remove duplicate setup of IRQ handler in the main ARM exception table.
Exception table setup is processed by common CPU architecture support.
For ARM architecture, it can be found in the file

rtems/c/src/lib/libbsp/arm/shared/start/start.S

and ends by bsp_vector_table_copy_done label.
The actual tabel content can be found at

  bsp_start_vector_table_begin

For ARMv7-A and even other variant with hypervisor mode support,
it is even not necessary to copy table to address 0 at all
because CP15 register can be used to specify alternative
table start address

  arm_cp15_set_vector_base_address(&)bsp_start_vector_table_begin;

ARMv7-M have register to set exception table base as well.
2016-07-23 12:07:10 +02:00
Deval Shah
1c62f7ee2d Added USB interrupt handler. And defined some macros regarding USB. 2016-07-23 10:10:16 +02:00
Pavel Pisa
0055b65986 bsp/tms570: ensure that change of SCI baudrate is not applied in the middle of character Tx.
The rtems_monitor_task() setups/updates termios attributes
of the opened TTY and if there is ongoing some other output
it leads to the stuck.

It would be better to use some termios API function which
would call drainOutput() in rtems/cpukit/libcsupport/src/termios.c.
But functionality is not accessible outside of core termios
implementation.

The loop waiting for last character to be sent has to be there anyway
because hardware does not provide Tx machine/shift register empty
interrupt.
2016-07-22 21:15:55 +02:00
Sebastian Huber
992494e3dd score: Fix for RTEMS_DEBUG 2016-07-22 12:37:03 +02:00
Sebastian Huber
64ed0bb307 score: Assert proper seqlock writer state
Helps to detect invalid concurrent writes.
2016-07-22 11:24:53 +02:00
Sebastian Huber
059529e685 score: Add debug support to chains
This helps to detect

 * double insert, append, prepend errors, and
 * get from empty chain errors.
2016-07-22 09:13:07 +02:00
Sebastian Huber
3cdda03c5a posix: Fix double chain extract 2016-07-21 15:26:47 +02:00
Pavel Pisa
8709aa0459 libdl/rtl-obj.c: synchronize cache after code relocation.
Memory content changes caused by relocation has to be
propagated to memory/cache level which is used/snooped
during instruction cache fill.

Closes #2438
2016-07-21 02:35:00 +02:00
Pavel Pisa
dcf806ef51 arm/raspberrypi: reorder and update MMU config table to nor force RW section later to RO.
Enable even the first megabyte of SDRAM to be cache-able after
problems with stale cache content has been resolved by previous commit.
Because major part of application usually fits to the first
megabyte this speedups test dhrystone application by factor 40.
2016-07-20 16:46:04 +02:00
Pavel Pisa
bef2b737a2 arm/raspberrypi: use cache manager operations to flush/invalidate all cache levels.
This fix strange behavior where some stale content has been
stored in level 2 cache before RTEMS has been start from U-boot
which has reappeared after MMU enable and shadow vector
table at start of SDRAM.
2016-07-20 16:46:04 +02:00
Pavel Pisa
577e7fb337 arm/bsps: CP15 and basic cache support entire cache clean for more architecture variants now.
Next cache operations should work on most of cores now

  rtems_cache_flush_entire_data()
  rtems_cache_invalidate_entire_data()
  rtems_cache_invalidate_entire_instruction()

Instruction cache invalidate works on the first level for now only.
Data cacache operations are extended to ensure flush/invalidate
on all cache levels.

The CP15 arm_cp15_data_cache_clean_all_levels() function extended
to continue through unified levels too (ctype = 4).
2016-07-20 16:46:04 +02:00
Pavel Pisa
3338121832 bsps/arm: do not disable MMU during translation table management operations.
Disabling MMU requires complex cache flushing and invalidation
operations. There is almost no way how to do that right
on SMP system without stopping all other CPUs. On the other hand,
there is documented sequence of operations which should be used
according to ARM manual and it guarantees even distribution
of maintenance operations to other cores for last generation
of Cortex-A cores with multiprocessor extension.

This change could require addition of appropriate entry
to arm_cp15_start_mmu_config_table for some BSPs to ensure
that MMU table stays accessible after MMU is enabled

  {
    .begin = (uint32_t) bsp_translation_table_base,
    .end = (uint32_t) bsp_translation_table_base + 0x4000,
    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
  }
2016-07-20 16:46:04 +02:00
Pavel Pisa
a48c05226d arm/raspberrypi: cache manager can be used for mailbox synchronization now. Remove workarounds.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
2016-07-20 16:46:04 +02:00
Sebastian Huber
c2a4b8bf37 bsps/powerpc: Fix shared console driver
The Termios modes are now an emum.  Do not use them in #if expressions.

Close #2762.
2016-07-19 09:42:26 +02:00
Sebastian Huber
8d785f72d9 bsps/powerpc: Fix AtliVec context switch
Properly pass the stack aligned context to _CPU_Context_switch_altivec()
since _CPU_altivec_ctxt_off defined via ppc_context.

Close #2761.
2016-07-19 08:12:32 +02:00
Punit Vara
55bde66ff8 beagle: pwm polishing
. added a README to pwm
	. added select_pwmss() to select pwmss-generic registers, as opposed
	  to PWM-specific registers
	. added pwmss_clock_en_status(), beagle_pwmss_is_running() and pwmss_tb_clock_check()
	. other API improvements
	. style improvements
2016-07-17 16:48:18 +02:00
Joel Sherrill
612297e813 Misc: Spell length correctly 2016-07-12 05:44:17 -05:00
Joel Sherrill
665f03acb3 DOSFS - LENGHT -> LENGTH
closes #2756,
2016-07-12 05:43:06 -05:00
Sebastian Huber
814bd6e3ba bsps/powerpc: Fix AltiVec enable
There must be an isync after the mtmsr to ensure that the AltiVec is
enabled for subsequent instructions.
2016-07-12 10:13:01 +02:00
Sebastian Huber
6f6cf78501 score: Postpone SMP shutdown in _Terminate()
This enables fatal extensions to continue program execution after some
fatal errors.
2016-07-06 09:33:32 +02:00
Sebastian Huber
008efaff7f score: Do not disable ISR in _Terminate()
This partially reverts 38ee75853f.  Let
the calling context decide if interrupts must be disabled or not.  The
goal is to enable fatal extensions to continue program execution after
some fatal errors.
2016-07-06 09:33:20 +02:00
Chris Johns
8aa75d0cb1 Config (.cfg) files are only valid if deeper than 5. 2016-07-06 13:01:39 +10:00