Commit graph

41120 commits

Author SHA1 Message Date
Allan Stephens
28c427d6c0 kernel: Invert polarity of memory pool's quad-block memory status field
Alters the use of the field so that a 1 bit indicates that the
associated block is available (i.e. can be allocated from the pool),
and a 0 bit indicates the block is unavailable (i.e. it is already
allocated or does not exist).

The revised definition of this field is more intuitive, since it follows
the conventional "1 = thing is present, 0 = this is not present" model.

Change-Id: Id133d1940aca0dd1c3c1672f989d0c0bb083ebc5
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:38 +00:00
Allan Stephens
8b925dc5de kernel: Optimize memory pool initialization routine
No longer initializes the quad-block descriptors for block sets,
except for the one containing the largest size blocks. The descriptors
for the other block sets don't need initialization since sysgen already
ensures the block pointer field is NULL, and the block status field can
be anything (since it is ignored if the pointer is NULL).

Change-Id: I72cdf772329ef3e6d1babd9da11706d11611e61a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:38 +00:00
Allan Stephens
6f3f29a0f3 kernel: Enhance memory pool defragmentation routine
Adds missing check to prevent defragmentation algorithm from
going past the end of a block set's array of quad-blocks.
Optimizes quad-block deletion algorithm so that it simply moves
the final array entry into the slot for the deleted entry,
rather than shifting all of the entries in between them.

Also enhances comments to make it easier to understand
what is going on.

Change-Id: Ic281c6f3c6dd5df9ec532a302b4103f3d929665b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 23:04:38 +00:00
Javier B Perez
d3d1034172 MAINTAINER: move known issues component and clean blank line
Moved Known issues component to in alphabetical order.

Change-Id: Ia9e495fd35056490f9cb0355bf3418dc46804b68
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-07-08 21:21:37 +00:00
Andrew Boie
251317c1bf nios2f-zephyr: commit additional source files
These are necessary to edit the CPU design in QSYS.
These originate from the F core archive supplied by Altera.

Change-Id: Ic03bd8738ae58dc154b5eaef91154fadaa61c491
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 21:20:26 +00:00
Andrew Boie
76be6c89a7 nios2f-zephyr: update CPU build
This build has support for hardware break/watch points.

Change-Id: Icf8a0d4abc82640eedd8c43322ebecf0ef069974
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 21:20:22 +00:00
Juan Manuel Cruz
2db8e207bb doc: application build update.
Updates the application build steps needed to rebuild your system.
Adds team recommendations on the current friendly manner to build
an application.

Change-Id: I7aff1788dc15c7159a319c926f14bc621924ce67
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
JIRA: ZEP-180
2016-07-08 20:34:31 +00:00
Juan Manuel Cruz
655a2c89f8 tracing: test includes ipc console fiber if enabled
The test test_thread_monitor fails when a platform enables
the IPC console.
This commit fixes the test to count the IPC console fiber
if it is enabled in the project or the platform.

Change-Id: I9faf9d120b35d9211e558be8f5788885f30c3081
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-07-08 20:34:30 +00:00
Allan Stephens
c3218e486f doc: Remove reference to deprecated task IRQ object type
This line was missed when the task IRQ APIs were deprecated
by commit a83f895dd5.

Change-Id: I0135eebb2f7bd0991364fdaab8a0a1fd6981d50d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:32:42 +00:00
Allan Stephens
70e4a80360 doc: Purge inappropriate fundamentals info from Kernel Primer
Incorporates the brief discussion of device driver support into
the Device Drivers document, so that the driver material is all
in one place. (Also converts a few unprintable characters in the
latter document to spaces, since they appear to have been used
by accident.)

Removes the empty discussion of networking support, to avoid
duplicating stuff already covered in the Networking document.

Change-Id: Ia5b8a92ade72a0634ee142afb45928016442d7dd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:32:25 +00:00
Allan Stephens
a8b0301087 kernel: Standardize memory pool block set computation
Now use a standard routine for identifying which block set to use,
rather than duplicating the identification code in multiple places.

Change-Id: I2f6577879c23183f3f91e4418d1ea0b2f6eec184
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:35 +00:00
Allan Stephens
032041e644 kernel: Enhance memory pool block deallocation routine
Revises algorithm to call an existing routine to free an allocated
block, rather than duplicating the logic to do the freeing.

Also enhances comments to make it easier to understand what is
going on.

Change-Id: Ie7a83a8a2e978e8a685c27e07acb5b70aea37afa
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:35 +00:00
Allan Stephens
4b67b115d3 kernel: Enhance memory pool block deallocation routine
Revises algorithm for deallocating an existing block to make it
more compact (and efficient). Address calculation is simplified
and unnecessary error checking is removed (& replaced by asserts).

Also enhances routine name and comments to make it easier to
understand what is going on.

Change-Id: If1803ee09c8f4f73693c0cff9e433a7938f14398
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:35 +00:00
Allan Stephens
f2abf7425a kernel: Enhance memory pool defragmentation routine
Enhances comments to make it easier to understand what is going on.
(Doesn't change actual defragmentation algorithm.)

Change-Id: I294f55b8f233d88c01ce30ba9ccff88000dc7936
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:34 +00:00
Allan Stephens
5a8c054544 kernel: Enhance memory pool block allocation routine
Enhances routine name and comments to make it easier to understand
what is going on. (Doesn't change actual allocation algorithm.)

Change-Id: I7d982ed8eeda3a2edd4602c5a10003aa8532457d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:34 +00:00
Allan Stephens
18f4557513 kernel: Enhance memory pool block allocation routine
Revises algorithm for allocating an existing free block to make it
more compact (and efficient) by using the same logic to handle the
allocation of any block within a quad-block.

Also enhances routine name and comments to make it easier to
understand what is going on.

Change-Id: I55ca513e6f85df2b548502262e4dbe6bb272596b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:33 +00:00
Allan Stephens
ea5a523c43 kernel: Enhance memory pool block allocation routine
Converts check for a request for an impossibly large block
from a run-time check to an assertion. (The run-time check logic
was faulty anyway, since an excessive request would result
in a negative value for "offset", which would then get used
as an array index!)

Also enhances comments to make it easier to understand what is
going on.

Change-Id: I3faa86be177dcbc76912e23fabc2d24724fcba18
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:33 +00:00
Allan Stephens
e6112a0cb8 kernel: Enhance memory pool initialization routine
Makes a couple of minor optimizations to initialization algorithm:

- Now initializes block status array for largest size blocks once,
  rather than twice.
- Doesn't initialize "count" field of block size descriptors to zero,
  since sysgen ensures that this happens automatically.

Also enhances comments for initialization routine to make it easier
to understand what is going on.

Change-Id: I00d907c0f2a86f5b6ea8a63475b40074fe89357c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:33 +00:00
Allan Stephens
f31b9a377d sysgen: Enhance comments describing generation of memory pools
Change-Id: Ie4a52e110075854dfac2a9e2c32fc8ae8b9e287e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:32 +00:00
Allan Stephens
06dc3090d5 kernel: Eliminate unused memory pool structure field
Eliminates memory pool field associated with a capability that was
never implemented. (This field was initialized, but never subsequently
referenced.)

Change-Id: I58cf8c4bb846a66b4c8754654ffc3ff55abcff7f
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:31:32 +00:00
Andrew Boie
3275d8a24a doc: don't install 32-bit libraries
No longer necessary since the host tools compile natively now.

Change-Id: Ibe6f66fa79498678bddc25f69f799555d181ea7f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 20:31:03 +00:00
Andrew Boie
3316e4c6fc gen_offset_header: don't force 32-bit build
It's not clear why this was forced in the first place.

Change-Id: I95c5e21ac0861a7b224ac9715bc5691c97922fe4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 20:31:02 +00:00
Andrew Boie
9557f0306c gen_idt: don't force 32-bit build
We no longer assume pointer sizes are the same between host and
target, and use stdint defintions to size things.

Change-Id: Ie4dc41c60d62931fdb3d1764ade01c16a64d0b54
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 20:31:02 +00:00
Allan Stephens
8c9be1009b doc: Relocate and revise "Application Fundamentals" material
Relocates material that outlines the structure of a Zephyr application
so that it appears at the beginning of the "Application Development
Primer". (i.e. The primer now tells the reader the file structure of
an application, then explains how to create these files.)

Revises the description of the MDEF file to make it a bulleted item
(like the other file types are) and improve readability.

Change-Id: I9f003b8317257c927bea752da55cc434f957592c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 20:21:07 +00:00
Genaro Saucedo Tejada
9f48993d03 sys_log: removed unused macro at pci_config.c
Debug macro definition at this file was repetitive and has been
superseded by new system logging API. Furthermore it was not being
used on this .c file.
JIRA: ZEP-311

Change-Id: Id5828d1144fa03cc24f100ae94ecc596502c1131
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-08 19:41:50 +00:00
Genaro Saucedo Tejada
1c7e992e5d sys_log: replace old debug macros at clock control driver
Clock control drivers are now using new system log macros. also update
the Kconfig variable to be a level rather than a bool.
JIRA: ZEP-311

Change-Id: Ia64e79e4e083df580861f64c661f8dbaa8a3985d
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-08 19:41:26 +00:00
Allan Stephens
92860a17a5 doc: Relocate and revise "System Fundamentals" material
Relocates material that describes the most fundamental terms used
in Zephyr documentation so that it appears in the "Introducing Zephyr"
document. (i.e. Ensures that the terms are defined before they are
used in the "Getting Started Guide" that follows.)

Transforms the material into a definition list to make it easier
for readers to locate and understand the mateial. Revises the text
to give it a consistent look-and-feel.

Change-Id: I0187d99b1bdac37397a4c907d57bc1f24d7698e7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 19:39:10 +00:00
Allan Stephens
83bbc7c0e5 doc: Create "Introducing Zephyr" document
Relocates the introductory material for Zephyr into a new document,
so that it can be more easily located by users. (Previously this
info couldn't be accessed from the list of documents on the left hand
side of a web page; instead, you had to click on the "Documentation"
tab at the top of the page, which is non-intuitive.)

Change-Id: I1e1f78162a314b958789fcef57fc864336007f3c
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 19:39:10 +00:00
Evan Couzens
2b13ba21cf doc: Moved ARC EM Starter kit info to wiki.
Moved the DesignWare ARC EM Starter Kit information from
em_starterkit.rst to the Zephyr wiki.

Change-Id: I2d5343d7bf03c69f5c8365e955dbb86980b4c5d1
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-08 19:38:33 +00:00
viggo.jf.intel.com
fc4b79fa07 doc: Move Arduino Due board content to wiki.
Moved board content from arduino_due.rst to the Arduino
Due Zephyr wiki article.

Change-Id: I438d674b43836beb45a0690d86327b9526c9eddf
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-08 19:38:18 +00:00
Inaky Perez-Gonzalez
10627c9706 doc: add David Kinder as doc maintainer
Change-Id: Ia0fc180c37cd67e8c1ba63966cf322bc074e6345
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-08 18:24:08 +00:00
Andrew Boie
5b9378ab7e nanokernel: move dataCopy() and bssZero() to common code
Used by ARC, ARM, Nios II. x86 has alternate code done in assembly.

Linker scripts had some alarming comments about data/BSS overlap,
but the beginning of BSS is aligned so this can't happen even if
the end of data isn't.

The common code doesn't use fake pointer values for the number of
words in these sections, don't compute or export them.

Change-Id: I4291c2a6d0222d0a3e95c140deae7539ebab3cc3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-08 18:23:11 +00:00
Adrian Bradianu
b6fb004354 usb: cdc acm: Read all the received data
Change CDC example to read and echo all the received data
before waiting for a new read interrupt.

Change-Id: I21e1646fb20a2c4f7aea2b396b633a4e0ae429fc
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
2016-07-08 18:22:19 +00:00
Adrian Bradianu
273c87b33e usb: cdc acm: Change Bulk Out handler to read data per 32-bit words
Quark SE USB controller is always storing data in the FIFOs per
32-bit words. Change Bulk Out handler to read data per 32-bit words.

Change-Id: I871278a754895edc5c7a395797b6dab0904bcdf6
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
2016-07-08 18:22:19 +00:00
Adrian Bradianu
6840ee35a4 usb: dw: Protect FIFO writes
Protect FIFO writes against other USB register accesses.
According to "DesignWare Cores USB 1.1/2.0 Device Subsystem-AHB/VCI Databook":
"During FIFO access, the application must not access the UDC/Subsystem
registers or vendor registers (for ULPI mode). After starting to access a
FIFO, the application must complete the transaction before accessing the
register."

Change-Id: I2aed833acaa2970310b6fd48f41a95bee2182ec1
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
2016-07-08 18:22:18 +00:00
Genaro Saucedo Tejada
89e46d431a sys_log: replace old debug macros at i2c
Designware, Amtel and Quark SE i2c drivers are now using new system
log macros. also update the Kconfig variable to be a level rather than
a bool.
JIRA: ZEP-311

Change-Id: Iac009b20fb74deb8ce72098378651bbec3b2ef17
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-08 18:20:28 +00:00
Javier B Perez
22c68169fd samples: testcases.ini change tags separated with commas
Tags should be separated with spaces no with comma.

Change-Id: I5381200bcd0caf59f3601ec849d698966c734a28
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-07-08 18:20:08 +00:00
Allan Stephens
1eea6c42f7 doc: Re-order top-level documents to improve usability
Groups top-level documents so that related documents are adjacent.
Also re-orders things so that documents for newcomers appear before
documents on more advanced topics.

The rationale behind the resulting order is described below:

Getting Started Guide
- Enables a newcomer to access & try out Zephyr by running a sample
  application using QEMU.

Supported Boards
- Enables a newcomer to try out Zephyr by running a sample application
  using actual hardware.
- Also lets newcomers know which boards are currently supported.

Zephyr Kernel Primer
Device Drivers and Device Model
Subsystems
- Describes the various components of the Zephyr kernel.
- Lets a developer know what is available when they are *designing* code.

API Documentation
- Describes the various APIs of the Zephyr kernel.
- Lets a developer know what is available when they are *writing* code.

Application Development Primer
- Provides the info needed for a developer to create a new application
  using Zephyr.

Contributing Code
- Tells a developer how to contribute code back to the Zephyr project.
- Advanced topic.

Porting Guides
- Provides guidelines for porting Zephyr to a new architecture.
- Advanced topic.

Build System User Guide
- Covers writing Kconfig options, and also contains reference guide.
- Advanced topic.

Change-Id: I8ecb4953c788e843028d1e8778be1ef1aee6c175
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-08 18:06:13 +00:00
Kumar Gala
fc867fde11 RFC: fix to build issue with subdirs
Pushing this to see what fails as its a similar fix to the one Flavio
pushed.  Yet in local building with sanitytest not seeing any issues

Change-Id: If42c13b0c1827fe89fb332ac6c40a14a76553330
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-08 17:09:05 +00:00
Evan Couzens
2f380c2996 doc: Moved the X86 Emulation info to wiki.
Moved the QEMU x86 information from qemu_x86.rst
to the Zephyr wiki. Also corrected a typo in
qemu_cortex_m3.rst.

Change-Id: Ic7ac8a1ab59018f25466c9031ce465973d6bdd8f
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-08 16:48:23 +00:00
Evan Couzens
a980bc497d doc: Moved QEMU_Cortex_M3 info to wiki.
Moved the QEMU_Cortex_M3 information from qemu_cortex_m3.rst
to the Zephyr wiki.

Change-Id: I4899c562844f8fc90096aea45b14a80f40791239
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-08 16:48:23 +00:00
Evan Couzens
e80a6f9fd2 doc: Moved OLIMEXINO-STM32 info to the wiki.
Moved the OLIMEXINO-STM32 information from the
olimexino_stm32.rst file to the Zephyr wiki.

Change-Id: I97aa1b400bd65bbe53bb58e635a789cb325c3795
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-08 16:48:23 +00:00
Evan Couzens
853a93977a doc: Moved NRF52-PCA10040 info to wiki.
Moved the nRF52-PCA10040 information from nrf52_pca10040.rst
to the Zephyr wiki.

Change-Id: I0069b9e720a39b515c8ca612343e3f3410f4a77a
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-08 16:48:22 +00:00
Luiz Augusto von Dentz
46f48ffec8 Bluetooth: H5: Use delayed work API
This replaces the use of delayed fiber with delayed work which doesn't
require extra stacks.

Change-Id: I3db0c168baabea2503163e26020bf5e4971ce584
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-08 12:05:34 +00:00
Luiz Augusto von Dentz
1183e6b82a Bluetooth: L2CAP: Add timeout handling
This adds initial timeout handling as described in the spec:

BLUETOOTH SPECIFICATION Version 4.2 [Vol 3, Part A] page 126:

  'The value of this timer is implementation-dependent but the minimum
   initial value is 1 second and the maximum initial value is 60
   seconds. One RTX timer shall exist for each outstanding signaling
   request, including each Echo Request. The timer disappears on the
   final expiration, when the response is received, or the physical
   link is lost.'

Note: As for the actual interval used they are based on the values used
in Linux but in case of disconnect the minimum of 1 seconds was used
to follow the text above.

Change-Id: Ib98899c3ff07334955aee9c8fb53b1b89ba7bf31
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-08 12:05:33 +00:00
Luiz Augusto von Dentz
076ed6bc13 Bluetooth: ATT: Add timeout handling
Accourding to the spec request should have a timeout of 30 seconds:

BLUETOOTH SPECIFICATION Version 4.2 [Vol 3, Part F] page 480:

  'A transaction not completed within 30 seconds shall time out. Such a
   transaction shall be considered to have failed and the local higher
   layers shall be informed of this failure. No more attribute protocol
   requests, commands, indications or notifications shall be sent to the
   target device on this ATT Bearer.'

Change-Id: I5e5b9fb008d3019831c5f6cc3bd4c2b85dd6b90a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-07-08 12:05:33 +00:00
Evan Couzens
09aca84ab3 doc: Moved Minnowboard info to wiki.
Moved the Minnnowboard Max information from minnowboard.rst
to the Zephyr wiki.

Change-Id: I97c2090e3a76e2ab6a9ab1e5f338fb4c3ffb0715
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-07 23:46:28 +00:00
Evan Couzens
2e81b5dd04 doc: Move Galileo board info to wiki.
Moved the Galileo Gen1 and Gen1 info from galileo.rst
to the Zephyr wiki.

Change-Id: I2210ab98429efb55be5ef3e47096842dfdbce16e
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
Signed-off-by: viggo.jf.intel.com <evanx.couzens@intel.com>
2016-07-07 23:20:02 +00:00
Evan Couzens
dc0c97731e doc: Moved FRDM-K64F info to wiki.
Moved the FRDM-K64F information from frdm_k64f.rst
to the Zephyr wiki.

Change-Id: Ibf5431d21bb82af1b9eebc7b693b88d774247369
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-07 23:18:05 +00:00
viggo.jf.intel.com
655b96325b doc: Fix TOC issue in bluetooth.rst
Change-Id: I121c9918678c2222ea8dffa9bb3aa31020dabed3
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-07-07 14:40:00 -07:00