Commit graph

19237 commits

Author SHA1 Message Date
Szymon Janc
bece111ec9 Bluetooth: Refactor tester application
This big patch refactors tester application and put it in par with
updated tester protocol.

Change-Id: Ib016fdd0aac58a32bcdc67774843cf65d619947d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:16:16 -05:00
Johan Hedberg
1712baf9cd Bluetooth: Initialize RX prio fiber before RX fiber
If bt_enable() is called from a preemptible context we need to make
sure the RX prio fiber is initialized by the time the HCI init runs
from the hci_rx_fiber function.

Change-Id: I91bb0c69d011944ee2a035b2a707618632a6b189
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:16:16 -05:00
Szymon Janc
b0794cc71e Bluetooth: Reduce number of memcpy in le_adv_report
There is no need for local copy of addres. Use pointer instead.

Change-Id: I4681af527813093547d2641ab2390cfa64383d6b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:16:16 -05:00
Szymon Janc
8efdadc9ab Bluetooth: Simplify check_pending_conn function
Connection address based on keys is already selected before call to
check_pending_conn. There is no need to select it again.

Change-Id: I2f1a329c19f5c08734c50dbf8d32bf5c28192a35
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:16:15 -05:00
Grzegorz Kolodziejczyk
1d322531cd Bluetooth: Add GAP Appearance characteristic to GATT db
This is a mandatory characteristic for GAP servie. It must be included
in GATT db.

Change-Id: I27c0c6d56f5303c3c5d1606d7656c51823f74989
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-02-05 20:16:15 -05:00
Mariusz Skamra
a679ffbfa8 Bluetooth: gatt: Fix non-passing service handles to the callback
Pass service handles to the callback during service discovery.

Change-Id: I616de5188faf76c84cc02ceb29a6f5aab631b89c
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-05 20:16:15 -05:00
Andrew Boie
009ddade3a .gitignore: add ctags data file
Change-Id: I4befc9393e46be11f6f16d88ffee03853b27ed38
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:16:15 -05:00
Anas Nashif
196bb2e17f libc: use isdigit from ctype.h
Do not use local _isdigit function, use public isdigit
instead.

Change-Id: Ifc2721fc2def429de4934c9855f08dae30326694
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Anas Nashif
f3f7eac765 Add MINIMAL_LIBC_EXTENDED to limit libc builds
This option adds optional libc functions that are not directly
used by the kernel but can be used for testing purposes.

This option is experimental.

Change-Id: Ia4dba718359c4f381047a5b52ebddb26d87ea75a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Anas Nashif
751d90da85 libc: add support for strncasecmp function
Add function for comparing two strings ignoring case.

Change-Id: I2fc78c0a0d0f53e23566ffacd8dca3b23e386c26
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Anas Nashif
3e02a4a107 libc: add atoi to minimal libc
Change-Id: I589fe6599dec1a93e9700005742b8b34b42dee64
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Anas Nashif
9d648ebc48 libc: add strcat to minimal libc
Change-Id: Ifae9da3abb60d061a4211e0fac20037f72ca90e2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Anas Nashif
bddd72602c libc: add strtol and strtoul to minimal libc
Change-Id: Ia6198cd34ff486d8eb9d978a59d885cae06b60d3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Anas Nashif
17f666bd89 libc: update ctype.h with isdigit, isspace, isalpha, isupper
Change-Id: Id8d865cde04d66367ddcf26995780767ad1b05f8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Dirk Brandewie
6bc71f5933 libc: added errno global variable
Change-Id: I42ae30fe5826828cc4696f155caeb186a31f913b
Signed-off-by: Fabien Chereau <fabien.chereau@intel.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:16:01 -05:00
steveballard123
b4c75df9dc doc: Edits to the supported platform documents.
Edit grammar, punctuation, consistency, linkage, and accuracy.

Change-Id: I46b2b0cdf18b89f5c669c398360decd6a4c68217
Signed-off-by: steveballard123 <stephen.r.ballard@intel.com>
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-05 20:15:59 -05:00
Peter Mitsis
e54276391b loapic_timer: rewrite tickless idle for loapic timer
Rewrites the LOAPIC timer tickless idle implementation to cover all edge cases.

Change-Id: Ide0a235f298dfc5c75a090a45d1bf8275d81e248
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:59 -05:00
Peter Mitsis
170b0c9251 loapic_timer: Rename global variables and routines
Renames the following global variables and routines to both improve
readability and comply with naming conventions:

Variables:
	counterLoadVal          -> cycles_per_tick
	clock_accumulated_count -> accumulated_cycle_count
	max_load_value          -> cycles_per_max_ticks
	idle_original_ticks     -> programmed_full_ticks
	idle_original_count     -> programmed_cycles

Routines:
	_loapicTimerStart()            -> timer_interrupt_unmask()
	_loapicTimerStop()             -> timer_interrupt_mask()
	_loapicTimerSetCount()         -> initial_count_register_set()
	_loapicTimerPeriodic()         -> periodic_mode_set()
	_loapicTimerOneShot()          -> one_shot_mode_set()
	_loapicTimerSetDivider()       -> divide_configuration_register_set()
	_loapicTimerGetRemaining()     -> current_count_register_get()
	_loapicTimerGetCount()         -> initial_count_register_get()
	_loapicTimerTicklessIdleInit() -> tickless_idle_init().

Change-Id: I2c1daa226d846e5be1aaad28d984d9f52bd02c00
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:59 -05:00
Peter Mitsis
00bb89357e loapic_timer: Remove tickless idle skew
Removes tickless idle skew calculation as it is not particularly useful.
The actual "skew" may vary wildly depending upon whether cache is involved
or not.

Change-Id: Ie5c966eba5cdc3cff2610d4c1f3bb673c83ec8b7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:59 -05:00
Peter Mitsis
da384d5610 timers: Fix _sys_idle_elapsed_ticks name in comments
Fixes two missed replacements of
    _SysIdleElapsedTicks -> _sys_idle_elapsed_ticks
in the timer drivers.

Both were previously missed due to typos.

Change-Id: If55c9624df6f3bd7188e249f74d3ee3de61a68e4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:59 -05:00
Anas Nashif
d510cab958 arm/x86: update defconfig
Use fragments instead of full defconfig

Change-Id: I558d3bfa709bbea874ac3362a659252f24aca834
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Anas Nashif
81cce4ee73 arm: defconfigs: Use fragments instead of a complete config
Change-Id: I5c51a42bfc84fe506b650c12a184e0282a8a7ff8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Anas Nashif
184003a924 x86: Use fragments instead of a complete config
This reduces the defconfig file to only those options needed
for the platform. We also introduce a kernel independent config
file (no micro/nano prefix) that be the default.
Sanity checks depends on the nano/micro file naming, so until it
is modified to support the new model, we keep the old files.

Change-Id: Ife1744d88f7bf229c1da04d5b86db26678af7f6c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Anas Nashif
83acfa3efb add kernel default config fragments
The files will have the needed fragments to move a .config
file to either a nano or micro kernel .config. This will let us
get rid of the micro_*_defconfig/nano_*_defconfig in the future
and once the sanitychecks are adapted leaving us with a single
fragment file per platform and thus making it easier to maintain.

Change-Id: If23b32cc259de498816ddc8be15cdd6e0014106a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Anas Nashif
0073eecba9 merge_config: look for *.config files in app root
Change-Id: Ie0fa2b8ea4560402ce7f07851a2de066924ec8be
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada
32e1ecb827 kbuild: add generic mergeconfig target, %.config
"scripts/kconfig/merge_config.sh && make oldconfig" works well
enough for merging local config fragments, but Kbuild currently has
the entry points only for "kvmconfig" and "tinyconfig".

This commit provides the generic target for mergeconfig, so we can
manage our own config fragments easily:
put "foo.config" in arch/$(SRCARCH)/configs/ or kernel/configs/,
and then run "make foo.config".

Now "make kvmconfig" is just a shorthand of "make kvm_guest.config".
Likewise, "make tinyconfig" is equivalent to
"make allnoconfig tiny.config".

Change-Id: I9ea4fd21ac46b42c2b6d87ee7eeeff67768bc375
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada
830c9fbc5c kbuild: mergeconfig: remove redundant $(objtree)
Kbuild always runs in $(objtree).  Actually, $(objtree) is always
set to "." by the top-level Makefile.

We can omit "-O $(objtree)" and "$(objtree)/".

Change-Id: I17eea62cc3b85957572f9f9eb5207caa1a91f881
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada
61c6277e86 kbuild: mergeconfig: fix "jobserver unavailable" warning
If "make kvmconfig" is run with "-j" option, a warning message,
"jobserver unavailable: using -j1.  Add `+' to parent make rule.",
is displayed.

  $ make -s defconfig
  *** Default configuration is based on 'x86_64_defconfig'
  #
  # configuration written to .config
  #
  $ make -j8 kvmconfig
  Using ./.config as base
  Merging ./arch/x86/configs/kvm_guest.config
    [ snip ]
  #
  # merged configuration written to ./.config (needs make)
  #
  make[2]: warning: jobserver unavailable: using -j1.  Add `+' to
  parent make rule.
  scripts/kconfig/conf --oldconfig Kconfig
    [ snip ]
  #
  # configuration written to .config
  #

Change-Id: Icda8d75af0bb50612cb020874649593c2ed0154f
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada
8f298d3fe1 merge_config.sh: rename MAKE to RUNMAKE
The variable "MAKE" is used to store the command name that has
invoked the Makefile.  (Actually, it is already set to "make"
if you run this script from a Makefile.)

In this script, however, it is used to determine if Make should be
run or not.  It is not what we usually expect.

Change-Id: I6891ecfc5003b4494d72878fa0da00a6ab452b21
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Sam Bobroff
224fa9455c merge_config.sh: exit on missing input files
Add a check for the existence of input files and exit (with failure)
if they are missing.

Without this additional check, missing files produce error messages
but still result in an output file being generated and a successful
exit code.

Change-Id: I8609e00ce99b491dcb1d41e64106a6829dc1fb41
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada
15e1669e48 kbuild: mergeconfig: move an error check to merge_config.sh
Currently, "make tinyconfig" does not work with "-j" option.

  $ make mrproper
  $ make -j8 tinyconfig
    HOSTCC  scripts/basic/fixdep
    HOSTCC  scripts/kconfig/conf.o
    SHIPPED scripts/kconfig/zconf.tab.c
    SHIPPED scripts/kconfig/zconf.lex.c
    SHIPPED scripts/kconfig/zconf.hash.c
    HOSTCC  scripts/kconfig/zconf.tab.o
    HOSTLD  scripts/kconfig/conf
  scripts/kconfig/conf --allnoconfig Kconfig
  #
  # configuration written to .config
  #
  scripts/kconfig/Makefile:122: *** You need an existing .config
  for this target.  Stop.
  make: *** [tinyconfig] Error 2

As shown above, "allnoconfig" has created the .config file before
mergeconfig is called, but Make still raises a false alarm because
of some sort of race condition.

We can fix this issue by moving the error check to the shell script.

Anyway, scripts/kconfig/merge_config.sh always requires an existing
.config as a base file.  It is reasonable to check its existence in
the shell script.

Change-Id: I4c6b26bf3b19c5d5b19ed43ee6b553f7a5944c21
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada
1540777fe4 kconfig: fix a misspelling in scripts/kconfig/merge_config.sh
Change-Id: I5fdbe712db8e15031c8c214c0d4378f8508d03da
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Olof Johansson
40cd34e5de merge_config.sh: Display usage if given too few arguments
Two or more arguments are always expected. Show usage and exit if
given less.

Change-Id: I1e503495f34eab3f181238a1aa877a4aee3b7e5e
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Anas Nashif
ebcdaf8ddd ia32_pci: HPET_TIMER depends on IOAPIC & LOAPIC
Change-Id: Id175712b88b434d9e3335f0736da8c2f04a95675
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
c124e6b3ec defconfig: Update all defconfigs before we move to fragments
In the future there will be no need to deal with such updates anymore.

Change-Id: Ib66b826f054f444ccb8f7e6f0e6a31e8d93f342f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Szymon Janc
dc1fd516a8 Fix TinyCrypto include path
TinyCrypto includes files are in 'include' subfolder.
Without this patch one is required to include eg
#include <include/aes.h>
instead of
#include <aes.h>

Change-Id: I4a761a107d819400ad39cc0e3fb918bed2df4ab4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-05 20:15:58 -05:00
Daniel Leung
8253b90cfc microkernel: add task pointer list
Due to similar padding issue as pipe, the list of task object
may not be used directly. As mentioned before, some compiler/linker
may pad the large struct. For example, compiling under gcc and
march=i686 pads the struct to 32-byte alignment (march=atom to
64-byte alignment). This causes issue with sizeof() and pointer
arithmetic because they have no idea about the padding.
When the stars align in a certain way, these task structs may be
corrupted. So add a task pointer list and use it for task
manipulation. The task list remains as it is beneficial to group
them together to take advantage of cache locality.

Change-Id: I0e86bfe05742040f4540d7854c1ac14e76162776
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
35ad85c1f8 doc: fix name of nanokernel semaphore group
should be nanokernel_semaphore instead of nanokernel_semaphores

Change-Id: Iada05a2367eaf2a754c3678893147b11c7cfade7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Andrei Emeltchenko
a1b25ec1e1 doc: Format Galileo running code block correctly
Format code blocks inside the main list, otherwise every block of code
breaks the list.

Change-Id: I6d48a0a3f8a3fedc832ebd9523eef52ea730b218
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:15:58 -05:00
Andrei Emeltchenko
8b757e860d doc: Remove unneeded steps in Galileo running
Removed steps are not needed since Galileo grub from SPI loads grub
from SD card directly and user gets confused with unneeded
instructions.

Change-Id: I65aa114b808e0ac8dc8e6c3eb62ba4a51e2dbf2a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:15:58 -05:00
Andrei Emeltchenko
e805c2bd52 doc: Fix splitting long line
When line is split the html output does not format list correctly.

Change-Id: I942529d134ec6afc65ae11400a2702d5d7051cbd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:15:58 -05:00
Andrei Emeltchenko
cea7764f14 doc: Make Galileo instructions more readable
Use low case directories for grub and kernel and align them inside
list.

Change-Id: If701dc3520f823dd184e70f410141a8a2349edd3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:15:58 -05:00
Andrei Emeltchenko
62777786d8 doc: Fix bug splitting long line and breaking list
The current list is broken with output like below:
...
:file:` microkernel.elf` to the $SDCARD/kernel folder
...

Change-Id: I977f8365a2da9d25e34f39fb31407a31dd062f61
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:15:58 -05:00
Andrei Emeltchenko
fe39066e25 ia32_pci: Refactor UART configuration for ia32_pci
This makes platform configuration more readable and cover cases when
Bluetooth is enabled and Console disabled.

Change-Id: I49aba6e47031de86f4bb5fbe988495a1db318666
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
fc3f76d751 arc: move source files to core/
Change-Id: Ic30b2579098a54ff7ab777d9d167ab58bf08ad93
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
bcbea5dbc7 doc: remove doxygen index and add groups instead
Instead of loading all indexed doxygen symbols in one page, we
use the defined groups to load the API documentation in the specific
sections and reduce the trash coming from doxygen to just what we
need.

Change-Id: I030e3de33e8cc26871f95cd45a50af0cae1bb942
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
c980d146c9 doxygen: cleanup layout of comments in microkernel/task.h
Change-Id: Ief83f19df73185b402861b3260afc99dd8f300e8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
4109b41df7 doxygen: define groups for microkernel objects
Also add conditionals to hide internal functions

Change-Id: I795e540ec082244f77f02cf8347b3e74916e4402
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
5acdfc76a0 doxygen: define groups for nanokernel objects
Change-Id: Ic6feb218fa5f8bad613ec8e3ba493c634462229c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00
Anas Nashif
1f99be5d1b doxygen: define variables for pre-processing
Some functions are behind ifdefs, so defining those to allow
indexing and displaying in the documentation.

Change-Id: Id48dcc59b0793e0788f44ebd7c172f0bf3253ed2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:58 -05:00