Commit Graph

29458 Commits

Author SHA1 Message Date
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
Pavel Pisa
4c59eebfbf arm/raspberrypi: cmdline enhancement and early access workaround.
cmdline argument is returned without option name.
The calls to command line parsing can be called earlier before
BSS is cleaned out.
2016-05-31 10:33:42 +02:00
Sebastian Huber
dd2c57d40b libchip: Remove dwmac network interface driver
The network interface driver for this module is located in the new
network stack (libbsd), see file "if_dwc.c".
2016-05-31 10:25:25 +02:00
Sebastian Huber
01cb5540bd shell: Add CPUINFO command
Update #2723.
2016-05-31 10:10:36 +02:00
Sebastian Huber
5e072f6d35 cpuuse: Hide implementation details 2016-05-31 10:10:36 +02:00
Sebastian Huber
3242614d92 Fix rtems_print_printer_fprintf()
We must use vfprintf().
2016-05-31 10:10:36 +02:00
Sebastian Huber
a9cff51b05 bsp/qoriq: Fix nocache region placement
Avoid memory waste due to alignment padding.  Provide enough space for
the DPAA driver infrastructure.
2016-05-31 10:10:36 +02:00
Sebastian Huber
0546e65ec2 bsps: Add defines for some linker subsections
The GNU ld sort by name or alignment needs distinct input sections.
2016-05-31 10:10:36 +02:00
Sebastian Huber
ccda945996 bsps: Sort some sections first by alignment
This helps to avoid alignment padding and thus may reduce some memory
waste.
2016-05-31 10:10:36 +02:00
Sebastian Huber
024bffc665 score: Use owner of thread queue for CORE mutex 2016-05-30 16:16:24 +02:00
Sebastian Huber
a65b02d434 rtems: Remove superfluous includes 2016-05-30 16:16:24 +02:00
Sebastian Huber
73f2ddb915 rtems: Fix semaphore field name 2016-05-30 16:16:24 +02:00
Sebastian Huber
3692095f2c rtems: Move MrsP semaphore operations
Move MrsP semaphore operations to a less prominent location.  Fix field
name.
2016-05-30 16:16:23 +02:00
Sebastian Huber
0b713f8940 score: Rework CORE inherit priority mutex
Provide dedicated seize and surrender methods for inherit priority
mutexes.  This eliminates CORE_mutex_Attributes.
2016-05-30 16:16:23 +02:00
Sebastian Huber
33e250c9fa score: Rework CORE priority ceiling mutex
Rework seize and surrender methods to use CORE_ceiling_mutex_Control.
This eliminates CORE_mutex_Disciplines.
2016-05-30 16:16:23 +02:00
Sebastian Huber
5a598ac99b score: Add CORE mutex variants
Add CORE_recursive_mutex_Control and CORE_ceiling_mutex_Control to avoid
the run-time evaluation of attributes to figure out how a particular
mutex methods should behave.  Start with the no protocol variants.  This
eliminates the CORE_MUTEX_DISCIPLINES_FIFO and
CORE_MUTEX_DISCIPLINES_PRIORITY disciplines.
2016-05-30 16:16:23 +02:00
Sebastian Huber
bbb3c5f331 posix: Delete POSIX_Mutex_Protocol::process_shared 2016-05-30 16:16:23 +02:00
Sebastian Huber
dbd65507a2 posix: Avoid use of internal mutex methods
Avoid use of internal mutex methods for pthread_mutex_setprioceiling().
2016-05-30 16:16:22 +02:00
Sebastian Huber
e0bb60bc81 posix: Avoid use of internal mutex methods
Avoid use of internal mutex methods for condition variables.
2016-05-30 16:16:22 +02:00
Sebastian Huber
bac50cfc78 rtems: Remove superfluous includes 2016-05-30 16:16:22 +02:00
Sebastian Huber
3c1ad25768 rtems: Simplify rtems_semaphore_delete()
Due to the unified status codes, we can now use a common flush and
destroy method for semaphore and mutex variants.
2016-05-30 16:16:22 +02:00
Sebastian Huber
8a77ef63de rtems: Simplify rtems_semaphore_flush()
Due to the unified status codes, we can now use a common flush method
for semaphore and mutex variants.
2016-05-30 16:16:22 +02:00
Sebastian Huber
09c5ca4cb4 score: Simplify CORE mutex
Remove superfluous support for simple binary semaphores.  With this we
can get rid of the CORE_MUTEX_NESTING_BLOCKS variant.
2016-05-30 16:16:22 +02:00
Sebastian Huber
2581a563f9 score: Add semaphore variants 2016-05-30 16:16:21 +02:00
Sebastian Huber
3ca6e61851 rtems: Simplify rtems_semaphore_delete() 2016-05-30 16:16:21 +02:00
Sebastian Huber
af746b093a score: Use thread queue lock for MrsP
Replace the ISR lock in MRSP_Control with a thread queue.  This
simplifies the Classic semaphore implementation.  Only the lock part of
the thread queue is used.
2016-05-30 16:16:21 +02:00
Sebastian Huber
93306058c0 score: _CORE_mutex_Check_dispatch_for_seize()
Move the safety check performed by
_CORE_mutex_Check_dispatch_for_seize() out of the performance critical
path and generalize it.  Blocking on a thread queue with an unexpected
thread dispatch disabled level is illegal in all system states.

Add the expected thread dispatch disable level (which may be 1 or 2
depending on the operation) to Thread_queue_Context and use it in
_Thread_queue_Enqueue_critical().
2016-05-30 16:16:21 +02:00
Sebastian Huber
0e1d11f3f0 score: Add _Thread_queue_Context_set_MP_callout()
Add _Thread_queue_Context_set_MP_callout() to simplify
_Thread_queue_Context_initialize().  This makes it possible to more
easily add additional fields to Thread_queue_Context.
2016-05-30 16:16:21 +02:00