Commit Graph

29525 Commits

Author SHA1 Message Date
Pavel Pisa
b83c23e62a arm/raspberrypi: resolve BSP warnings. 2016-06-28 17:07:02 +02:00
Pavel Pisa
68565b090e arm/raspberrypi: run VideoCore and mailbox code through rtems.uncrustify.
Some changes have been reverted to keep readability.
For example squash of BCM2835_MBOX_TAG_* defines
which are visually aligned in column.
2016-06-28 16:15:38 +02:00
Mudit Jain
48704cdebd arm/raspberrypi: Adding functionalities to Mailbox RPi
Added functions for retrieving firmware revision,
board model and board revision.
2016-06-28 15:44:58 +02:00
Sebastian Huber
aa30e2c115 bsp/mvme162: Include missing <rtems/bspIo.h> 2016-06-28 13:10:16 +02:00
Christian Mauderer
095ecbf263 libnetworking: Import current <sys/socket.h>
Import the <sys/socket.h> from current FreeBSD.  This allows to build
some current software (e.g. libressl).
2016-06-28 13:10:01 +02:00
Sebastian Huber
e79a0ca75f libnetworking: Move RTEMS-specific socket wake-up
Close #2748.
2016-06-28 13:10:01 +02:00
Christian Mauderer
4ba4f8218a libnetworking: Hide SO_PRIVSTATE 2016-06-28 13:10:01 +02:00
Christian Mauderer
f0fc2c0e02 libnetworking: Add <machine/_align.h>
This is necessary for new <sys/socket.h>.
2016-06-28 13:10:01 +02:00
Christian Mauderer
4c02385d8f libnetworking: Import current <arpa/inet.h>
Import the <arpa/inet.h> from current FreeBSD.  Necessary due to changes
in <netinet/in.h>.  Remove BSD hack from <arpa/inet.h>.

Clean up problems with htonl().  These functions are defined in
<arpa/inet.h>.  This lead to some problems because they are defined in
<rtems/endian.h> too.  Add NTOHL, ... to
<rtems/rtems_bsdnet_internal.h>.
2016-06-28 13:10:01 +02:00
Christian Mauderer
657e6c93ef libnetworking: Import current <netinet/in.h>
Import the <netinet/in.h> from current FreeBSD.  This allows to build
some current software (e.g. libressl).

Add legacy support like

* prototype for in_cksum(),
* IPPORT_USERRESERVED,
* deprecated IPCTL_RT* defines,
* ip_fw_chk_t and ip_fw_ctl_t,
* ip_nat_... (IP NAT hooks), and
* IP_NAT option for get/setsockopt()

to new <rtems/rtems_netinet_in.h>.
2016-06-28 13:09:44 +02:00
Christian Mauderer
005c3fe701 libnetworking: Import current <netinet6/in6.h>
Import the <netinet6/in6.h> from current FreeBSD.  This allows to build
some current software (e.g. libressl).
2016-06-28 13:02:20 +02:00
Christian Mauderer
f2082cc61d libnetworking: Import <sys/_sockaddr_storage.h>
Import the <sys/_sockaddr_storage.h> from current FreeBSD.  Necessary
for <netinet/in.h> update.
2016-06-28 13:02:20 +02:00
Christian Mauderer
195d412d39 libnetworking: Add minimal getnameinfo()
This implementation just falls back to giving a string representation of
the IP.  It supports IPv4 only.

Add test for getnameinfo().
2016-06-28 13:01:47 +02:00
Christian Mauderer
232d6fecb6 libnetworking: Import current <netdb.h>
Import the <netdb.h> from current FreeBSD.  This allows to build some
current software (e.g. libressl).

Add __h_errno().

Update gethostent_r() API.  Linux and FreeBSD use a common API now.
Adapt the RTEMS one to provide the same one.

Match gethostbyname_r() with prototype.
2016-06-28 13:01:38 +02:00
Christian Mauderer
7e6f2350ea libnetworking: Add <rtems/rtems_netdb.h>
Move prototypes of non-portable _get*by*name/addr and _set/end*ent
functions.  This makes it easier to update <netdb.h>.
2016-06-28 13:01:37 +02:00
Christian Mauderer
187a074404 libcsupport: Add dummy for setgroups().
The dummy for setgroups() allows applications using it to build (for example
civetweb webserver).
2016-06-28 13:01:37 +02:00
Sebastian Huber
254dc82daf score: Change Priority_Control to 64-bit
A 32-bit Priority_Control limits the uptime to 49 days with a 1ms clock
tick in case the EDF scheduler is used.  Increase it to 64-bit to enable
proper operation of the EDF scheduler,

Close 2173.
2016-06-24 14:44:31 +02:00
Sebastian Huber
1d72f03e5a score: Silence integer conversion warnings 2016-06-24 14:44:31 +02:00
Sebastian Huber
9f61ad60c0 testsuites: Increase invalid priority values
Increase the invalid priority values to support test runs with
alternative schedulers offering a significant higher maximum priority
value, e.g. EDF.
2016-06-24 14:44:31 +02:00
Sebastian Huber
1c77a36f11 bsps: Include missing <rtems/bspIo.h> 2016-06-24 14:31:29 +02:00
Sebastian Huber
50a56dff13 score: Move SCHEDULER_EDF_PRIO_MSB
This is an implementation detail of the EDF scheduler.
2016-06-24 11:52:57 +02:00
Pavel Pisa
14de20f15b arm/raspberrypi: Force VC mail box buffer to be synchronized through cache.
This solution is quick fix until CPU_DATA_CACHE_ALIGNMENT is defined
and cache manager is checked on all Raspberry Pi variants.
2016-06-24 11:24:09 +02:00
Pavel Pisa
8dcb8837f3 MAINTAINERS: added self 2016-06-24 11:23:46 +02:00
Sebastian Huber
a4a307dfbd score: Fix _Scheduler_EDF_Yield()
A non-preemptive task must yield if it says so.
2016-06-24 10:28:02 +02:00
Sebastian Huber
51e008dda1 posix: Fix pthread_create()
Do not access data of the executing thread without proper locks.
2016-06-24 10:28:02 +02:00
Sebastian Huber
b364d386c9 sptests/spintrcritical23: Explicity set scheduler
This test uses scheduler-specific data structures, thus it must use the
right scheduler.
2016-06-24 10:27:53 +02:00
Sebastian Huber
b679b4929d sptests/sp42: Relax priority requirements 2016-06-23 10:36:23 +02:00
Sebastian Huber
93f158f943 score: Fix EDF no-preempt thread handling 2016-06-23 10:36:23 +02:00
Sebastian Huber
ec5d95e15e smptests/smpmrsp01: Fix due to API changes
Commit 77ff5599e0 introduced a change in
the rtems_semaphore_create() behaviour for MrsP semaphores.  The ceiling
priorities for all schedulers except the scheduler of the executing
thread are initialized to zero.
2016-06-23 10:36:22 +02:00
Alexander Krutwig
0c1413c284 bsp/atsam: Add I2C driver 2016-06-23 07:54:20 +02:00
Alexander Krutwig
0fddefe65b bsp/atsam: Fix QSPI driver API
We support read/write of arbitrary buffers.
2016-06-22 16:09:01 +02:00
Alexander Krutwig
006af6ac76 score: Improve heap protection
Check block pointers of deferred free list before use.
2016-06-22 16:07:43 +02:00
Sebastian Huber
9bfad8cd51 score: Add thread priority to scheduler nodes
The thread priority is manifest in two independent areas.  One area is
the user visible thread priority along with a potential thread queue.
The other is the scheduler.  Currently, a thread priority update via
_Thread_Change_priority() first updates the user visble thread priority
and the thread queue, then the scheduler is notified if necessary.  The
priority is passed to the scheduler via a local variable.  A generation
counter ensures that the scheduler discards out-of-date priorities.

This use of a local variable ties the update in these two areas close
together.  For later enhancements and the OMIP locking protocol
implementation we need more flexibility.  Add a thread priority
information block to Scheduler_Node and synchronize priority value
updates via a sequence lock on SMP configurations.

Update #2556.
2016-06-22 14:44:56 +02:00
Sebastian Huber
69a6802bfa score: Move _RBTree_Find()
The _RBTree_Find() is no longer used in the score.  Move it to sapi and
make it rtems_rbtree_find().  Move corresponding types and support
functions to sapi.
2016-06-22 14:37:11 +02:00
Sebastian Huber
768c483b70 score: Move _RBTree_Insert()
The _RBTree_Insert() is no longer used in the score.  Move it to sapi
and make it rtems_rbtree_insert().
2016-06-22 14:37:11 +02:00
Sebastian Huber
99fc1d1d1b score: Rework EDF scheduler
Use inline red-black tree insert.  Do not use shifting priorities since
this is not supported by the thread queues.  Due to the 32-bit
Priority_Control this currently limits the uptime to 49days with a 1ms
clock tick.

Update #2173.
2016-06-22 14:37:11 +02:00
Sebastian Huber
9a78f8a507 score: Modify release job scheduler operation
Pass the deadline in watchdog ticks to the scheduler.

Update #2173.
2016-06-22 14:37:10 +02:00
Sebastian Huber
7ec66e0890 score: Remove hidden deadline overrule for CBS
Do what the user commands.  Maybe we should add a rtems_cbs_period()
that calls rtems_rate_monotonic_period() with the right parameter.

Update #2173.
2016-06-22 14:37:10 +02:00
Sebastian Huber
77ff5599e0 score: Introduce map priority scheduler operation
Introduce map/unmap priority scheduler operations to map thread priority
values from/to the user domain to/from the scheduler domain.  Use the
map priority operation to validate the thread priority.  The EDF
schedulers use this new operation to distinguish between normal
priorities and priorities obtain through a job release.

Update #2173.
Update #2556.
2016-06-22 14:36:40 +02:00
Sebastian Huber
b8f76fa28e score: Delete unused _Scheduler_Priority_compare()
By convention, thread priorities must be integers in RTEMS.  Smaller
values represent more important threads.
2016-06-22 14:00:29 +02:00
Sebastian Huber
c82835a231 rtems: Rework RTEMS API to SuperCore priority
Use same structure as POSIX API for thread priority conversion to/from
SuperCore.
2016-06-22 14:00:28 +02:00
Sebastian Huber
1a4eac500c posix: Generalize _POSIX_Priority_To_core()
Move POSIX API priority validation into _POSIX_Priority_To_core().
2016-06-22 14:00:28 +02:00
Sebastian Huber
5a32c486f9 posix: Make POSIX API aware of scheduler instances 2016-06-22 14:00:28 +02:00
Sebastian Huber
eec08efc90 posix: Rework sporadic server scheduling policy
Instead of lowering the priority in case the initial budget is consumed
raise the priority for each new period.  Restore the normal priority
once the initial budget is consumed.  This makes it later easier to
combine the high priority phase with temporary priority boosts (e.g. via
priority ceiling and inheritance).

Use the thread lock to protect the POSIX thread attributes instead of
the thread state lock.  This makes it easier to change the thread
priority and keep the POSIX attributes consistent.

Fixes a false positive use of uninitialized variable warning.
2016-06-22 14:00:28 +02:00
Sebastian Huber
6bab009a61 posix: Delete POSIX_API_Control::schedparam
This field was redundant.
2016-06-22 14:00:28 +02:00
Sebastian Huber
4dc5450eeb posix: Delete POSIX_API_Control::schedpolicy
This field was redundant.
2016-06-22 14:00:28 +02:00
Sebastian Huber
4da078a8ad posix: Delete POSIX_API_Control::ss_high_priority
This field was unused.
2016-06-22 14:00:27 +02:00
Sebastian Huber
2df7fcff88 posix: _POSIX_Mutex_Default_attributes
Make _POSIX_Mutex_Default_attributes constant and independent of the
scheduler instance.  Use INT_MAX to indicate the default ceiling
priority.
2016-06-22 14:00:27 +02:00
Sebastian Huber
ce6e9ec22f posix: pthread_mutexattr_setprioceiling()
Accept all priority values in pthread_mutexattr_setprioceiling().  This
is in line with POSIX and FreeBSD.  The priority is validated in
pthread_mutex_init().  Validate the priority only for priority ceiling
mutexes.
2016-06-22 14:00:27 +02:00
Sebastian Huber
655ce0fb00 sparc: Optimize CPU counter support 2016-06-22 14:00:27 +02:00