Commit graph

41120 commits

Author SHA1 Message Date
Nirmala Devi
8189330ca9 tests/object_footprint: fix path to Kconfig specification
This was failing to set the proper path to KBUILD_KCONFIG
and hence correcting it.

Signed-off-by: Nirmala Devi <nirmala.devix.m@intel.com>
2017-09-10 10:01:08 -04:00
David B. Kinder
91f25ee588 doc: exclude spi_legacy.h from API docs
spi.h and spi_legacy.h contain duplicate type and function names that
interfere with the doxygen-based API documentation.

fixes: #1425

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-10 09:18:01 -04:00
Andrew Boie
74cbbc9d37 x86: arm: don't force stacks into kernel memory
This was felt to be necessary at one point but actually isn't.

- When a thread is initialized to use a particular stack, calls will be
made to the MMU/MPU to restrict access to that stack to only that
thread. Once a stack is in use, it will not be generally readable even
if the buffer exists in application memory space.

- If a user thread wants to create a thread, we will need to have some
way to ensure that whatever stack buffer passed in is unused and
appropriate. Since unused stacks in application memory will be generally
accessible, we can just check that the calling thread to
k_thread_create() has access to the stack buffer passed in, it won't if
the stack is in use.

On ARM we had a linker definition for .stacks, but currently stacks are
just tagged with __noinit (which is fine).

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-08 12:26:05 -07:00
Andrew Boie
b8e850bea9 x86: segmentation.h: fix C++ build error
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-08 15:09:16 -04:00
Anas Nashif
c2de83c32f misc: remove MAINTAINERS file
Remove MAINTAINERS in favor of CODEOWNERS file which is supported by
github. Also remove scripts using this file and change checkpatch to
reference CODEOWNERS instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-08 15:08:18 -04:00
John Andersen
b81b26d8c7 net: Added Ipv4 missing debugging
For IPv6 check_ip_addr in subsys/net/ip/net_core.c makes a
NET_DBG call to report when a net_pkt is missing a destination
address. An analogous NET_DBG call has been added to the IPv4
destination address checking.

Signed-off-by: John Andersen <john.s.andersen@intel.com>
2017-09-08 14:32:35 +03:00
Tomasz Bursztyka
725be22771 net/mgmt/event: Commands must be > 0 so masking them works
If an event cmd is 0, NET_MGMT_GET_COMMAND() will return 0. That breaks
mgmt event core logic.

Jira: ZEP-2594

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-09-08 12:49:26 +03:00
Tomasz Bursztyka
cd35742a2b net/ethernet/arp: Let ethernet L2 managing pkt's reference while sending
prepare_arp() was unreferencing original pkt (called pending there) in
case of error.

net_prepare_arp() was always unreferencing pkt, though it could have
been already unreferenced by prepare_arp() as seen previously which is
an extra bogus unref in this case.

And in case it returned NULL, ethernet_send() would return NET_DROP
which in turn would make net_if's tx code to unref again the pkt.

This patch ensures pkt is unrefed only once and at the right place.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-09-08 10:59:11 +03:00
Jukka Rissanen
7e3d30880b net: shell: Fix TCP state printing
The TCP state string is only printed if CONFIG_NET_DEBUG_TCP is
defined. If that is not the case, then the "net conn" command
should not print the "State" column name as the state will not
be printed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-09-08 10:58:25 +03:00
Adithya Baglody
609ade891b x86: MMU: Updated MMU code to use the new macros.
Use of X86_MMU_GET_PTE to increase readability of the MMU code.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-09-07 17:13:06 -07:00
Adithya Baglody
65c2432791 x86: MMU: Miscellaneous macros related to MMU.
Helper macros to ease the usage of the MMU page table structures.
Added Macros to get Page table address and Page Table Entry
values.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-09-07 17:13:06 -07:00
Andrew Boie
54ffae7940 gen_mmu.py: Ignore 0-sized regions
Prevents overlapping region errors when enabling application memory
but there is nothing to put in application data.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:35:59 -07:00
Andrew Boie
8749c26555 kernel: fix K_THREAD_DEFINE wrt application memory
The generated struct k_thread could end up in the wrong memory space
if CONFIG_APPLICATION_MEMORY is enabled.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:35:36 -07:00
Andrew Boie
a34f4fb94f x86: add printk for protection faults
Most x86 exceptions that don't already have their own handlers
are fairly rare, but with the introduction of userspace
people will be seeing General Protection Faults much more
often. Report it as text so that users unfamiliar with x86
internals will know what is happening.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:35:27 -07:00
Andrew Boie
8eaff5d6d2 k_thread_abort(): assert if abort essential thread
Previously, this was only done if an essential thread self-exited,
and was a runtime check that generated a kernel panic.

Now if any thread has k_thread_abort() called on it, and that thread
is essential to the system operation, this check is made. It is now
an assertion.

_NANO_ERR_INVALID_TASK_EXIT checks and printouts removed since this
is now an assertion.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:35:16 -07:00
Andrew Boie
7d627c5971 k_thread_create(): allow K_FOREVER delay
It's now possible to instantiate a thread object, but delay its
execution indefinitely. This was already supported with K_THREAD_DEFINE.

A new API, k_thread_start(), now exists to start threads that are in
this state.

The intended use-case is to initialize a thread with K_USER, then grant
it various access permissions, and only then start it.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:35:04 -07:00
Andrew Boie
8e51f36bbf kernel: version: no need to store version in RAM
This is a build-time constant, just return it.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:34:50 -07:00
Andrew Boie
0a85eaad05 init: initialize dummy thread stack info
Garbage values here could wreak havoc on the initial switch to main
depending on how arch-specific _Swap() manages memory permissions when
switching threads.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:34:41 -07:00
Andrew Boie
8eeb09765b x86: cleanup _new_thread()
Years of iterative development had made this function more complicated
than it needed to be. Fixed some errors in the documentation as well.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:50 -07:00
Andrew Boie
d76f0a9644 tests: add object validation test case
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie
945af95f42 kernel: introduce object validation mechanism
All system calls made from userspace which involve pointers to kernel
objects (including device drivers) will need to have those pointers
validated; userspace should never be able to crash the kernel by passing
it garbage.

The actual validation with _k_object_validate() will be in the system
call receiver code, which doesn't exist yet.

- CONFIG_USERSPACE introduced. We are somewhat far away from having an
  end-to-end implementation, but at least need a Kconfig symbol to
  guard the incoming code with. Formal documentation doesn't exist yet
  either, but will appear later down the road once the implementation is
  mostly finalized.

- In the memory region for RAM, the data section has been moved last,
  past bss and noinit. This ensures that inserting generated tables
  with addresses of kernel objects does not change the addresses of
  those objects (which would make the table invalid)

- The DWARF debug information in the generated ELF binary is parsed to
  fetch the locations of all kernel objects and pass this to gperf to
  create a perfect hash table of their memory addresses.

- The generated gperf code doesn't know that we are exclusively working
  with memory addresses and uses memory inefficently. A post-processing
  script process_gperf.py adjusts the generated code before it is
  compiled to work with pointer values directly and not strings
  containing them.

- _k_object_init() calls inserted into the init functions for the set of
  kernel object types we are going to support so far

Issue: ZEP-2187
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie
3ef0b56c15 sanitycheck: fix rw_sections whitespace
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie
83995b6f21 shippable: use new build slave configuration
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie
81c53364c9 doc: add gperf to workstation setup packages
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie
d182d0c298 tests: gen_isr_table: don't set compiler opt
Instead, just set -O0 for the particular function which needs it.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie
6acd75b2b8 tests: gen_isr_table: set default BOARD properly
This test doesn't work on x86, which doesn't use gen_isr_tables.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Andrew Boie
a0fd10facf arm_irq_vector_table: don't change optimization
This is unnecessary.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-07 16:33:33 -07:00
Inaky Perez-Gonzalez
1abd064ce7 boot: move boot banner and delay before SYS_INIT_LEVEL_APPLICATION
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/1280, but
also many other failures, where output was garbled due to this. Other
similarly affected issues are missing first benchmark (context) in
latency benchmark and some net tests.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-09-07 18:29:05 -05:00
David B. Kinder
5bbaa12e59 doc: add 1.9.0 docs link to index page
In final preparation for the 1.9 release, add the doc link for the
tagged 1.9.0 documentation to the index page.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-07 18:27:51 -05:00
Anas Nashif
6597e86ed5 release: Zephyr 1.9.0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-07 18:18:42 -05:00
Anas Nashif
2cf6c79cef ci: remove all AWS operations
This will be done differently using CD and pipelines. Removing from
master before we branch 1.9.0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-07 18:18:27 -05:00
Anas Nashif
29a3ccecd5 release: Zephyr 1.9.0-rc4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-07 15:27:10 -05:00
Vinayak Kariappa Chettimada
29e9d14420 Bluetooth: controller: Add checks to detect radio ISR latency
Added missing asserts to catch high CPU use in radio ISR and
latencies, without which if radio packet pointer is not set
correctly, would cause spurious transmissions and invalid
behavior.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 14:36:30 -05:00
Vinayak Kariappa Chettimada
934d512223 Bluetooth: controller: Optimize the loop in nRF5 hal rand get()
Optimised the get() function in nRF5 hal rand implementation
to reduce number of probable branching operations.

This is needed to reduce nRF51 platform's CPU use in radio
ISR when using the fast encryption setup implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 14:36:30 -05:00
Vinayak Kariappa Chettimada
5164d4b189 Bluetooth: controller: Move RSSI sampling after pkt processing
Move the code to acquire the RSSI sample after critical
control path that processes PDUs.

This is needed to reduce the time taken to assign the next
packet ptr inside radio ISR.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 14:36:30 -05:00
Vinayak Kariappa Chettimada
2cc2be707a Bluetooth: controller: Inline the packet_rx_reserve_get() func
Simplify and inline the packet_rx_reserve_get() functions
used inside radio ISR.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 14:36:30 -05:00
Vinayak Kariappa Chettimada
ed3aa170f3 Bluetooth: controller: Remove redundant use of auto variable
Removed use of a redundant auto variable that was assigned
and referenced only once.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 14:36:30 -05:00
Vinayak Kariappa Chettimada
09368217d4 Bluetooth: controller: Fast enc setup with ccflags -Ofast
To meet CPU time usage restricts inside radio ISR on nRF51
SoCs, use ccflags -Ofast when using fast encryption setup
implementation in the controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 14:36:30 -05:00
Vinayak Kariappa Chettimada
9182de5f0b Bluetooth: controller: Disable DLE and PHY upd proc for nRF51
Default to n the support for Data Length Update and
PHY update procedures on nRF51 SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 14:36:30 -05:00
Steve Brown
dfebd40ce1 Bluetooth: Mesh: Avoid spurious "No matching AppKey" warning
Signed-off-by: Steve Brown <sbrown@cortland.com>
2017-09-07 14:26:45 -05:00
Shilpashree L C
4ef3378173 doc: update release notes for v1.9
Updated the Jira list with the latest jira entries
in the release notes. RTOS-2393

Signed-off-by: Shilpashree L C <shilpashree.lc@intel.com>
2017-09-07 12:29:37 -05:00
Anas Nashif
7015b7e5ea release: sanitycheck: update footprint data
Reset the baseline for the new release. This is used by the sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-07 12:29:23 -05:00
David B. Kinder
874ff05c73 doc: update release notes
remove WIP in heading, fix misspelling, fix python filename,
updated doc section

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-07 09:59:44 -05:00
Anas Nashif
0075488ccd doc: update 1.9.0 release notes
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-09-07 07:04:58 -05:00
Sebastian Bøe
76537ad1dd samples: Add bbc_microbit to hci_uart's whitelist
bbc_microbit has been observed to regress on this sample and is
therefore a good candidate for CI.

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-09-07 07:04:22 -05:00
Ruslan Mstoi
47f4af4310 Bluetooth: tester: Fix bt-stack-tester to unix domain socket
/tmp/bt-stack-tester is not a pipe, but unix domain socket.
This commit fixes respective "make run" errors:

qemu-system-arm: -serial pipe:/tmp/bt-stack-tester: Could
not open '/tmp/bt-stack-tester': No such device or address

qemu-system-arm: -serial pipe:/tmp/bt-stack-tester: could
not connect serial device to character backend
'pipe:/tmp/bt-stack-tester

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2017-09-07 05:53:01 -05:00
Ruslan Mstoi
0bd1635518 Bluetooth: doc: update GATT PICS file
This commit makes GATT PICS up-to-date with the Zephyr HCI
TPG test plan

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2017-09-07 05:52:11 -05:00
Vinayak Kariappa Chettimada
f43e4e0637 Bluetooth: controller: Fix assert on peer unknown rsp
Fixed an assert when peer responded with unknown rsp to
slave feature request when an existing another control
procedure was in progress.

This assert happened with a BT v4.0 peer implementation that
was performing a channel map update and local controller
initiated a slave feature request, receiving an unknown
response.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-07 05:51:46 -05:00
Leandro Pereira
fa5f231e4d tests: lib: json: Enable test case
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-09-07 05:49:17 -05:00
Leandro Pereira
7de019a256 lib: json: Silence warning about unused parameter
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-09-07 05:49:17 -05:00