Commit graph

19237 commits

Author SHA1 Message Date
Szymon Janc
85195d2d2e Bluetooth: Add support for reading encryption key size for BR/EDR
Make use of "Read Encryption Key Size" HCI command to read real
encryption key size for BR/EDR connection instead of assuming 16
bytes key size.

< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2
        Handle: 11
> HCI Event: Command Complete (0x0e) plen 7
      Read Encryption Key Size (0x05|0x0008) ncmd 1
        Status: Success (0x00)
        Handle: 11
        Key size: 16

Change-Id: I372028ce73115d34aedbb6b5ce420144844cfce0
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 06:01:55 +00:00
Carles Cufi
90871a5e98 Bluetooth: Controller: Implement LE_RAND command
The LE_RAND HCI command was not filling in the rand array
with 8 random numbers as required by the spec.
Please note that the while() loop inside the command's
implementation can take up to hundreds of ms to execute.

Jira: ZEP-726

Change-Id: If27ff861ee5fa7842cd469e99d5bfa8ac47ac2fa
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
ef10baa235 Bluetooth: Controller: Clean up HCI macros
Clean up, document and remove the macros used in hci.c
to access the different parameters and calculate lengths
of events and data structures.

Jira: ZEP-726

Change-Id: I476aa9e061dfe429b5181265167bffa203ed151b
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
ec44eae44d Bluetooth: Controller: Use hci.h for ACL data
Switch to using the definitions in include/bluetooth/hci.h
for ACL data handling, both in RX and TX.

Jira: ZEP-726

Change-Id: I6b5f6de4ff568c4e73432df3edfa7d0a57f22fff
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Johan Hedberg
37d204e03d Bluetooth: Fix giving back pkts semaphore when disconnecting
The TX fiber might be blocked waiting for the num_pkts semaphore when
a disconnection occurs. If we only give back the semaphore once
exiting the while-loop we may end up in a deadlock. Giving back the
semaphore in the connection disconnect handler solves this.

An additional fix this patch does is to ensure that we don't perform
integer underflow because of the last iteration.

Change-Id: Ia67dc506885d0c2bad25c598ea349f1fd251218b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-09-14 08:45:45 +03:00
Szymon Janc
c31fcf4e5a Bluetooth: SMP: Distribute local keys over BR/EDR
< ACL Data TX: Handle 11 flags 0x00 dlen 21
      BR/EDR SMP: Identity Information (0x08) len 16
        Identity resolving key: 732bf430116b328587de5fda0a4b8c80
< ACL Data TX: Handle 11 flags 0x00 dlen 12
      BR/EDR SMP: Identity Address Information (0x09) len 7
        Address type: Public (0x00)
        Address: 00:02:72:33:45:88

Jira: ZEP-605

Change-Id: I6ba203ea4bbd64c0f05150d3865e6c3bb630b41d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 08:45:45 +03:00
Carles Cufi
92b4458690 Bluetooth: Controller: Remove HCI event definitions from hci.c
Delete all event definitions from hci.c since the code now
uses the ones in include/bluetooth/hci.h exclusively.
This is the fourth and last commit in a series that transitions
from the event structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I625c2aecf759823a1cc73a3ea096564284fe8c52
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
0ed85e24be Bluetooth: Controller: Use hci.h for num complete
Use Zephyr's include/bluetooth/hci.h for the HCI event
Number of Completed Packets.
This is the third commit in a series that transitions from
the event structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I179bceb2f9dc07d7a1a524c3a80f0886f712ec2b
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Szymon Janc
8f9eccac25 Bluetooth: SMP: Support Pairing Failed over BR/EDR
Invalidate received keys on Pairing Failed.

Jira: ZEP-605

Change-Id: I4eec85233ed27312b9f61d89d71329cc665b382b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 08:45:45 +03:00
Szymon Janc
2cac219a36 Bluetooth: SMP: Support Pairing Request over BR/EDR
This allows to handle Pairing Request and reply with Pairing Response.

> ACL Data RX: Handle 11 flags 0x02 dlen 11
      BR/EDR SMP: Pairing Request (0x01) len 6
        IO capability: DisplayOnly (0x00)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: No bonding, No MITM, Legacy,
                                    No Keypresses (0x00)
        Max encryption key size: 16
        Initiator key distribution: IdKey (0x02)
        Responder key distribution: IdKey (0x02)
< ACL Data TX: Handle 11 flags 0x00 dlen 11
      BR/EDR SMP: Pairing Response (0x02) len 6
        IO capability: DisplayOnly (0x00)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: No bonding, No MITM, Legacy,
                                    No Keypresses (0x00)
        Max encryption key size: 16
        Initiator key distribution: IdKey (0x02)
        Responder key distribution: IdKey (0x02)

Jira: ZEP-605

Change-Id: I886c8d345b87dafae93d692ab39b7f1214bff733
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 08:45:45 +03:00
Szymon Janc
355ef5a5a0 Bluetooth: SMP: Clear keys on timeout when running over BR/EDR
If SMP Timeout occured pairing failed and any keys distributed should
be invalidated.

Jira: ZEP-605

Change-Id: Ibdb9d61c720f9da10232c9bc6148d9ff73ccfa6c
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 08:45:45 +03:00
Johan Hedberg
3a3238d1b0 Bluetooth: GATT: Fix potential bt_conn reference leak
There was a missing bt_conn_unref() when bt_conn_lookup_addr_le()
returns a connection that's not in BT_CONN_CONNECTED state.

Change-Id: I4c6271d5bf596ea4d9b899e99ce1c7b7c8693f5e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-09-14 08:45:45 +03:00
Szymon Janc
d27447c674 Bluetooth: SMP: Add initial code for BR/EDR support
This allows to register SMP over BR/EDR fixed channel is Secure
Connections are supported by controller.

Change-Id: I681bc1cc789ae30a115594c1143485e8a7a8acb3
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 08:45:45 +03:00
Szymon Janc
fa726a8d99 Bluetooth: SMP: Move smp_create_pdu function up in a file
This is in prepartion for BR/EDR support.

Change-Id: Ie9e8f6368b74e6e9768e775d6ccf718fb6927e3a
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-09-14 08:45:45 +03:00
Carles Cufi
a587f2692c Bluetooth: Controller: Use hci.h for data-control evt handling
Use Zephyr's include/bluetooth/hci.h for HCI event
handling in data-related events.
This is the second commit in a series that transitions from
the event structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I0e9e6f709091859af47d90b26f5e7baa830a2838
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
77c389aa1c Bluetooth: HCI: Add read remote version info event
This adds the Read Remote Version Info Complete event,
used in both BR/EDR and LE and required by the LE Controller.

Change-Id: I650411ef2c582c20a90eb73bc4475b5e2d4aa2d9
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
a955f583eb Bluetooth: Controller: Use hci.h for control event handling
Use Zephyr's include/bluetooth/hci.h for HCI event
handling in control events.
This is the first commit in a series that transitions from
the event structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I6f131675add18e2ae061f0fb2cf220ea7057f852
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
10cd9e31f3 Bluetooth: HCI: Add auth payload expiry event
This adds the Authenticated Payload Timeout expired event,
used in both BR/EDR and LE and required by the LE Controller.

Change-Id: Ifbbccea6d44a7d432734090e56cbf4e7189362b0
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
4392d6d737 Bluetooth: HCI: Fix and extend advertising report events
The advertising report (standard or direct) events require
a number of reports field that is used by the controller
to fill in the structure.
At the same time this fixes the subevent code of the direct
advertising report structure.

Change-Id: I0fdb9b1dcad03615ac9b3f1f38fdfbe9ab3f9c3a
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Sathish Narasimman
9738e83285 Bluetooth: HFP HF: Initialize Handsfree profile
Initialize Handsfree profile for HF Role and register RFCOMM server
channel number to the RFCOMM. And also exposes some basic callbacks
which is required for the application.

Change-Id: Ic79cbd66ef9529c4eb134cc21efcdbc388bb707d
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2016-09-14 08:45:45 +03:00
Sukumar Ghorai
17117f306a Bluetooth: Pre-allocated RFCOMM Channels
Limited number of RFCOMM channels(1-31). Pre-allocated
for profile use and to avoid conflicts.

Change-Id: Ibd081435cf927aa7386161710e48b7371d20af24
Signed-off-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
2016-09-14 08:45:45 +03:00
Carles Cufi
0c463077ad Bluetooth: Controller: Unify handling of async events
This changes the way that aysnchronous events are handled
in the BLE controller's HCI layer. It performs all common
operations in a single place to avoid code repetition of the
same memory accesses over and over.

Jira: ZEP-726

Change-Id: Id9e8395944e8800f32dd9749da2b4f5c901c8682
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
9d48ef5888 Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
Continue using Zephyr's include/bluetooth/hci.h for HCI command
handling in more of the commands.
This commit deletes all command and command complete and
command status event definitions and structures present in
hci.c.
This is the sixth commit in a series that transitions from
the structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I34635a1f55f3aef124fd5ff005c99cedb40b8a49
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
be2bbbae2d Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
Continue using Zephyr's include/bluetooth/hci.h for HCI command
handling in more of the commands.
This commit cleans up hci_cmd_handle() to use the new macros
added in previous commits.
This is the fifth commit in a series that transitions from
the structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I152e02ed15042d367e95432bdd07ae5c74935be8
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
69e1816868 Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
Continue using Zephyr's include/bluetooth/hci.h for HCI command
handling in more of the commands.
This commit removes Nordic Semiconductor Vendor-Specific
commands, since they are currently unused and
manufacturer-specific.
This is the fourth commit in a series that transitions from
the structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: If0141072489777bfecc06e4aaa5f569898a5c449
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
21b3fa240d Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
Continue using Zephyr's include/bluetooth/hci.h for HCI command
handling in more of the commands.
This commit ports the LE controller commands to hci.h.
This is the third commit in a series that transitions from
the structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I3f11cca1da4aa6a20cce9706362818f8f6c87b0a
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Jaganath Kanakkassery
d73814a1d5 Bluetooth: RFCOMM: Implement RX flow control
RX credits is defined based on the number of acl buffers and
it will be updated to remote if it goes beyond the defined
threshold. Controller to host flow control will take care if
acl buffers are not free wrt outstanding RX credits.

Change-Id: Ie597513bda07f39b6934a704f6db6dad14e323d5
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
2016-09-14 08:45:45 +03:00
Luiz Augusto von Dentz
c5dc094f7e Bluetooth: ATT: Fix not handling error response properly
The code should check if there is an existing buffer to match with the
response code.

Change-Id: I08546fdf416884560cf497a34cc4eee95079a589
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-09-14 08:45:45 +03:00
Vinayak Chettimada
e00eed79aa Bluetooth: Controller: Use BT_ASSERT instead of custom impl.
As part of closer integration into Zephyr, remove the use
of custom assert mechanism and use BT_ASSERT instead.

Jira: ZEP-761

Change-id: I27f37d697b0a84bc001754a8d0b4dbb6ddb54298
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Vinayak Chettimada
feb342140a Bluetooth: log: Include nanokernel.h to use BT_ASSERT()
_SysFatalErrorHandler referenced in BT_ASSERT() is arch
defined. Include nanokernel.h in bluetooth/log.h to include
the necessary arch definitions, as required.

Change-id: Ia39690d2a49db0c9db669a68147fe410abb4213b
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Vinayak Chettimada
4a4b76afbc Bluetooth: log: Call _SysFatalErrorHandler in BT_ASSERT()
Change-id: I0cd55426b4dbae0cc95b6b6b57fcf1a02c9103b4
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Vinayak Chettimada
190ac96fad Bluetooth: ATT: Remove unnecessary call to BT_ASSERT
Change-id: Ic8038392e540445b718beb05a3375aaa6a50ad61
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
ca4b5b93d8 Bluetooth: HCI: Add handle to conn param update command complete
The BT_HCI_OP_LE_CONN_PARAM_REQ_REPLY and
BT_HCI_OP_LE_CONN_PARAM_REQ_NEG_REPLY command complete events contain
a connection handle that serves to match the command with their
corresponding command complete event when there's more than one
pending. For now this just adds the structure definitions required,
and later on code will need to be added to handle possible mismatches.

Change-Id: I4585888b32ec995b18847c2a6ed488a2da9c8520
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Carles Cufi
102aee8f55 Bluetooth: HCI: Add handle to LTK command complete events
The BT_HCI_OP_LE_LTK_REQ_REPLY and BT_HCI_OP_LE_LTK_REQ_NEG_REPLY
command complete events contain a connection handle that serves to
match the command with their corresponding command complete event
when there's more than one pending. For now this just adds the
structure definitions required, and later on code will need to
be added to handle possible mismatches.

Change-Id: I37e88070bc0d4d1b80f085f7e162c30715a82103
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Mariusz Skamra
044e15743d Bluetooth: tester: Add support for L2CAP send data command
Adds support for handling L2CAP send data command.

Change-Id: I120a9ed56506ce205e32c5efe15c5d967d7726b6
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Grzegorz Kolodziejczyk
a4f526fb6b Bluetooth: tester: Add support for L2CAP listen command
This patch adds support for handling L2CAP listen command.

Change-Id: I2c9c27f925c923a14ddb28b41fbefd612b32d63a
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Grzegorz Kolodziejczyk
c4957ea0e8 Bluetooth: tester: Add support for L2CAP disconnect commands
This patch adds support for handling L2CAP disconnect command.

Change-Id: If6f8f3a7485dc8ae270481ed6af4f0a4d4c69fac
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Carles Cufi
34cd316301 Bluetooth: Controller: Switch to Zephyr's hci.h for cmd handling
Continue using Zephyr's include/bluetooth/hci.h for HCI command
handling in more of the commands, including the informational ones.
This is the second commit in a series that transitions from
the structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: Iecbc7ae5ba2c8435a51d62d59e8095aa25e6dc0e
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Grzegorz Kolodziejczyk
086eac4344 Bluetooth: tester: Add support for L2CAP connect command
This patch adds support for handling L2CAP connect command.

Change-Id: I95d27831f65ed6a3e02e1d6e7583baa6890b588c
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-14 08:45:45 +03:00
Carles Cufi
80d1fba9e9 Bluetooth: HCI: Fix the length of supported commands
The length of the commands array in the return parameters of
the HCI Read Local Supported Commands event is 64 bytes
according to the spec. This was mistakenly set as 36 bytes due
to the fact that only 36 out of the 64 bytes currently contain
meaningful data. The actual array as received from the driver
will always be 64 bytes however, and is therefore sized
accordingly.

Change-Id: Iee7f1fc18045dff96efcc808fd81661eced37b03
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-09-14 08:45:45 +03:00
Benjamin Walsh
7e6dacd65f unified/build: allow building the unified kernel
Added needed kconfig options. KERNEL_V2 selects MICROKERNEL to allow
middleware and application that differentiate between NANOKERNEL and
MICROKERNEL to run unmodified.

Build the unified/ kernel directory: do not touch the
nanokernel/microkernel directories.

Invoke sysgen for both microkernel and unified kernel. Only have sysgen
reference include/microkernel if building an original microkernel.

Change-Id: If74779146143434f7ee274bbef32d6c894b9f1a1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
456c6daa9f unified: initial unified kernel implementation
Summary of what this includes:

    initialization:

    Copy from nano_init.c, with the following changes:

    - the main thread is the continuation of the init thread, but an idle
      thread is created as well

    - _main() initializes threads in groups and starts the EXE group

    - the ready queues are initialized

    - the main thread is marked as non-essential once the system init is
      done

    - a weak main() symbol is provided if the application does not provide a
      main() function

    scheduler:

    Not an exhaustive list, but basically provide primitives for:

    - adding/removing a thread to/from a wait queue
    - adding/removing a thread to/from the ready queue
    - marking thread as ready
    - locking/unlocking the scheduler
      - instead of locking interrupts
    - getting/setting thread priority
      - checking what state (coop/preempt) a thread is currenlty running in
    - rescheduling threads
    - finding what thread is the next to run
    - yielding/sleeping/aborting sleep
    - finding the current thread

    threads:

    - Add operationns on threads, such as creating and starting them.

    standardized handling of kernel object return codes:

    - Kernel objects now cause _Swap() to return the following values:
         0      => operation successful
        -EAGAIN => operation timed out
        -Exxxxx => operation failed for another reason

    - The thread's swap_data field can be used to return any additional
    information required to complete the operation, such as the actual
    result of a successful operation.

    timeouts:

    - same as nano timeouts, renamed to simply 'timeouts'
    - the kernel is still tick-based, but objects take timeout values in
      ms for forward compatibility with a tickless kernel.

    semaphores:

      - Port of the nanokernel semaphores, which have the same basic behaviour
      as the microkernel ones. Semaphore groups are not yet implemented.

      - These semaphores are enhanced in that they accept an initial count and a
      count limit. This allows configuring them as binary semaphores, and also
      provisioning them without having to "give" the semaphore multiple times
      before using them.

    mutexes:

    - Straight port of the microkernel mutexes. An init function is added to
    allow defining them at runtime.

    pipes:

    - straight port

    timers:

    - amalgamation of nano and micro timers, with all functionalities
      intact.

    events:

    - re-implementation, using semaphores and workqueues.

    mailboxes:

    - straight port

    message queues:

    - straight port of  microkernel FIFOs

    memory maps:

    - straight port

    workqueues:

    - Basically, have all APIs follow the k_ naming rule, and use the _timeout
    subsystem from the unified kernel directory, and not the _nano_timeout
    one.

    stacks:

    - Port of the nanokernel stacks. They can now have multiple threads
    pending on them and threads can wait with a timeout.

    LIFOs:

    - Straight port of the nanokernel LIFOs.

    FIFOs:

    - Straight port of the nanokernel FIFOs.

Work by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
         Peter Mitsis <peter.mitsis@windriver.com>
         Allan Stephens <allan.stephens@windriver.com>
         Benjamin Walsh <benjamin.walsh@windriver.com>

Change-Id: Id3cadb3694484ab2ca467889cfb029be3cd3a7d6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
87f1232770 unified/tests: tag working some tests kernel as 'unified_capable'
This allows running the sanitycheck with:

  --tag unified_capable -x KERNEL_TYPE=unified

to run the unified kernel with the tests it is currently known to be
able to run.

Change-Id: Ic145fc6adca162745887672372226fd67447b34a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
8011221712 unified/test_mutex: adapt to run on unified kernel
- Use a more limited range of priorities, since the current
  implementation of the unified kernel only works with 32 priorities
  total. Instead of starting at 10 and going up by 5 up to  50, start
  at 5 and go up by 1 up to 12.

- The definition of kmutex_t has changed from a uint32_t to a struct
  k_mutex *, causing this to not work anymore:

    const kmutex_t private_mutex;

  since this makes the object constant instead of the reference to it.
  Private object must be referenced like this instead:

    kmutex_t const private_mutex;

  since const is left-associative.

Change-Id: I9d70bfa3944ea46033a6b49251a4993e9bd2b588
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
2a669da7bc unified/test_fp: mark test so that it runs the nanokernel version
The test does not run out-of-the-box currently, mark it with a #error.

Change-Id: Ia720c674290e59e95db1c2948c508c0464caa672
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
68a8059603 unified/test_sema: fix isr wrapper names
isr wrapper names conflicted with real kernel APIs.

Change-Id: Ia85245fcd3025f9d15175523982883e16e97010c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
45054a6e02 unified: Fix test_sema/microkernel
Fixes test_sema/microkernel so that the variable assigned the return
value from task_sem_group_take() is of type 'ksem_t' instead of 'int'.

Work by: Peter Mitsis <peter.mitsis@windriver.com>

Change-Id: Iee9f321a6bd51ca3bc0cd8b0c7eceae8a5bf7ce0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
3bcd880594 unified/test_timer: adapt for unified kernel
Test is poking into microkernel private data structuresa, but the
unified kernel provides an API to retrieve that value.

Abstract the call in the microkernel case to minic the unified kernel
API.

Work by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>

Change-Id: Ic3195d470fda178164268d9c71c55a2a6daa61a3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
c24d844eec unified/test_pipe: adapt to not use sem groups
Not available yet on unified kernel.

Change-Id: I70c7c07ab26a66b7a89246a335fa2af0db2ec72c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh
cda52c7adb unified/test_mail: adapt test to not use sem groups and mem pools
Not available on unified kernel yet.

Change-Id: I834482f3ad94d1c6ecc67c70c1fce78e43db31c5
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00