Commit graph

41120 commits

Author SHA1 Message Date
Luiz Augusto von Dentz
679a0b395f Bluetooth: GATT: Allow Characterist to be used with bt_gatt_indicate
Since BT_GATT_CHARACTERISTIC now expands to 2 attributes it may be
confusing to use bt_gatt_indicate as that expects the Value attribute to
be given which is no longer visible, so this enables the user to use
the Characteristic attribute in addition to its value.

Fixes #8231

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-06-11 14:41:19 -04:00
Luiz Augusto von Dentz
c3edc82fe7 Bluetooth: GATT: Allow Characterist to be used with bt_gatt_notify
Since BT_GATT_CHARACTERISTIC now expands to 2 attributes it may be
confusing to use bt_gatt_notify as that expects the Value attribute to
be given which is no longer visible, so this enables the user to use
the Characteristic attribute in addition to its value.

Fixes #8231

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-06-11 14:41:19 -04:00
Ulf Magnusson
31ab6bffb2 genrest: Generate documentation and links for choices
Until now, choices have kinda been a black box in the Kconfig reference,
and hid the dependencies of choice symbols (because choice symbols
depend directly on the choice rather than on whatever the choice
'depends on').

Generate separate information pages for choices and turn <choice>
dependencies into links.

One complication is that choices (usually) don't have names. Use the
index of each choice in the Kconfig files (first choice seen = choice 0,
then choice 1, etc.) instead to identify each choice.

Choice reference pages include the same information as symbol reference
pages (minus some things that don't apply for choices), and also list
the choice symbols contained in the choice.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:40:48 -04:00
Ulf Magnusson
cb95ea0b53 kconfiglib: Update to add list of choices
Update Kconfiglib to upstream revision 9fba375c65341 (+ local Zephyr
modifications) to get commit 94020beb311eb ("Make Kconfig._choices
public") in. It will be used to generate Kconfig reference pages for
choices.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:40:48 -04:00
Paul Sokolovsky
fd55935560 kernel: work_q: Document implications of default sys work_q priority
Default value of CONFIG_SYSTEM_WORKQUEUE_PRIORITY is -1, which means
it's run by the cooperative thread. Explicitly mention (in the Kconfig
help) that it means that any work handler submited to this default
queue won't be preempted by some other thread (which is generally
good, but worth documenting explicitly).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-06-11 14:40:07 -04:00
Ulf Magnusson
a760c5b029 doc: Makefile: Remove latex_paper_size (PAPER) option
This configuration variable was removed in Sphinx 1.6:
http://www.sphinx-doc.org/en/master/changes.html#id35. I suspect no one
might be using it. It could still be passed in SPHINXOPTS if needed.

Maybe the paper size should be set from Python instead:
http://www.sphinx-doc.org/en/master/usage/configuration.html

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
9af9b1fbdb doc: Makefile: Lowercase internal Make variables
Makes it easier to tell which variables can be set directly by the user.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
fa121da196 doc: Makefile: Remove the 'prep' target
Only used to add some prereqs to the 'json' target. Put the prereqs
directly on the 'json' target instead.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
953dfe75e5 doc: Makefile: Remove the 'doxy-code' target
Identical with the 'doxy' target. Move the 'doxy-code' recipe over to
'doxy' and remove 'doxy-code'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Ulf Magnusson
5917f9b605 doc: Makefile: Remove CONFIG_SHELL assignment
CONFIG_SHELL seems to be some autoconf thing
(https://www.gnu.org/software/autoconf/manual/autoconf.html). Maybe this
was meant to be SHELL, which Make looks at. Would probably be rare to
run a non-compatible shell here though.

CONFIG_SHELL isn't exported, so it isn't visible to the recursive make
invocations ($(MAKE) -C ...) either.

Remove it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-06-11 14:37:04 -04:00
Tomasz Bursztyka
97699537f3 net/arp: Clear cache per-iface when relevant
When disabling an ethernet interface, only its cache entries need to be
cleared up and not the whole cache. This is meaninful in case there is
2+ ethernet interface instances.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-11 14:35:29 -04:00
Tomasz Bursztyka
06fbcb1cd0 net/arp: Removing header filling duplicate
Header is filled in either in prepare_arp() or at the end of the
function.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-11 14:35:29 -04:00
Tomasz Bursztyka
9e0cfaf0a7 net/arp: There is no need to fill in the header in all frags
Only the first one requires it. Same issue as already fixed in ethernet
side.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-11 14:35:29 -04:00
Tomasz Bursztyka
c0109fd690 net/ethernet: There is no need to fill in the header in all frags
Only the first one requires it. Actually drivers know that already and
handle the frags list correctly.

In case ethernet has to run along with 15.4 on the same SoC, this will
optimize things quite a bit knowing that biggest ethernet frame will be
forcefully split in as many 128 bytes frags as necessary.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-06-11 14:35:29 -04:00
Maureen Helm
0f9a642697 release: Post-release patch level update
Moves the patch level back to 99 after the 1.12.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 12:34:01 -05:00
Maureen Helm
f58d9caba2 release: Update VERSION for 1.12.0 release
Removes the release candidate tag for the final 1.12.0 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 10:37:46 -05:00
Anas Nashif
3b1fb7f9a9 release: update footprint data
Update sanitycheck footprint data for comparison between releases.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-11 10:37:14 -05:00
Maureen Helm
51ae306b59 doc: release notes: Finalize 1.12 release notes and docs
Removes the "draft" tag from the 1.12 release notes and adds a 1.12 link
on the release notes page. Adds a link to the 1.12 docs on the home
page.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 10:36:43 -05:00
Maureen Helm
d3afa353a8 doc: release notes: Update 1.12 release notes with more GitHub issues
Adds a few more issues that were closed just prior to the 1.12 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 10:35:32 -05:00
Wayne Ren
a91f1e5e14 tests: modify the test conditions for emsk_em7d_v22
Because the address and size alignment of MPUv2,
limite the thread numbers for emsk_em7d_v22.

If not, build will faill because of DCCM overflow

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-11 09:05:15 -05:00
Wayne Ren
d5bc9d7bee arch: arc: adjust privileged stack size of arc to 384 bytes
Considering the case of call of printk, interrupt and
other cases, adjust the privileged stack size of arc to
384 bytes to avoid the the overflow of privileged stack.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-11 09:05:15 -05:00
Wayne Ren
97d0436486 arch: arc: use top of isr stack as exception stack and bug fixes
* re-use top of isr stack as exception stack
* bug fixes in irq offload's implementation
* improve kernel oops implementation

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-11 09:05:15 -05:00
Anas Nashif
1c4fe3edc0 arch/arc: Set the right priority for ADC/AON on quark_se
ARC has only 2 priorities, 0 or 1. So let's set the right priority for
ADC and AON.

Fixes #8302

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-11 08:52:24 -05:00
Maureen Helm
8e89206815 doc: release notes: Update 1.12 release notes with GitHub issues
Lists all the GitHub issues closed since the 1.11.0 release (Fri Mar 9
2017).

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-09 13:33:46 -05:00
Paras Jain
bf1e0198a7 lib: posix: fix out-of-bound write
Ensure that write is in buffer limits

Coverity-CID: 186491

Signed-off-by: Paras Jain <parasjain2000@gmail.com>
2018-06-09 08:26:18 -05:00
Maureen Helm
eb9df85f84 release: Move version to 1.12.0-rc3
Updates the VERSION file to 1.12.0-rc3

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-09 09:20:02 -04:00
Andy Gross
d6f2858a14 doc: relnotes: Add security vulnerability information
This patch adds notes for the security related changes going into
release 1.12.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-08 16:45:47 -05:00
Wayne Ren
c63298ea65 arch: arc: improve the reset code
This commit improves the reset of arc:
* make the processor in the correct status
* clear interrupt related regs

this may improve or fix #6515

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
fb3d2d3785 arch: arc: remove unused codes
base.user_options is already set in k_thread_
user_mode_enter

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
5dd552e66b arch: arc: STACK_CHECK_FAIL of STACK_CHECK not hang the system
Whether it should hang the system it not decided finally.
But remove it here to let some tests pass.

Fixes #8032

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
144a4390b5 tests: fix the bug of sentinel.conf
Even CONFIG_HW_STACK_PROTECTION is no here,
it is still yes as it will be re-selected by
CONFIG_TEST_HW_STACK_PROTECTION in tests/Kconfig.

So the correct setting here is:

CONFIG_TEST_HW_STACK_PROTECTION=n

This fixes #8092 (case1)

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
5b6f860539 arch: arc: use a separate stack for exception handling
* use a separate stack for exception handling, this
will gurantee the exception handling always work, not
affected by some speical cases, e.g., stack check exception
or mem. protection exception at the exception entry.

* this commit can fix the second case of #8092

* note: the thread switch is still possible in exception
handling, e.g, caused by thread_abort. But the switched out
thread cannot be recovered, as the thread context is not
setup.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Marti Bolivar
c6c856bc60 scripts: west: cherry-pick upstream 321ab2e17
Bring in the changes from upstream 321ab2e17 ("runner: core: fix
docstrings for ReST integration"). This is a minimal change necessary
to avoid documentation build issues. The rest of West has gained other
features that are too late to pull in to the RC period, so just bring
in what's needed to get to v1.12.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
f8251693bb conf.py: clean up exit if ZEPHYR_BASE is unset
Suggested by Ulf Magnusson.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
869e9cce01 doc: add initial west documentation
This covers its design and scope, and provides usage and some
implementation documentation on the existing flashing and debugging
commands.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
3a766aedf0 doc: conf.py: add sphinx.ext.autodoc extension
This will allow us to pull in Python API documentation from source
files.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
1c852ddf5c doc: conf.py: make sure west is importable from Python
We need this to be able to pull in its API documentation.

This will need modifications when multi-repo support is available, in
order to get the imports from the independent West repo, but for now
just use the copy in Zephyr.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
e802d8de35 doc: conf.py: remove unused import
Make a pep8 linter happier.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Leandro Pereira
7cfd5a4184 samples: net: hrpl_border_router: Fix NULL pointer dereference
Null-checking `pkt` before making a call to net_pkt_unref() suggests
that it might be NULL, but the pointer is dereferenced before it's
checked.  Perform the check at the beginning of the function and
dereference and drop its reference unconditionally afterwards.

Coverity-ID: 178789
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Leandro Pereira
b7ad50b473 samples: net: rpl_border_router: Fix out-of-bounds write
While printing debugging information, an out of bounds write could
happen while trying to write out the NUL byte in the url array.

Coverity-ID: 178790
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Leandro Pereira
e7a3d01dc5 samples: net: dumb_http_server: Handle recv() errors
The recv() call can return errors, so handle them before reading the
received byte.  Unrecoverable errors will just trigger the client
socket to be closed as usual.

Coverity-ID: 182778
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Leandro Pereira
33aa90539a tests: kernel: fifo_timeout: Do not potentially dereference NULL ptrs
The return value from k_fifo_get() might be NULL in some situations,
so protect against that.

Coverity-ID: 186190
Coverity-ID: 186058
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Paul Sokolovsky
a37e037264 toolchain: gcc: Add compiler barrier at the end of UNALIGNED_PUT()
compiler_barrier() is itself defined down in this file. Without
adding it, newer versions of GCC (7+) for ARM Cortex-M may mistakenly
coalesce multiple strb/strh/str (store byte/half-word/word)
instructions, which support unaligned access on some
sub-architectures (Cortex-M3 and higher, but not on Cortex-M0),
into strd (store double), which doesn't support unaligned access.

Fixes: #6307

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-06-08 13:01:07 -05:00
Marti Bolivar
e8d0e72adf doc: extensions: fix :app: behavior for zephyr-app-commands
The directive is not generating the right "mkdir" steps when used with
the :app: option. Fix it.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
c6c1501355 getting_started: building: fix inaccuracies
The building and running section is out of date, as Windows and macOS
commands are available now.

It also has some accuracies:

- the following section describes how to build hello_world, not how to
  make a new application based on it

- zephyr-env scripts do more than just set project-specific
  environment variables (they modify PATH on Unix, and may run
  arbitrary RC scripts on all platforms)

Fix these issues.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
64ab13264a getting_started: fixes and cleanups for installation_linux
Miscellaneous fixes and concision improvements.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
9ca4d84079 getting_started: fixes for intro section
Commas are needed before coordinating conjunctions joining independent
clauses. Two backticks are needed for teletype fonts.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
3fc206fa53 getting_started: fix UNIX-ism
Now that the instructions work on Windows, delete a reference to
~ (the user's home on a Unix system) in the text.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Andy Gross
8b9042c419 doc: security: Remove revision history
This patch removes the revision history from the security overview
document.  With this file being maintained in git, there is no need
for an additional in-document revision history table.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-07 18:05:01 -05:00
Andy Gross
2825f79a2c doc: security: Update security overview for recent features
This patch revises the security overview document to bring the
information pertaining to stack protection, thread separation,
and memory protection up to date with the current state of the
software releases.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-07 18:05:01 -05:00