Commit graph

19237 commits

Author SHA1 Message Date
Jennifer Marandola
dcadd30f45 doc: Doc updates for C++ feature with updates from code review.
Updated note text based on code review.

Change-Id: I0f32c5821b37062d23ddbf2252ae8b3d4c8739b5
Signed-off-by: Jennifer Marandola <jennifer.marandola@windriver.com>
2016-02-27 10:03:00 +00:00
Jithu Joseph
4ad7f2a5a3 libc-hooks: newlib's heap may use entire unused RAM
Use linker symbol and board configs to determine the start
and extent of remaining RAM present in a board and use
it as newlib's heap.

Change-Id: I7128cf2857664331d83f212f27e8af7ad3bb8936
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-02-27 09:57:19 +00:00
Vinicius Costa Gomes
aab47a4e15 samples: w25q80bl: Add a README file
It should be made clear that this example is specific to the Quark SE
development board.

Change-Id: Ia3e0ec728891eb586bf1461ae9103ce34fd5e24f
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-27 09:55:06 +00:00
Vinicius Costa Gomes
80a3c8d4c3 samples: w25q80bl: Fix wrong check for GPIO pin as CS
The check was wrong and was checking twice for the QMSI version.

Change-Id: I7a73cc6523f141cae0e69b1a51791f6be87cb6de
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-27 09:55:06 +00:00
Daniel Leung
ea84869d97 doc: arduino_due: make more visible on how to obtain bossa tool
The Arduino Due requires a specific version of the bossa tool
to facilite the flashing process. The working one is on a branch
in the bossa github project. So make it clear that we need that
particular branch of bossa to work.

Change-Id: Ic7290dd4d7812f1cad4d87ad282dc90ea9b29c01
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-26 23:46:43 +00:00
L.S. Cook
da415702d2 doc: Minor edits needed on microkernel_fibers.rst
General grammar edits: removed an "is is", added clarification, and
removed Latin abbreviation as per style guide reqs.

Change-Id: Ie9365dea2cdf27c107675487d4bf392711f4acb2
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-26 21:18:08 +00:00
L.S. Cook
96a2d2e199 doc: Edit microkernel_memory_pools.rst for consistency in structure.
Much of this doc is comparable to memory_maps, so edits make the overall
language and structure consistent among files. Added heading syntax to
APIs, make imperative verbs on API notes, as discussed in code reviews and
on previous edits.

Change-Id: I8e14b44007acdf5422d75810dde78aef1a9c653a
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-26 21:15:08 +00:00
L.S. Cook
d873c5a91d doc: ReST syntax added to memory_maps.rst to enhance readability
Minor language corrections, example heading, bullet and bold added
to be consistent with the other microkernel reference docs.

Change-Id: I371cffcb60d09308c1b26701830dbbc0ddeb745d
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-26 21:15:08 +00:00
Ido Yariv
744f4fba3d QEMU: Fix the pin2irq translation function
ia32/soc.h is only used by QEMU, but QEMU's INTx routing does not follow
the "standard design consideration".
Instead, the pins are swizzled based on the PCI slot. They are then
routed to IRQs based on the PIIX PIRQ configuration.

For simplicity use hard-coded values for the PIIX PIRQ configuration,
though it may be desirable in the future to determine these dynamically.

Also change the number of PCI buses to 1 and remove irrelevant comments.

Change-Id: I1592009a43dd8a9c5a7c54788fba52f14687ba35
Signed-off-by: Ido Yariv <ido@wizery.com>
2016-02-26 17:05:30 +00:00
Andrew Boie
e444825ee3 irq: formalize external zephyr interrupt API
The app-facing interface for configuring interrupts was never
formally defined, instead it was defined separately for each arch
in their respective arch-specific header files. Occasionally these
would go out of sync.

Now there is a single irq.h header which defines this interface.
To avoid runtime overhead, these map to _arch_* implementations of
each that must be defined in headers pulled in by arch/cpu.h.

Change-Id: I69afbeff31fd07f981b5b291f3c427296b00a4ef
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-26 15:53:22 +00:00
Ravi kumar Veeramally
5913dc0cd4 cc2520: Fix resetting of CC2520_EXCFLAG0
setreg(CC2520_EXCFLAG0, 0) is in print_radio_status(), it should
be in print_exceptions_0().

Change-Id: I62bd366b850f0a1abef651cfa8de8939b6c30685
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-26 15:38:38 +00:00
Daniel Leung
1d88a8618d arc: remove defaults for IRQ priority levels
The deleted defaults cannot be overriden by defaults defined
in SoC's Kconfig file. The number of IRQ priority level was
always one, and this caused some code to be dropped within
the fast IRQ handling code. When the electrons aligned in
certain way, undesired effects were observed (e.g. exception,
faults, etc.) when regular IRQs were mixed with fast IRQs.

Moreover, ARC cores are high configurable on hardware level.
So let the SoC config define these values instead.

Change-Id: I2a338d2efc814c46b0f68ab100fc0f66ae0fb60c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-26 15:20:10 +00:00
Jukka Rissanen
e695d43fad cc2520: Turn off auto ACK
The auto ack does not seem to work properly. I am seeing that
the driver claims to have sent a packet but nothing is seen
in the air. Because of this the auto ACK cannot be turned on
right now as it would break connectivity.

Change-Id: I4e71e14a2058cc4f64740a8f4b390ba21a01cb23
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-26 14:44:08 +00:00
Arkadiusz Lichwa
7d03eec8d3 Bluetooth: BR/EDR: Add HCI SSP exchange IO Capa defines
Adds values to be validated during examining Secure Simple Pairing exchange IO
capabilities and bond types.

Change-Id: I3f25fa863b9a8a46c0a0e3c366e8b915c7db0bc7
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-26 13:41:31 +00:00
Arkadiusz Lichwa
847a1f6628 Bluetooth: BR/EDR: Add initial SSP Complete
Adds HCI protocol type for Secure Simple Pair Complete event and enables the
event in controller.
Then implements the initial SSP Complete event handler with catching
the status of SSP process.

Change-Id: Ic7cc5b4cab8a1b4120285815c24eeb6483d748df
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-26 08:43:31 +00:00
Arkadiusz Lichwa
2697d4fd5e Bluetooth: BR/EDR: Initial IO Capability reply to remote
Enables IO Capability Request event in controller.
Adds handler to react on controller's IO Capability Request event during
incoming pairing.
As a initial case respond to the request with negative reply setting
reason as 'pairing not allowed'.

Change-Id: I161c7ab7f1031a78cfa50444f41624232e5c5146
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-26 08:42:57 +00:00
Mariusz Skamra
a7ad7dcf16 Bluetooth: SMP: Clear keys on SMP Timeout and Pairing Failed
Those two indicate SMP failure, so while in keys distribution phase,
if we receive Pairing Failed, or there is SMP Timeout, the keys
distributed so far shall considered as invalid and cleared.
Another flag SMP_FLAG_KEYS_DISTRO is needed to save the old keys
if this failure appears before distribution of new keys.

Change-Id: I9a917740c02955aa149170b84ae547f5c8c4b7ad
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-26 06:54:40 +00:00
Arkadiusz Lichwa
dd8bf892f3 Bluetooth: BR/EDR: Handle IO Capability Response event
Enables IO Capability Response event in controller and adds remote IO Capability
and authentication fields to connection object.
Initializes them using IO exchange values delivered in SSP IO Capability
Response event data set representing remote as a part of incoming pairing
process.

Change-Id: Ia73a912f6fb633d1d1bb086ef3af9a280ac5a864
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-26 06:22:54 +00:00
Arkadiusz Lichwa
73e201cbce Bluetooth: BR/EDR: Enable SSP mode in controller
Turns on Secure Simple Pairing mode in controller. Since there's a prerequisite
the controller is 4.0+, turning the mode is unconditional.

Change-Id: Id4a10ccf8892a430b0daaa6750835516b17b7e8a
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-26 06:05:31 +00:00
L.S. Cook
13d064c58c doc: Edited synchronous_call.rst for typos, ReST syntax
API notes needed a bit of clarification, fixed typo of file name.

Change-Id: I57438165fb2fc3da796fcde19d58a46862ffbbd9
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-25 21:32:06 +00:00
Anas Nashif
f3f8eeed66 docs: arduino 101: remove zflash references
Change-Id: I0bb83de625328b1f3d8f27e0608a2e597f221989
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
6cc08622e3 docs: gerrit: descrease indentation and remove TOC
Change-Id: I27c9e5075b5cd5e57fb4e4ed2d1078cefb62dcd0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
ee55374d3c docs: fixed errors when building docs
Change-Id: If92be02af08ac8924a95fe1b1a2450ec1efab7da
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
c582d78cb2 docs: fix note indentation for arduino101 board
Change-Id: I1f7b448ed2fa272c4af2397ba926935ee43bb96f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
8bd1cfa5a0 docs: fixed crypto headline and bullet indentation
Change-Id: I65449b80e95430e303bbcc32baf161f95f5db512
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:58 +00:00
Anas Nashif
35c73ee943 docs: fix typo and table in collaboration guidelines
- fixed typo
- table was not aligned correctly, fixed.

Change-Id: I3a3522ceb1095c634fbd6cfaa594e6463080caeb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:57 +00:00
Anas Nashif
15c4f0c69e docs: gerrit: fix indentation and structure
Fixed indentation and align text. Also remove to many levels of bullets
and streamline text.

Change-Id: I734f96666277e39b5aafc99ace754d129ecdd0be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-25 21:28:57 +00:00
Benjamin Walsh
fd1aa8575b x86: move reboot via RST_CNT from galileo to generic x86
That implementation is not galileo-specific, but rather a generic way of
rebooting an x86 target. Needs SoC support.

Change-Id: I9c3374a8ab57a624d9d9b7090260c5b11fe4e773
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 16:52:27 +00:00
Benjamin Walsh
fcfb4b6bda kernel: add fiber_wakeup()
Like for the other context-specific APIs, also provide a
context-agnostic wrapper.

Change-Id: Icf0a62f4c06aec42f0febc298edbd8bdeec63749
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
7a613adc14 kernel: fix xxx_fiber_wakeup() if the timeout has expired
A call to xxx_fiber_wakeup() if the timeout had expired would put the
fiber on the fiber ready queue _again_, corrupting it, or could remove
the fiber from a nanokernel object wait queue, prematurely un-pending
it.

We now verify the fiber is indeed still on the timeout queue and also
not on a wait queue, meaning the fiber is indeed sleeping.

Change-Id: Iba454d79ab50db01632b0591fb7b589221b5110b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
2aee77f8cf kernel: record when a fiber is removed from a wait queue
Until now, this was not needed since the checks for being on a wait
queue were only performed if a fiber was known to be on a timeout queue
as well. However, an upcoming fix for _fiber_wakeup() needs to verify if
a fiber is on a wait queue even if it is not timing out, because said
fix needs to check if the fiber is timing out as well.

Change-Id: If1694ceb551f2029d6a145963e81d3826956fd1d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Benjamin Walsh
b1903d7e48 kernel: have _nano_timeout_abort() return an error code
An upcoming fix for _fiber_wakeup() will need to know if the fiber was
dequeued from a timeout queue.

Change-Id: I09ca039098c09a997db73f4719261352f0af07c1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-25 11:06:09 -05:00
Tomasz Bursztyka
bf77d902ac cc2520: Rework reception logic
Setting the highest possible threshold is bogus. It will certainly work
well when packet are small, but it will be very easy to overflow RX FIFO
when these are big (which happens when a big packet is fragmented).

Instead:
- setting the threshold to the bare minimum (len + header)
- reading is made into a loop based on RX FIFO counter

Taking the opportunity to:
- Reset exceptions once printed out
- Print out "Transmitted!" instead of unbearable status

Change-Id: I8d77b88756d5c3fb42d4d0d38dd0296569db07ad
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:50 +01:00
Tomasz Bursztyka
bfa2ebb156 cc2520: Let's use the maximum SPI clock supported
CC2520 can handle up to 8Mhz SPI SCLK frequency, thus let's use it. It
will help to avoid timing issuse while transmitting and receiving (i.e.:
getting registers or buffers from CC2520 through SPI will be fast and
won't impede RX/TX events too much).

Change-Id: I3391993e25ffbe166028923b9afb777a8451a35e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:47 +01:00
Tomasz Bursztyka
988c6e9e08 cc2520: Remove useless gpio logic
cc2520 does not need to clear any gpio interruption as it does not deal
with the low level gpio hardware directly.

Change-Id: Ic568e817b23b879cdf7da791417a4a6e1f95d34a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:43 +01:00
Tomasz Bursztyka
6f95960c2c cc2520: Flushing RX FIFO is done through one SFLUSHRX instruction
Removing unnecessary legacy logic.

Change-Id: I658e126d90e7f6151b77089a10b98c9071b6abd2
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:40 +01:00
Tomasz Bursztyka
fd3adeaabe cc2520: 7th bit of the packet length should not be interpreted
There is no such thing as being out of sync.
1 - RX FIFO is always flushed before receiving anything.
2 - So whatever comes in, if it was rejected the hardware would not set
FIFOP high (we are on high threshold, see page 83).
3 - According to 802.15.4 specs, length cannot be bigger than 127, so
7th bit of the length should never be set. However, and for some reason,
it happens to be set (noise, memory glitch?). According to datasheet
page 75, masking this bit is useful then. The hardware does it for
itself when filtering, and that does not affect the buffer content, so
it's also up to the driver to mask it as well.

Change-Id: I30b878852076c0c9d3a92b490aaf37f826ab4541
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 14:02:35 +01:00
Tomasz Bursztyka
ee587244f4 net: ip: Enable Kconfig based debug options for the IP stack
It will be possible to enable/disable debug messages from IP stack from
make menuconfig, instead of modifying the relevant files to do so.

Change-Id: I065f10bcc2bc3579081b2fcdb1c47e12d148e2f1
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-25 11:03:55 +00:00
Arkadiusz Lichwa
0abd5dd7d5 Bluetooth: BR/EDR: Rename local variable
Changes the local netbuff name to be more generic and to be used later in code
initializing BR/EDR stack.

Change-Id: Iae177237c813a46cbd10720a7af3474632154678
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-25 10:37:55 +00:00
Luiz Augusto von Dentz
2f8a5967a8 net: Kconfig: Auto select mandatory features for Bluetooth
This makes sure NETWORKING_WITH_6LOWPAN and 6LOWPAN_COMPRESSION_IPHC are
selected properly and update IPSP sample to only include the minimal
config options so it can test if this is working properly.

Change-Id: I2565cbd4f79d91eaba348d43933aa893c6dc6ace
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-25 10:36:33 +00:00
Andre Guedes
536d6ec396 i2c: Remove default value from platform-specific options
This patch removes the default value from some platform/SoC specific
options which are declared in drivers/i2c/Kconfig because 1) most of
the time they are not valid values and 2) the correct values are
already set in the SoC Kconfig.

It also moves the interrupt priority definition from the driver's
Kconfig to the platform's Kconfig since it is a platform-specific
configuration.

Change-Id: If3c260b9a2fa095de47a99eb7fa5b947efefe9b1
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-24 14:34:24 -03:00
Andre Guedes
1eaaa6434b spi: Remove default value from platform-specific options
This patch removes the default value from some platform/SoC specific
options which are declared in drivers/spi/Kconfig because 1) most of
the time they are not valid values and 2) the correct values are
already set in the SoC Kconfig.

It also moves the interrupt priority definition from the driver's
Kconfig to the platform's Kconfig since it is a platform-specific
configuration.

Change-Id: Ic992749b3210ed8a2e454edece41ceca5edbaf2e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-24 14:26:23 -03:00
Andrew Boie
08ce5a5da7 sanitycheck: use Python 3
Python 2 isn't supported anymore and doesn't get fixes/updates.
For the long-term maintenance health of sanitycheck, convert to
use Python 3 interpreter, which mostly involved changes to how
strings are handled.

Change-Id: Ic42f5b2328001f04d876fd650986c4433968a76b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-24 17:10:39 +00:00
Andrew Boie
411a97c5d0 sanitycheck: correctly treat linker warnings as errors
Change-Id: I2fc82fe83d91121d2228251d9fba8a61ba33b63e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-24 17:08:56 +00:00
L.S. Cook
bebd38c8d1 doc: Edit common_kernel_clocks.rst
Corrected typos and added headings to API section to
enhance readability.

Change-Id: I5a43edfdd6a8ac7735d8f00823058f6a2661439f
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-24 17:08:26 +00:00
Andre Guedes
55e93f203c gpio: Remove default value from platform-specific options
This patch removes the default value from some platform/SoC specific
options which are declared in drivers/gpio/Kconfig because 1) most of
the time they are not valid values and 2) the correct values are
already set in the SoC Kconfig.

It also moves the interrupt priority definition from the driver's
Kconfig to the platform's Kconfig since it is a platform-specific
configuration.

Change-Id: Id00f7907fa55025011dabce6e282a9623be23831
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-24 17:05:52 +00:00
L.S. Cook
cd26742b17 doc: Edit microkernel_tasks.rst for grammar and clarity
Corrected a few typos and misspellings. Corrected grammar to add clarity to the
section on task groups.  Added cleaner headings to APIs to enhance readability.

Change-Id: I6ff4d447775db67dc7008aa30bd2bbb4ab6c32de
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-24 17:02:19 +00:00
Jukka Rissanen
791e6f2708 net: contiki: Original copyright notice was missing
Original copyright notice was lost when the file was copied
from Contiki.

Change-Id: I5e008b92cb3898255a7940dc2c61320014222610
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-24 09:50:50 +02:00
Jukka Rissanen
5562a9a811 net: contiki: Fix the description of 6lowpan files
The file names and types were incorrectly described in comments
in net/ip/contiki/sicslowpan/ directory.

Change-Id: Id6aba238a08ec603a57f9a438dbf6fab202220f8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-24 09:48:44 +02:00
Dan Kalowsky
8d0129656c doc : getting_started : correct path
The path to the sample applications is a mis-match of previous and the
current values.  Correcting it to represent the new value.

Change-Id: I54ffe823335b95f1076b1346d149b359b4f2e7bd
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-23 23:10:57 +00:00