Commit Graph

29435 Commits

Author SHA1 Message Date
Sebastian Huber
d07f582565 posix: Remove superfluous code
Remove double declarations, useless comments and unused functions.
2016-06-15 08:05:35 +02:00
Sebastian Huber
6a631daeb8 posix: sched_get_priority_max()
Enable for all configurations since it pulls in no additional
dependencies.  Return value of the scheduler instance of the executing
thread.
2016-06-14 11:58:03 +02:00
Sebastian Huber
ea02782abc posix: sched_get_priority_min()
Enable for all configurations since it pulls in no additional
dependencies.
2016-06-14 11:58:02 +02:00
Sebastian Huber
b61d5cac7c bsps: Add CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR
Add CLOCK_DRIVER_USE_ONLY_BOOT_PROCESSOR clock driver option.  If
defined, then do the clock tick processing on the boot processor on
behalf of all other processors.  Currently, this is intended as a
workaround for a Qemu shortcoming on ARM.

Update #2737.
2016-06-14 11:57:48 +02:00
Sebastian Huber
042072bfdf score: _Scheduler_priority_Ready_queue_initialize
Use priority maximum of scheduler instance.  This avoids a potential
memory corruption on SMP configurations.
2016-06-14 11:57:47 +02:00
Sebastian Huber
3eda7e5493 score: _Thread_Create_idle_for_CPU()
Use priority maximum of scheduler instance.
2016-06-14 11:57:37 +02:00
Sebastian Huber
0c34dbf341 posix: Add pthread_setschedprio()
Close #2734.
2016-06-13 15:38:14 +02:00
Sebastian Huber
fc30ac5973 posix: Fix pthread_setschedparam()
Close #2735.
2016-06-13 15:19:50 +02:00
Sebastian Huber
23b1bb38b2 posix: Fix pthread_getschedparam()
Return the unmodified thread priority value according to POSIX.

Close #2736.
2016-06-13 14:56:21 +02:00
Sebastian Huber
a0cd238d2b bsp/qoriq: Increase reserved size for FDT
Some boards require this size.
2016-06-13 13:42:02 +02:00
Sebastian Huber
10670a5503 bsp/irq-server: Fix install/remove
Do not wait for the interrupt server while owning the allocator lock.
This could lead to deadlock in case one of interrupt service routines or
user extensions want to obtain the allocator mutex as well.  Instead let
the interrupt server do the install/remove job entirely on behalf of the
requesting task.
2016-06-13 10:30:42 +02:00
Sebastian Huber
3bf9fdbe04 i386: Fix _CPU_Bitfield_Find_first_bit()
Bug introduced by b04b76c6a0.
2016-06-13 09:47:34 +02:00
Sebastian Huber
7bf9c8bea7 score: Comment _Thread_queue_Enqueue_critical() 2016-06-09 15:14:19 +02:00
Sebastian Huber
251c94d3d3 confdefs.h: Do not hide network file systems
Do not hide network file systems if RTEMS_NETWORKING is not defined,
since they may be provided by the LibBSD.
2016-06-09 11:17:13 +02:00
Sebastian Huber
b94bbf1cb4 ftpfs: Remove superfluous include 2016-06-09 10:50:47 +02:00
Sebastian Huber
89f627b56b bsps/powerpc: Update to RTEMS printer changes 2016-06-09 09:39:18 +02:00
Sebastian Huber
05b7eec276 score: Add an SMP sequence lock implementation 2016-06-09 09:39:14 +02:00
Sebastian Huber
80bbb4eda3 score: Use builtin for _Bitfield_Find_first_bit()
In case the CPU architecture provides no specialized
_CPU_Bitfield_Find_first_bit() macro, then use the __builtin_clz()
builtin in case __GNUC__ is defined.
2016-06-08 15:48:03 +02:00
Sebastian Huber
b8a84064ac score: Inline _Bitfield_Find_first_bit()
Turn _Bitfield_Find_first_bit() macro into an inline function.
2016-06-08 15:48:03 +02:00
Sebastian Huber
7103ad34b0 score: Define _Priority_Bits_index() once 2016-06-08 15:48:03 +02:00
Sebastian Huber
bf021daf7c score: Define _Priority_Mask() once 2016-06-08 15:48:03 +02:00
Sebastian Huber
b04b76c6a0 score: Simplify priority bit map implementation
The priority bit map can deal with a maximum of 256 priority values
ranging from 0 to 255.  Consistently use an unsigned int for
computation, due to the usual integer promotion rules.

Make Priority_bit_map_Word definition architecture-independent and
define it to uint16_t.  This was already the case for all architectures
except PowerPC.  Adjust the PowerPC bitmap support accordingly.
2016-06-08 15:48:03 +02:00
Sebastian Huber
18e29faf98 score: Delete CPU_USE_GENERIC_BITFIELD_DATA
Rename __log2table into _Bitfield_Leading_zeros since it acually returns
the count of leading zeros of an 8-bit integer.  The value for zero is a
bit odd.  Provide it unconditionally.
2016-06-08 15:48:03 +02:00
Sebastian Huber
987ea1a9d3 powerpc: Define bitmap defines to FALSE 2016-06-08 15:48:02 +02:00
Sebastian Huber
ec5d7f92fd score: Delete dead copy and paste code 2016-06-08 15:48:02 +02:00
Sebastian Huber
4c19e59b5e smptests/smpatomic01: Fix seqlock write 2016-06-08 10:01:44 +02:00
Sebastian Huber
cc8bb9e337 smptests/smpatomic01: Add seqlock test case 2016-06-07 15:28:57 +02:00
Sebastian Huber
6fc34e43f5 rtems: Simplify rtems_semaphore_create()
Remove superfluous includes.  Use one attribute compare for each
semaphore variant.  Text size drops by 10% on PowerPC due to this.
2016-06-07 10:18:39 +02:00
Sebastian Huber
2f3d8040ca tools: Delete unused binpatch
This was a no-install binary apparently unused.

Update #2730.
2016-06-06 14:10:56 +02:00
Alexander Krutwig
033443c869 bsp/atsam: Support QSPI flash 2016-06-06 12:57:08 +02:00
Alexander Krutwig
15f0f9b448 atsam: Fix network interface PHY handling
Close #2685.
2016-06-06 12:57:07 +02:00
Alexander Krutwig
a2597f3160 shell: Add rtems_shell_wait_for_explicit_input() 2016-06-06 12:57:07 +02:00
Sebastian Huber
214156d98c mghttpd: Add RTEMS printer support 2016-06-06 12:57:07 +02:00
Sebastian Huber
3ad5f86cf6 rtems: Fix no protocol mutex release
The Classic binary semaphores without a locking protocol
(RTEMS_BINARY_SEMAPHORE) could be released by everyone, e.g. in contrast
to the POSIX mutexes (all variants) or the Classic binary semphores with
priority inheritance or ceiling, there was no owner check in the release
path.

This behaviour was a bit unexpected and not documented.   Add an owner
check to the release path.  Update sptests/sp42 accordingly.

This change has nothing to do with the simple binary semaphores
(RTEMS_SIMPLE_BINARY_SEMAPHORE) which have no owner at all.

Update #2725
2016-06-06 12:57:07 +02:00
Sebastian Huber
a2f91f6cb8 tftp: Use proper semaphore attr for mutex
Close #2729.
2016-06-06 12:57:07 +02:00
Sebastian Huber
c75aa864cf pipe: Use proper semaphore attr for mutex
Close #2728.
2016-06-06 12:57:07 +02:00
Sebastian Huber
a7f0096b73 dosfs: Use proper semaphore attr for mutex
Close #2727.
2016-06-06 12:57:06 +02:00
Sebastian Huber
89f8d9fcc0 libblock: Use proper semaphore attr for mutex
Close #1452.
2016-06-06 12:57:06 +02:00
Chris Johns
d84e346b26 libmisc/untar: Support directory create and overwrites. Share the common code.
Support creating directories for files with a path depth greater than 1. Some
tar files can have files with a path depth greater than 1 and no directory
entry in the tar file to create a directory.

Support overwriting existing files and directories failing in a similar
way to tar on common hosts. If a file is replaced with a file delete the
file and create a new file. If a directory replaces a file remove the file
and create the directory. If a file replaces a directory remove the directory,
and if the directory is not empty and cannot be removed report an error. If a
directory alreday exists do nothing leaving the contents untouched.

The untar code now shares the common header parsing and initial processing
with the actual writes still separate. No changes to the IMFS have been made.

Updates #2415.
Closes #2207.
2016-06-03 18:14:20 +10:00
Chris Johns
560db81027 libmisc/stackchk: Fix printk warnings. 2016-06-03 17:28:59 +10:00
Chris Johns
23213135d1 arm: Fix printk warnings. 2016-06-03 17:28:58 +10:00
Sebastian Huber
c6556e2ecc score: Maybe fix _Thread_Lock_acquire()
The approach with the generation number was broken.  The load/store of
the current lock, the thread queue and the thread queue operations were not
properly synchronized.  Under certain conditions on a PowerPC T4240 old
thread queue operations operated on a new thread queue (NULL pointer).
2016-06-02 07:43:15 +02:00
Sebastian Huber
f807b84ba0 score: Fix _Thread_Lock_acquire()
A read-modify-write operation is necessary to read the last value
written.

See for example C11 standard or Power ISA 2.07, Book II: Power ISA
Virtual Environment Architecture, Section 1.6.3 Memory Coherence
Required [Category: Memory Coherence] and Section 1.7.3 Atomic Update.
2016-06-01 11:13:47 +02:00
Sebastian Huber
a9cc6a84c5 smptests/smpatomic01: New test cases
Demonstrate that a read-modify-write atomic operation may be necessary
on some archtitectures to observe the latest value written.
2016-06-01 09:53:43 +02:00
YANG Qiao
6b5df955a6 arm/raspberrypi: add fbcons support for rpi bsp 2016-05-31 10:33:44 +02:00
YANG Qiao
c12069e855 arm/raspberrypi: add video outchar support for rpi bsp 2016-05-31 10:33:43 +02:00
Pavel Pisa
c64d5f0d0c arm/raspberrypi: move MMU in front of application image to respect variable memory size.
The page table is placed at address 0x00004000 which provides
required 16 kB space till the start of application image.

The RAM size specified in a linker script is upper limit
address of RAM utilized for the work area initialization.

If VideoCore reports to use lower address than expected
then work area size is adjusted (shrinked) appropriately.
2016-05-31 10:33:43 +02:00
YANG Qiao
c1a9f6a128 arm/raspberrypi: add VideoCore framebuffer without initialization 2016-05-31 10:33:43 +02:00
Pavel Pisa
b96defda47 arm/raspberrypi: Raspberry Pi v2 ALLOCATE_BUFFER VC4 operation returns direct address. 2016-05-31 10:33:43 +02:00
Pavel Pisa
de378ad40d arm/raspberrypi: ensure that correct RPI_PERIPHERAL_BASE is provided by raspberrypi.h
If the raspberrypi.h has been included without preceding inclussion
of bsp.h then BSP_IS_RPI2 has not been set for Raspberry Pi 2
BSP variant and bad things happen later.

The patch includes bspopts.h by raspberrypi.h and even includes
bsp.h in critical peripherals support.
2016-05-31 10:33:42 +02:00