Commit graph

42249 commits

Author SHA1 Message Date
Benjamin Walsh
aa78793e40 microkernel: rename K_swapper to _k_server
Align with the newer terminology used for microkernel internal symbols.

Change-Id: I623b383f90d9e37a49429a79774c7f7a4953bd5f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
c1f9fd888d irq: make utility functions private
irq_handler_set, irq_priority_set and irq_disconnect have been made
private by prepending an underscore to their names:

	irq_handler_set -> irq_handler_set
	irq_priority_set -> irq_priority_set
	irq_disconnect -> irq_disconnect

The prototypes have been removed from header files when possible, and
extern statements used in C code where they were called.

_irq_priority_set() for ARM is still in the header file because
IRQ_CONFIG() relies on it.

Change-Id: I2ad585f8156ff80250f6d9eeca4a249a4477fd9d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
0304cbc36d util: move ARRAY_SIZE/CONTAINER_OF to non-ASM part of file
These macros have C language-isms and cannot be used from assembly code.

Change-Id: I07ffc27411300339e08ae7ef9c19249903be4774
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
a34afe9b61 events: remove checks for valid events in service handlers
Doing those checks went against the Zephyr philosophy of no error
checking unless absolutely necessary. Users should ensure themselves the
validity of their inputs to kernel APIs.

Change-Id: I21e5cd07ff9424ad61e81fd9d52ceef0c9584a8c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
751c765079 events: rename task_event_set_handler()
task_event_set_handler -> task_event_handler_set

Align with the "verb at the end" convention.

Change-Id: I8b72d41a20a7fdd4756f90765682e317289a241b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Benjamin Walsh
87564a4602 pipes/mailboxes: rename functions using mem blocks
task_pipe_put_async -> task_pipe_block_put

  task_mbox_put_async -> task_mbox_block_put

  task_mbox_data_get_async_block -> task_mbox_data_block_get
  task_mbox_data_get_async_block_wait -> task_mbox_data_block_get_wait
  task_mbox_data_get_async_block_wait_timeout ->
       task_mbox_data_block_get_wait_timeout

Previous names, focusing on 'async', were misleading, because:

- some of those APIs can be used synchronously as well
- other APIs can also do asynchronous transfer, and don't have 'async'
  in their names
- the key concept of these APIs is that they use memory pool blocks
  rather than raw data buffers.

Change-Id: I0c08a6cf950ab23bb4172ce25eb6f9886b037649
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:21 -05:00
Anas Nashif
a8259afed8 allow linking of external application libraries
This will allow building of external components and linking
them at the end of the build process to the main kernel.

add a Makefile.app to the project directory with the required
targets, for example

Makefile.app:

KBUILD_ZEPHYR_APP := /tmp/libapp.a

/tmp/libapp.a:
	@touch /tmp/libapp.a

Change-Id: If2ba6b3ee59023acc5f85c5701b65c4d096d5059
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Anas Nashif
c01a5c5c07 docs: install doxygen HTML output into output directory
This will move autogeneated html files to the final directory
which is copied by CI into the online documentation making the
raw doxygen html files accessible via <url>/api/

Change-Id: I79bc211377840358acfb94d4de839ce25d2830e0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Anas Nashif
8cdd210798 move qemu patch to script/patches
Change-Id: Ib1c85f476901db7164305236e88f157434ebfda1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Anas Nashif
7312837c5f mdef: allow mdef file to be at custom location
Right now mdef file of an app can only be hosted in the
application root or under the same tree. This patch
allows hosting the file at custom location outside the
application tree.

Change-Id: I5ffdacb00d29d754d0fdd826c8f190f5a7968905
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Anas Nashif
e7ace3f4a7 docs: do not show internal documentation
The text between @internal and @endinternal will only be
visible if INTERNAL_DOCS is set to YES.

Change-Id: Ic09669e59b819e6f3e7820f345cf1f17303c0e3c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:21 -05:00
Carol Lee
1aa7733298 Changes conf.py and fine tunes doxygen.config for index & auto-generated files.
Improves previous patch that enabled doxygen GUI for Reference.
Navigate to forto-collab/docs/ html/index.html to view. Not
linked to main docs in this patch. Index changes to show a
collapsed view as default.

Change-Id: I4d0c23699f645c5c20ca3ad50c988a5729afa24f
Signed-off-by: Carol Lee <carol.lee@windriver.com>
2016-02-05 20:15:21 -05:00
Allan Stephens
fa2e040198 doc: Enhance usability of top-level documentation page
Regroups documents into 3 sets::

1) Documents needed when first encountering Zephyr. (Basically what
   you need to decide if you're interested in Zephyr, what it can do
   for you, and how to get the code so you can experiment with it.)

2) Documents used when developing new Zephyr software.

3) Reference documents for Zephyr. (Having these on the main page
   instead of a sub-page make sense, since the API guide and
   configuration option guide will be consulted frequently by users.)

Change-Id: Ifee7ac83f041c24e1efbe3ba7379c21a2ba8b9bc
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:21 -05:00
Allan Stephens
503112dd0c doc: Add "About Zephyr" section
Provides high level background material for Zephyr, to help newcomers
easily determine its suitability for their needs.

Change-Id: I2f843ad627024f601f163eafc7d965ecf44da8f9
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:21 -05:00
Allan Stephens
0be860ad1a doc: Add information about atomic APIs
Describes atomic operations, including concepts, examples,
and APIs.

Change-Id: I701435508ae179623cf983590802040b35b0f286
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:21 -05:00
Andrew Boie
5bb06311a9 Kbuild: Don't warn on zero-length format strings
This warning isn't particularly useful and we intentionally do this
in our __assert.h macros.

Change-Id: I783398fd92dffe57e2e18d520db4e752c8c37a98
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:21 -05:00
Javier B Perez Hernandez
8750729989 doc: quick start: installing: New Zephyr SDK
Updated the SDK location in quick start documentation to the new Zephyr SDK hosted in 01.org.

Change-Id: I7a7616763441d93f10563b1a05268126990fd527
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
2016-02-05 20:15:21 -05:00
Peter Mitsis
2c89a43244 doc: remove references to BSP
BSP terminology is obsolete; it has been supplanted by platforms and
platform configurations.

Change-Id: I105c7259e3eee6b0a0f67743d2b6b10ffb1db16f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:21 -05:00
Allan Stephens
10ba8f7e6e doc: Improve accessibility of microkernel and nanokernel info
Removes an unnecessary level of headings in the microkernel and
nanokernel sections of the Zephyr kernel documentation, providing
users with direct access to the major service areas of the
microkernel and nanokernel from the main kernel web page. Also
greatly reduces the introductory text for these 2 sections,
since users can now easily find out what the various subsections
provide by simply clicking on them.

Change-Id: Ibc5858daad49cfb6567dfad285b7a1d5a755d149
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:21 -05:00
Allan Stephens
432a737106 doc: Restore information about microkernel task IRQs
Re-incorporates task IRQ information into microkernel documentation.
Also eliminates an unnecessary hidden space character at the end of
every line.

Change-Id: Ib1328dfae7a53bcf8abead4a5ebf1cbaa5610826
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
3a91819e7b doc: Updates to nanokernel timer services
Describes nanokernel timer use, including concepts, examples,
and APIs.

Change-Id: Ibee277c62299e8cbe5c5093f097efd3596fbaf77
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
d9461bf072 doc: Updates to nanokernel signalling services
Adds introductory text to highlight the limited signalling choices
provided by the nanokernel. Updates the semaphore API table to
incorporate missing APIs.

Change-Id: I947de383178f8710f0ae238a03f197102dac2845
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
1d5ebda336 doc: Nanokernel stacks addition
Describes nanokernel stacks concepts, examples, and APIs.

Change-Id: I53aea9c4557953beaf5d0dd7b601446c7b8f3984
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
8fe4f41ce6 doc: Updates to nanokernel data passing services
Partitions services into a separate file for each service. Updates
API tables to incorporate missing APIs.

Change-Id: Ia08b52b4865967beda02851cfe4a7d5ca4e8f596
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
cc1b0f9af3 doc: Add information about fiber APIs
Added an API table to summarize available APIs. (Still need to
add examples of how to use to more significant ones.)

Change-Id: I371912ea77ad264ed0c96f129e8676ab866697db
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Yonattan Louise
ea06b8ba39 Add profile collector sample.
Add a project that shows how to collect the
data from the profiler.

Change-Id: Ie9cc88290de594720739b30d4e872fe51d353f6e
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Yonattan Louise
520542bef2 Add context switch profile point.
Add the context switch profile point for x86 and ARM arquitectures.

Change-Id: Ib7205059104ed47b96ba75b8cfefec3ff35f6813
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Yonattan Louise
efd8e246cc Add profiler method.
Add a standardized mechanism to add profiling points to the Kernel
with a single interface for the user to collect the profiling data.

Change-Id: I4fa34ac1b42f73a73ba1fd805e755ee2fd00dff7
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Yonattan Louise
8c85c15a2f Add event logger.
Add a log event tool with a single interface for the user to
add/collect the event log data.

Change-Id: Ia4b78836748c5d7e44ba1bdd50c28434e8a55d65
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:15:20 -05:00
Andrew Boie
ca90a0a366 misc: use consistent data type for ARRAY_SIZE
Some arches this is an unsigned int, some an unsigned long.
Standardize on unsigned long for all arches.

Change-Id: I1661ea2d895915c0be3eaabdb79d90435f3945b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:20 -05:00
Andrew Boie
91156d9c7a arc: standardize ffs function names to match other arches
Change-Id: I4f384960f4c6698ef98ecf3941c30f849832135e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:20 -05:00
Anas Nashif
45a387fc46 ioapic: cleanup code comments and doxygenize the file description
Use doxygen format for file documentation and move 
parameters to be part of the function comments.

Change-Id: I01c0614e7cd3ef4c689d2aec3aa3e52e0d21ffcd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:20 -05:00
Anas Nashif
8cc32b8209 Enable IO-APIC debgging
Change-Id: I4f6c4400ec24d424b481703711d70bb5aff4f7e3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:20 -05:00
Anas Nashif
6971d547cd Rename nano_node_tick_get_32 in documentation
leftovers from the renaming activities:

 nano_node_tick_get_32 -> nano_tick_get_32

Change-Id: Ic9f0870ddda159311005c2ed16e0a378ab9a6a62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:20 -05:00
Andrew Boie
2041d5b227 remove old sanity check mechanism
Change-Id: I754c4db10844d346277e8f47ba99db3c0cd6bc79
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
1b1e3af498 doc: Add information about kernel context services
Describes available services. Adds an example. Provides API table.

Change-Id: I99a2541fedc3bde3e23157a5fd85fb49dce1bf4d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Anas Nashif
0a7ff3b461 doxygen: move nanokernel fiber comments to header
Fix documentation to link to autogenerated API entries.

Change-Id: I0355435c189bff17c4468b1f300dcffcce73e51d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:20 -05:00
Andrew Boie
af7d3fb116 misc: remove old printk() stub
It was never being used due to the obj-$(CONFIG_PRINTK) in the
Makefile, and the new method using a static inline function in
the printk.h header performs better since there won't be
function call overhead.

Change-Id: I7536515432e274fde2099eb04d4c1fb0e9d380ef
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
f5de9524fd doc: Add information about kernel clocks
Describes clocks available for use. Adds examples of direct clock
use. Provides API tables.

Change-Id: Icca8e1c8e75eed29c91f1387aed682dfdefdadb1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
b36e887d47 doc: Add information about microkernel timers
Describes microkernel timer use only. Information about kernel
clocks and clock-related APIs will be documented elsewhere.

Change-Id: If868d9d93a0869e9535fbe0f807e72ccf816d15d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Allan Stephens
3ca9a7413d doc: Task updates
Adds information about offloading work from a task to a fiber.

Change-Id: I600c47351158f1fbf80cc5da971560b0f028b979
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-02-05 20:15:20 -05:00
Benjamin Walsh
4c63796838 ia32_pci: rename N_PIC_IRQS to NUM_STD_IRQS
That number is not representing the number of PIC IRQs, but rather the
number of "standard", fixed-number IRQs on a (legacy) x86 PC platform.

Change-Id: I1f0fff4c6d24f1d49764efef93f6e5ca3f181168
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
c963861d47 Remove PIC code, but not PIC disabling code
Removes the non-PIC disabling PIC code as the PIC is not a supported interrupt
controller.  The PIC disabling code remains as it is needed to prevent the
generation of spurious interrupts from the PIC (see CONFIG_SHUTOFF_PIC).

Change-Id: Ic59aa17ab96f34685a5d7b5f24cab391de47edca
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
dba5ac622c Remove PIT code
The PIT is an unsupported device.  On x86 based platforms, the LOAPIC_TIMER and
HPET_TIMER are the only supported timers.

Change-Id: Ic890838c811b7eb62008aef0c8a92786f1579217
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
dbaa4a45ed Use LOAPIC and IOAPIC Kconfig options
Removes the LOAPIC and IOAPIC macros from board.h as they are no longer
appropriate since Kconfig options exist to use in their stead.

Change-Id: I2ce41a7a08d1859682389f35cd5a97c0e2cd5bf7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
2db3db4ce2 Create IOAPIC and LOAPIC Kconfig options
Creating the IOAPIC and LOAPIC Kconfig options permits future commits to remove
those settings from the relevant board.h files.

Change-Id: Ie33c703f39c68d6e251d67b1c7cf75a0dd56a7e6
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
658bb54ed1 Use LOAPIC timer Kconfig options
Removes the LOAPIC timer macros from board.h as they are no longer required
since appropriate Kconfig options exist to use in their stead.

Change-Id: Id0b509eba7cce1839b400f95b989bf886322e1a8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
32fd4dc25c Create LOAPIC timer Kconfig options
Creating the LOAPIC timer Kconfig options permits future commits to remove
those settings from the relevant board.h files.

NOTE: No defconfig files have been modified as the LOAPIC_TIMER configuration
option is not enabled in any of them.

Change-Id: I7d97ed089cd4b734566b698183be95d3a166d71f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
be211ba91c Fix LOAPIC timer comments
Fixes a copy-paste error that inadvertently had the LOAPIC timer being
referred to as the PIT.

Change-Id: I4760d150cd6feb76b7d7384845898c6276bace83
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:15:20 -05:00
Peter Mitsis
b643468280 IOAPIC defaults to y when LOAPIC is enabled
For as long as the IOAPIC and LOAPIC code is coupled (as it currently is),
enabling LOAPIC must select IOAPIC to be enabled as well.  If future commits
separate the two, then the "select IOAPIC" can be dropped.

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