Commit graph

41120 commits

Author SHA1 Message Date
Benjamin Walsh
ab6e153a21 nanokernel: add handling of nano timeouts on tick
Add the necessary call to dequeue the nano timeouts when a tick occurs
in the nanokernel.

Change-Id: I26fdfc4084d7564e232d8240eab8915076deaa31
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
cae5d05342 nano_sys_clock: abstract handling timers expiry
The nanokernel timers and timeouts won't be dependent on each other, so
the expiry handling code needs to be able to only contain the necessary
code depending on what is enabled in the kernel.

Change-Id: Ibb7c31e926a56ebd3e22b8eac6db05faa1c8ddd3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
87179c2e36 nanokernel: add NANO_TIMERS option
The nanokernel timers will be available in the microkernel, but can be
disabled if not needed. A kconfig option is needed for that: the option
is enabled by default, and only available in the nanokernel for now. It
will be made available in the microkernel in the future.

Change-Id: I3910affde7bd2e7b25ab0a3c655255a9be01c9b8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
265110d06b nanokernel.h: make nano timers APIs available to microkernels
The nanokernel timers are now available to microkernels, alongside
nanokernel object timeouts.

Change-Id: Ia2f0b93e8f848fd02b7260e35c0322d6501c8280
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
ae7af89c44 kernel: move TICKS_NONE/UNLIMITED from micro to nano
The nanokernel needs access to these values since the nanokernel objects
API will provide a way of waiting with timeouts.

Change-Id: I2b39fccc1c2a2b5ba937aff774ab2ebc649e643b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
72a7b520bb nano_lifo add timeouts support
Add the _timeout() variants to the _get_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _get() routines: a valid pointer on success, NULL on failure.

Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to
data arriving on the LIFO.

Change-Id: Iad8fa00b3fa0656fee9a67b2dd8b316e1e8aac74
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
eb2e4aa913 nano_fifo add timeouts support
Add the _timeout() variants to the _get_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _get() routines: a valid pointer on success, NULL on failure.

Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to
data arriving on the FIFO.

Change-Id: I6650d0de8494c15698d670442da1e9c8d8c89910
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
3f671dc68c nano_sema: add timeouts support
Add the _timeout() variants to the _take_wait() routines. Those allow
waiting with a timeout. The return values are the same as for the
regular _take() routines: 1 for success, 0 for failure.

Note that the task_ variant is still polling, and the task is not put on
a timeout queue, instead polling for the ticker change in addition to a
semaphore state change.

Change-Id: Idef357f99a5ca30e20665a25abc54d253a848a52
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
d131bae676 nano_fiber: add fiber delayed start/cancel and sleep
This new API allows starting a fiber with a delay. It returns a handle
to allow cancelling it before the fiber starts, via the cancel API.

It also adds an API allowing a fiber to sleep for a given amount of
ticks.

NOTE: CONFIG_NANO_TIMEOUTS must be enabled.

Change-Id: I608dc47b5f08321cfd0c1dd9bb18d1d77eab87e3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
2672025969 nanokernel: add and initialize timeout fields in ccs/s_NANO
s_NANO contains the timeout queue, and each ccs needs a struct
_nano_timeout object that gets linked in the nanokernel timeout queue.

Change-Id: Iad027eaaebcffe190e95f0b9d068f047062559c2
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
bb660ae965 nanokernel: add timeout queue interface
The timeout queue interface will allow having fiber interacting with the
nanokernel objects wait with a timeout. It can be completely excluded
from the kernel if not needed, via the CONFIG_NANO_TIMEOUTS option.

Most of the timeout queue interface is contained within timeout_q.h.
However, this file should never be included directly: rather, the
wait_q.h file is to be included instead, which itself provides NOOP
abstractions for some timeout functions when timeouts are not enabled in
the kernel.

Change-Id: Ifeb1b934e0c71d00c59ebc88a54ab26e49686807
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
ca51a72133 dlist: enhance library and make all functions inline
The old doubly-linked list implementation had only support for very
basic operations, i.e. add at head and remove.

The new implementation is highly enhanced, allowing these operations:

- initialize list
- check if a node is the list's head
- check if a node is the list's tail
- check if the list is empty
- get a reference to the head item in the list
- get a reference to the next item in the list
- add node to tail of list
- add node to head of list
- insert node after a node
- insert node before a node
- insert node at position based on condition
- remove a specific node from a list
- get the first node in a list

The implementation is completely inline, since the operations are rather
simple and do not warrant a function call.

Change-Id: Id85c04e67f6a88b005390172f1276daa12bcf8ce
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
62333429af util: add CONTAINER_OF()
Obtain the pointer to the encompassing object from the location of a
field in the object.

Change-Id: If8f9ffa4998c4c19b4cd17293610fff677fa0158
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
f9d34ff899 nanokernel: rename struct s_CCS to struct ccs
Follow coding conventions.

Change-Id: Ie398d66e6255b76b4546aa9c827997b5dfb0743c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
6b8589612f sys_clock: rename nanokernel's _do_sys_clock_tick_announce
Rename nanokernel's _do_sys_clock_tick_announce() to
_nano_sys_clock_tick_announce() so that it can be called from the
microkernel tick handling code without name ambiguity.

Change-Id: I2ec9dd92ceda51f00be1dd95bc3239d6b2e82943
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:21 -05:00
Benjamin Walsh
3284865323 arm: fix __assert.h inclusion in asm files
The #include <__assert.h> in nvic.h must be guarded by __ASMLANGUAGE
since nvic.h is usable by asm code, and __assert.h is C-only.

Change-Id: I16d72e4579705dbd0bfb55a787525c5938fd1f22
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
5e29f52883 sanity: Enable out-of-tree sanity check
Enables sanity to run out-of-sanity checks on a set of sample projects.

Change-Id: I58ae894b326a6eb15d6d56bc8e95738d21e17245
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
d902e9e514 sanity: Key off platform instead of BSP
Deprecates (and hides) the -B option in favor of using the -P option.
The -B option is used to specify the BSP, whereas the -P option specifies
the platform.

Change-Id: Ie1d3cd6383f08a84e5d994221b253153152a0658
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
53d81ebeef sanity: Remove the -s option from sanity_chk
The -s option to sanity_chk became obsolete with the switchover to Kbuild.

Change-Id: I6ab68692aea39e4289520613b53a46320044fcfb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
02432ca5e7 sanity: Use KBUILD_DEFCONFIG to specify target info
The sanity scripts no longer use the deprecated method specifying the BSP (and
the optional BSP_VARIANT).  Instead, they now use KBUILD_DEFCONFIG to identify
the target platform.

Change-Id: I583f876afd006e66fc314b8913cd766ba9d2b764
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
5d8c23a254 sanity: Update sanity scripts to use data files
Completes the separation of data from the sanity scripts.

Change-Id: Icc7a4922d5f108ca54d2c2f08b192259b07b3a0e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
a62a41c86a sanity: Add data files for use by sanity checks
These data files will eventually replace the project list tables that are
currently defined in the various sanity checks.

Change-Id: I1b9aef528ff2acc1ba96fa540986c50e01032f68
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
6a1287ba07 sanity: change strings stored in $PRJ_TYPE
Changes the set of strings stored in $PRJ_TYPE from
    {"microkernel", "nanokernel"} -> {"micro", "nano"}.

The $PRJ_TYPE variable will be used in later commits to create the
$KBUILD_DEFCONFIG string.

Change-Id: I9e2d866d4277ffaccff4f84a42ec2bc75c2ce57a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
820a62dc7d sanity: Move Bluetooth regression script
Moves the Bluetooth regression script 'bt_regression.sh' so that it resides
in the same directory as the other sanity scripts.  It also renames it to
'bt_regression_chk' so that its name is consistent with the other sanity
scripts.

Change-Id: Ia5a683e2c370c91a90edc648634ce56e484dcc20
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
99c55ba2fe sanity: Remove common-klibs_chk
KLIB_DIR builds are a relic from the previous build system.

Change-Id: I382db45f0a21786e1b7c50c9a881c82feb2c7481
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
54b4d3a24c fixed block formatting
Change-Id: I34fcab68ac0b7346e8a79c62a2b041e31a88e308
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
85fb2e1445 remove merge conflict
Change-Id: Iff634d72838a3975d62b6977b9e7fe5d32a2d6de

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
df575997c4 Tiny Mountain -> Zephyr renames
Change-Id: I323c3c2bc06c8fc2b6200186dde6853c61b094a8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
99f150682e remove extra 'Table of Contents'
sphinx was complaining about this.

Change-Id: Id97170cf28145dfcce9b650aff946dc0117c34cf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
79dd79dc4d Gerrit: patch -> change
In gerrit documentation, use 'Change' instead of 'Patch'.
Use terminology similar to the gerrit help.

Change-Id: Ib521d5d8742e274510079e88e270f81f3f3e7a62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
61d5c0ff2b remove extra space from quick start
Change-Id: Ib6a0edc02aa4cfa34fe4413e99c72e06c5b700dc

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
5a7de14ffd Fix the index page and headers
- Put license at the bottom
- Add a title
- Change disclaimer from a heading to a rubric

Change-Id: I19b73e3a0408fd95efb514e75ea4ee028bb8f50c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
75472567b4 Set version of documentation to 0.1
Change-Id: I667fd8a1afcede1b87e09c5f540ed7f40432db1f

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
dc36a229f3 Use Zephyr instead of Tiny Mountain
Change-Id: I9a7ef2ab121103b5738f98cf5d7c0c373cc97060
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
aaa4e59db9 make quick start guide complete
Change-Id: Ie23702f5351e3c8ebd972f5e5fc6a2bf54fd34ea
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
464e04da17 Rename to Quick Start
Change-Id: Ife49b594458506c876750d5df2485f5e4f684f08

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
60bc48a06e move doxygen documentation to collab guide
Change-Id: I7522fcb2dddd30d63faf0878c55380267ba6792f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
210e22b4fb do not include substitutions
Change-Id: I4aaaec0addb987af709ca865c681beb79444ca55

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
fd3acb73aa restructure installation guide
Change-Id: I4d1b50b7826514802db926c0911a63fc08e9f761
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
031e68f1a5 Use Kernel Objects in the title
Change-Id: I5fc164bd50879961fbfab5aeadfa43abab21e0ae

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
9485729b3a Rename *.s files to *.S
Change-Id: I706a06e287f9e8e52c1cee4863c36673b21762f7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
b33e1eccf1 x86: Remove arch/x86/bsp directory
After moving the driver code out of the bsp directory all the code
that remains is common to all x86 platforms move the code and
assocoated config variables to arch/x86.

Change-Id: I76617070bb165fd157f0c3a127f1b9829b86c283
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
02ef939831 x86/bsp: move timestamp "random" driver to drivers/random
Change-Id: I7a7e7627f1ef60c652c15ad482a4f84f00d79c44
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
11edf422b4 x86/bsp: move local apic timer driver to drivers/timer
Change-Id: I74f7297d21f3acf4a457ca335162602b35f4f6c1
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
73d74a5abb x86/bsp: move hpet driver to drivers/timer
Change-Id: I63c361a586d2fd8c03674febd58bc1dfd2658fdc
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
09d2770377 x86/bsp: move io apic driver to drivers/interrupt_controller
Change-Id: I00f400e0405f526dd17cf22c703fab4a4968fce0
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
124a27f210 x86/bsp: move local apic driver to drivers/interrupt_controller
Change-Id: I69350493c3b94d754f89fb37eaebe50a8076384b
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
526e132eb1 x86/bsp: move PIC (i8259) driver to drivers/interrupt_controller
Change-Id: I383424667f291ad4985781a7e6566c01c76ba5e0
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:20 -05:00
Juan Manuel Cruz
308f1586d6 Kbuild: Assembly code extension.
This commit set back .S as the assembly code extension for Kbuild.

Change-Id: Ib0119876bd0bed6617bbfbad2ca6a44e172ab042
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:20 -05:00
Peter Mitsis
bc81896b2f Remove obsolete .gitignore entry
The samples/libc/ directory is no longer part of the source tree.

Change-Id: I8db55be5e4601611170833a55d31ac788fae51be
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:20 -05:00