Adds the microkernel infrastructure to permit a microkernel task
to [un]block on a nanokernel object. Unlike tasks that [un]block
on microkernel objects, the work for [un]blocking tasks on nanokernel
objects will not always be done in the kernel service fiber. One of
the repercussions of this is that in many cases the microkernel task
scheduler must be explicitly invoked (by issuing a no-op kernel
service call).
Origin: Original
Change-Id: I2b145668cef142a7a4034e191116fcb344a9b8b3
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Fibers initialize this back pointer to NULL as they are (by definition)
not microkernel tasks. Microkernel tasks initialize it to their
corresponding 'ktask_t'.
However for nanokernel systems, the back pointer is always NULL. This
is because there is only one task in a nanokernel system (the background
task) and it can not pend on a nanokernel object--it must poll.
Change-Id: I9840fecc44224bef63d09d587d703720cf33ad57
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Adds a back pointer to the microkernel task to the TCS when
configured for a microkernel. This is a necessary prerequisite
to support microkernel tasks pending on nanokernel objects.
Change-Id: Ia62f9cf482ca20b008772dad80cbfd6acb6f5b7a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Adds the TF_NANO wait flag reason to indicate that a task is pending
on a nanokernel object.
Change-Id: Ic20ef79398da7d9118bdf775e22b8f8a31501f7f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Add support for the 32-bit timestamp (1/10th ms units) extended
header.
Change-Id: I67f481a35be6878605b8c2256f6e4bfb6afe55c8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We really should have more faith in the compiler, it generates
code to implement this exactly like the arch-specific assembly
versions, and on ARM is actually 4 bytes shorter.
FUNC_NO_FP used to disable the usual C preamble to update the
frame/stack pointers, which is how the sizes are still the same
or less. It's debatable how useful the occasional use of
FUNC_NO_FP is in practice since it hinders debugging and in a
production build frame pointers should be globally disabled, but
we can address that later.
Change-Id: I6c4b64ab3e3a9b6f91d52fa8c92e6e79a986fc77
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This makes code simpler and easier to understand as generating RPA and
setting random address are done in same place.
Change-Id: I1f9ebdf3ee322921258c92f3f1a40d6b7764b2fc
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
If anything went wrong just report connection failed. This makes
code easier to read and less error prone. Also makes sure that
scanning is reenabled with correct parameters on failure.
Change-Id: I7387571f6dbf308511694a635aa47d5371a81616
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
If bt_smp_create_rpa failed connection object needs to be unreferenced.
Change-Id: Ie1f2905cafbf15db2970c0f07748d016cbe55c2b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Getting params from user_data seems to work now.
Change-Id: I81bccea9aa6994d3c09a3ff03a49fa6767e7305e
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
In on_nble_gattc_discover_rsp conn->gatt_private is set to NULL prior
to calling this parser functions. This fixes this issue by passing
discover params pointer to these functions.
Change-Id: I6669cb0d16dc65d532e17f96ceb9cd94dbe6ce08
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
The handler of the microkernel events are not declared properly.
This causes the public event objects to complain about
undefined functions. Fix this by declaring the function
before using it.
JIRA: ZEP-85
Change-Id: I68afe777bad66e010c92e637806a48911b2f52f4
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
I am working on porting Zephyr to ARC EM Starterkit. This board has ARC
CPUs with ICCM memories. On quark_se_ss ICCM is missing and ignored.
Change-Id: Ic49fc8ef3e6ad879ffc673b8baf34dd467f76c04
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
The fixed link was broken when development documentation started being
hosted at /doc instead of /doc/dev
Change-Id: I3621bf83beb030e7d80f60e1d148cd7311d25cdf
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
Updating function names prepares for firmware RPC update, to this
moment only names changed.
Change-Id: I8d19e83c5c88a4b41ed803e276652eb15e0d87b1
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This patch removes the PINMUX_SELECT_REGISTER macro definition from
pinmux_dev_quark_mcu.c since it is already defined in pinmux_quark_mcu.h
(which is included by the .c file).
Change-Id: I468cf6a54fc30d681f42a59eb2c8401d2b180849
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Add implementation for pinmux pin get API in the shim driver.
It is based on the function from pinmux_dev_quark_mcu.c
Jira: ZEP-189
Change-Id: Ib6673f90cfe8e367fcbd12ed546b1fa3af7e1dbf
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Current QMSI SPI API does not handle asymmetric tx/rx buffers, and thus
it's up to cc2520 driver to manage the tx dummy bytes.
Change-Id: I97900946bcd8d96e9f039646bccd765c574c363e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There's no need to drain twice if NRF51_PM is enabled, the draining
shouldn't use rx_ready(), and it should happen after disabling
interrupts. Also rename uart.h to util.h to avoid conflicts with
include/uart.h and remove the left-over ISR prototype declaration.
Change-Id: Id38110dd38cf48edfe4a7b8e2e68cd358a9aa5ea
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
timer_expired uses the nano_timer_test API to determine whether a
timer has expired. This API calls the private function
_nano_timer_expire_wait which returns the timer user data if this
timer has expired. Unfortunately _nano_timer_expire_wait clears the
user data pointer after returning it.
Therefore if timer_expired is called several times for the same timer
and if this timer has already expired then only the first call returns
the expected value (true). Other calls always return false.
In ipv6 this bug can be seen with the uip_ds6_periodic timer. Indeed
when expired this timer is going to be checked at least twice by
etimer_process function and the tcpip eventhandler function. Thus the
final uip_ds6_periodic callback is never called.
The fix consists in adding a expired field in the timer struct and
make timer_expired retain the nano_timer_test result when the timer
has expired.
Change-Id: I3c6aceaa0627be264b6d9913b629e7b619888938
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
In ipv6 the type field of the ethernet header is
left blank and the net buffer size is not updated
with the ethernet header size. Therefor outgoing
ipv6 packets cannot correctly be received.
In ipv6 these two fields are updated by the function
uip_arp_out. However this function doesn't exist in
ipv6, therefore net_driver_ethernet_send has to take
care of the ethernet header.
Change-Id: Ib883a6553786d74dd2a5bca6893a0501f04ce7f4
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
Update function names following firmware name changing.
Change-Id: I8b42c4d9f5c892abec10d8653544c3e03e4ee80d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The application tests polling mode and trigger mode (both data ready and
anymotion triggers).
Origin: Original
Change-Id: Ic0f9400758aaf56ef95f0f3c68c872d1bfd51176
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
It's possible that there's a queued event from the nRF51 at the point
where we start resetting it, resulting in the stack receiving two NOP
events. To prevent this, make sure to drain the UART while the
controller is in a powered off state.
Change-Id: Ic009e11c11ac750fc76c881c0ffe9bd12d38da0a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Instead of requiring application to provide both advertising type
and address type used just require app to provide info if advertising
is connectable or not. Advertising type is set based on provided
SCAN_RSP and local privacy support.
When local privacy is enabled it is no longer possible to advertise
using identity address. If such feature is to be required later on
advertising options can be extended.
This gives BT stack full control over what type of address is used
for advertising and is a preparation for random address rotation
and OOB support.
Change-Id: I90e9a683ef3794f155707343c874f75585439325
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
We now have to supply location of libraries (libgcc, libc) and header
directories to the build system. This can be solved in the
Makefile.toolchain.* file for known toolchains but becomes a problem
when supporting 3rd party SDKs and cross compilers.
Linking with ld requires ld to know where all the artificats of the
compiler are. Use gcc instead to make use of the internal information
available in gcc about additional libraries and headers.
Jira: ZEP-241
Change-Id: I15a3b812467b7ae878226f7e5532d538d2720268
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In a case connection is not known implement notification for all
connections the same way it is done for HCI stack. Attribute database
is scanned for CCC attribute and notifications are sent to all
connections.
Change-Id: Id556b4aa5af124aea672891ca89b278c71519643
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use similar to HCI stack cfg structure to keep value.
Change-Id: I54cf731971c5e2822385dc8eb295ce9951969af6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Save peer address to use it with bt_gatt_notify()
Change-Id: Ie5e3af4cdc2d225c9572e010359f59323ae493a7
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This is just a temporary value for now, need to research the best
value to use.
Change-Id: Icaadf75fa3ae98b087f3d51813f85003f398f378
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These are for any Nios II at this stage of bring-up.
Change-Id: Ie4d0c80df164f81f6615ac35d3f42235b04870f1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Basic build framework for Nios2. Everything is stubbed out,
we just want to have a build going so that we can start to
parallelize implementation tasks.
This patch is not intended to be functional, but should be
able to produce a binary for all the nanokernel-based
sanity checks.
Change-Id: I12dd8ca4a2273f7662bee46175822c9bbd99202a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Edited and added minor markup for consistancy.
Edited some '/' to clarify 'and' 'or'.
Change-Id: I5aa84f278d65e79d12b634fcbef2a8b5070c8ebd
Signed-off-by: Gerardo Aceves <gerardo.aceves@intel.com>
Of the 3 related functions;
_thread_essential_set()
_thread_essential_clear()
_is_thread_essential()
The first two are parameter-less and always operate on
"_nanokernel.current". The last one takes a 'thread' parameter but will
operate on _nanokernel.current if the parameter is NULL. All calls to
_is_thread_essential() pass NULL!
This change makes the 3 functions consistent by removing the parameter
to the 3rd function. This should also be marginally more efficient,
though consistency was the motivation. This change corrects the doc
preamble to all 3 functions.
(These functions would probably be better as inlines. Also, the choice
of when to use wrappers seems a bit arbitrary. E.g. there's nothing
for setting/testing the "FIBER" flag.)
Change-Id: Ie3589f8a28b227c6d7a3a31b664d3b3e6e9c6d17
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
This wrapper exists so that the ESSENTIAL bit doesn't have to be set
explicitly in _nanokernel.current. (And a note is added to nano_init to
avoid a nasty gotcha there.)
Change-Id: I4026ac0cfeace60e36abdbccf15554759f2dbf7a
Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
The UART console init should be done after UART init. So it can be
folded into general UART init, thus one fewer SYS_INIT().
Change-Id: Ifb18c5308dfef790325e6bff5bc7b5976fcd421e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The clkInit() is always called so this can be inlined.
This saves 32 bytes of ROM space compared to non-inlined version.
Change-Id: I2cb6d02c0996acad16029be243f6059183938089
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The clock_init() is always called so this can be inlined.
This saves 32 bytes of ROM space compared to non-inlined version.
Change-Id: I1b95142da4c22f4b7fc7f7f6210503d90cf65cc9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>