Creates the Kernel Primer, removes overview modules that are no longer
needed and updates the master file to include the new part.
Change-Id: I6d7f53f019089d502e763ecc1789fb152c90c465
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
Used to direct the compiler to examine the number and correctness
of arguments based on codes in the format string.
Change-Id: I8e408b3fcd6897a14d30363425f14f81628b3d3f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Extending devices.h to contain values that include error code
values that a driver may need to share. These include things like:
okay, fail, invalid configuration, etc.
Change-Id: Ib3a5e3fdd93ec8115686cf02a75436af31ef6eff
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As no default platform configuration uses the PIC/PIT, the project
configuration file 'prj_console_pc8253.conf' is no longer required.
Change-Id: Ic91922e9431a2853bb5fdcdd3e31e39f3dce90c4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
As no default platform configuration uses the PIC/PIT, the project
configuration file 'prj_pc8253.conf' is no longer required.
Change-Id: I89fac2685d9fca0452e5ce9d9b035e102bd62d70
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Removes the following project configuration files:
- prj_console_float_pc8253.conf : PIT is no longer used
- prj_console_nofloat_*.conf : unsupported by Makefile
Change-Id: I72689fa56413947f3a552645c7b2ed5ad599ed71
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates the basic_minuteia platform configuration to use the HPET timer as both
the PIC and PIT will be removed in a future commit.
Change-Id: Ieefcf48175d6d2731acd6b39a5e73879902940b1
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Removes the HPET timer macros from board.h and uses the HPET timer Kconfig
options in their stead.
Change-Id: Ia0b3cd87716277ac25f12deb31d5c5934f355050
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Adds additional Kconfig options to the HPET timer for setting its base address,
IRQ, IRQ priority and condition for triggering an interrupt.
Change-Id: I80349c60237380129da9ef41ccf6850c6b874c3c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Initializes the HPET timer if it is configured into the system.
Change-Id: Ia9474e868101abe88e031266b956c6a559745d75
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Abstracts the initialization of the following devices:
LOAPIC, IOAPIC, and HPET TIMER
This allows for a more configurable ia32_pci platform.
Change-Id: I05d0d983c163be499dd967ffe0121290a4305c9e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Converts camel case routine names to lower-case with underscores to comply with
coding practices.
Change-Id: I9fac0d3858389039c00882a7d2e97fcd4e4c812b
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The new name corresponds to the platform (ia32_pci), whereas the old name
referred to the old platform/bsp name.
Change-Id: I1b6f3416db146af4fdbadf70d0ab153741c781d5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The new name corresponds to the platform (ia32), whereas the old name referred
to the old platform/bsp name.
Change-Id: Ia8fe5d2b35bceb7e04dd8ac9c41b9de7947ed1f9
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The Quick Start Guide is now comprised by Installing, Building and
Running the Zephyr Kernel Guides. The Installing Guide contains all the
procedures needed to install the required components and get access to
the code. The Building Guide contains the procedure to build the kernel
using a sample application. The Running Guide contains the procedures to
run an application using QEMU or the Galileo 2 board. Files and folders
were renamed. The toctree directives were updated to reflect the new
names.
Change-Id: I4398befd4a24b12a50970c21a5288afa5c533fc8
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
All driver Makefiles are adding the same cflags and they
have been done inconsistenly, make all drivers inherit
from the top level Makefile and remove unused includes.
Change-Id: Ie66d0ba7a418ac26f7eb709f50c887dc682e935c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There were some typos and some weird phrasing.
Change-Id: I7b183755058e5ffedca97d434c43f448aafd1926
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The name of the device is SYSTICK. The device name should be part of the
file name, like all other timer drivers we support. The name
'cortex_m_timer' said nothing about which device the driver is for, since
it's way too generic: it could be for any timer present on any Cortex-M
board.
Change-Id: I39b4f79c32516ec9aff82c55c0ca639fad1b52bb
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The Zephyr kernel must always be built as a monolithic image, not as
separate nanokernel and microkernel images.
Change-Id: I44fdd2349b32f409c84710f58bc4b3fe96fd79b7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This adds unit test for microkernel private memory maps.
The code piggybacks to the public memory map test (by
including the same source file), so any updates to
the test will be applied to both.
Note that the prj.mdef are different for both tests, since
the private memory maps test move the memory maps inside
source code. So, both mdef files will need to be updated at
the same time.
Change-Id: Ia7f65f55b61d9fb0d42ba58d63662e914d69194e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This enable defining memory maps in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_MEM_MAP(mem_map_name, ...). The memory maps created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
memory map APIs.
Define the memory map using:
DEFINE_MEM_MAP(mem_map1, blocks, block_size);
and "mem_map1" can be used, for example:
task_mem_map_alloc(mem_map1, ...);
or,
task_mem_map_free(mem_map1, ...);
etc.
To use the memory map defined in another source file, simply add:
extern const kmemory_map_t mem_map1;
to the desired C or header file.
Change-Id: I9c551b90f9d0a95f961fd8ec1c5278c2ea44312d
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The _k_mem_map_list was a static array generated by sysgen,
where it containing all pre-defined memory maps from MDEF file.
To support private memory map objects (aka, defining them within
source files), the list has to accommodate memory maps that
are not only processed through sysgen, but also those defined
within source files.
This is done by creating a new section in binary, and all memory
map pointers go into this section. By doing this, the list
can still be manipulated as an array.
Change-Id: I1f3414b72f685fef4b99850749178661f14d9345
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque memory map object id type is now a pointer to
the associated memory map structure, rather than an index
into the microkernel's array of memory map structures.
This change is a pre-requisite to support for private
memory map objects, which are defined in source code.
Change-Id: I82ecb59eeed00efa54f781f775710c92ff9c9fc9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds unit test for microkernel private pipes.
The code piggybacks to the public pipe test (by
including the same source file), so any updates to
the test will be applied to both.
Note that the prj.mdef are different for both tests, since
the private pipes test move the pipes inside source
code. So, both mdef files will need to be updated at
the same time.
Change-Id: I6fdb5eab7c3a1d6f4b72c26a3620cee0188b07a5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This enable defining pipes in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_PIPE(pipe_name, ...). The pipes created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
pipe APIs.
Define the pipe using:
DEFINE_PIPE(pipe1, size);
and "pipe1" can be used, for example:
task_pipe_put(pipe1, ...);
or,
task_pipe_get(pipe1, ...);
etc.
To use the pipe defined in another source file, simply add:
extern const kpipe_t pipe1;
to the desired C or header file.
Change-Id: Iae8e04706359bc18aae51acc75df3e3d26388882
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The _k_pipe_list was a static array generated by sysgen,
where it containing all pre-defined pipes from MDEF file.
To support private pipe objects (aka, defining pipes within
source files), the pipe list has to accommodate pipes that
are not only processed through sysgen, but also those defined
within source files.
This is done by creating a new section in binary, and all pipe
pointers go into this section. By doing this, the pipe list
can still be manipulated as an array. The reason behind
putting the pointers to pipe, instead of the pipe objects
themselves, is that some compiler/linker may pad the large pipe
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. So use pointers here to
prevent padding.
Change-Id: I6d3b75614c4d8760c037a5c26746410d4e4b17cb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque pipe object id type is now a pointer to
the associated pipe structure, rather than an index
into the microkernel's array of pipe structures.
This change is a pre-requisite to support for private
pipes, which are defined in source code.
This also moves the required struct into more visible
headers such that private pipes can be declared.
Renaming the struct is also being done to conform to
naming convention for private kernel objects.
Since a couple structs have to be moved anyway, so
do the moving and renaming here too (contrary to what
have been done in the past, with separated patches).
Change-Id: Ibb6ec7f62745a81439ae3ea2616688b757439843
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds unit test for microkernel private tasks.
The code piggybacks to the public task test (by
including the same source file), so any updates to
the test will be applied to both.
Note that the prj.mdef are different for both tests, since
the private tasks test move the tasks inside source
code. So, both mdef files will need to be updated at
the same time.
Change-Id: I2890f70be460c0e45208ce03d6e7897d2662f6f0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This enable defining tasks in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_TASK(task_name). The tasks created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
task APIs.
Define the task using:
DEFINE_TASK(task1, priority, entry_func, stack_size, groups);
and "task1" can be used, for example:
task_start(task1);
or,
task_abort(task1);
etc.
To use the task defined in another source file, simply add:
extern const ktask_t task1;
to the desired C or header file.
Change-Id: Ib2f3572950ca74b359b7fde1ccd6cfd04783eefb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The _k_task_list was a static array generated by sysgen,
where it containing all pre-defined tasks from MDEF file.
To support private task objects (aka, defining tasks within
source files), the task list has to accommodate tasks that
are not only processed through sysgen, but also those defined
within source files.
This is done by creating a new section in binary, and all task
objects go into this section. By doing this, the task list
can still be manipulated as an array, which is required for
task group operation.
Change-Id: I799d6967567079498bc414e0cb809e8af856b53e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque task object id type is now a pointer to
the associated task structure, rather than an index
into the microkernel's array of task structures.
This change is a pre-requisite to support for private
task objects, which are defined in source code.
Change-Id: Idb53ea7f8a8a5b7e6477a74273930b08fc77dcfe
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque timer object id type is now a pointer to
the associated timer structure, rather than an index
into the microkernel's array of timer structures.
This is simply to be consistent with other microkernel
objects, such as semaphore, mutex, and mailbox.
Change-Id: If803e22ae450d4ef28e81e8a5f2451b9c26c6dce
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds unit test for microkernel private mailboxes.
The code piggybacks to the public mailbox test (by
including the same source files), so any updates to
the test will be applied to both.
Note that the prj.mdef are different for both tests, since
the private mailboxes test move the mailboxes inside source
code. So, both mdef files will need to be updated at
the same time.
Change-Id: I52ccc5931b1abfd3ae3d654f888d4a019268bba0
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This enable defining mailboxes in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_MAILBOX(mailbox_name). The mailboxes created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
mailbox APIs.
Define the mailbox using:
DEFINE_MAILBOX(mailbox1);
and "mailbox1" can be used, for example:
task_mbox_put(mailbox1, &msg);
or,
task_mbox_get(mailbox1, &msg);
etc.
To use the mailbox defined in another source file, simply add:
extern const kmox_t mailbox1;
to the desired C or header file.
Change-Id: I32d4194af740f96fc8df8c6cd3144a0c9accb4ec
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is in preparation to enable private mailbox support.
The struct needs to be moved into more visible header
so private mailboxes can be declared. This also renames
according to naming convention to be private kernel
objects.
Change-Id: Ibd75497e726efd447d27f3bfd0b4695ed1695693
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque mailbox object id type is now a pointer to
the associated mailbox structure, rather than an index
into the microkernel's array of mailbox structures.
This change is a pre-requisite to support for private
mailboxes, which are defined in source code.
Change-Id: Ide832eee2a0762e601847ad07afba380bd79ed8b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds unit test for microkernel private FIFOs.
The code piggybacks to the public FIFOs tests (by
including the same source file), so any updates to
the test will be applied to both.
Note that the prj.mdef are different for both tests, since
the private FIFOs test move some of the FIFOs
inside source code.
Change-Id: I4130ac540b10a31cd30f37890e9cc389af73e89b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This enable defining FIFOs in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_FIFO(fifo_name). The FIFOs created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
FIFO APIs.
Define the FIFO using:
DEFINE_FIFO(fifo1, depth, width);
and "fifo1" can be used, for example:
task_fifo_put(fifo1);
or,
task_fifo_get(fifo1);
etc.
To use the FIFO defined in another source file, simply add:
extern const kfifo_t fifo1;
to the desired C or header file.
Change-Id: I29667c4cfdcd0e6d189358478acf1a6149ecb826
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is in preparation to enable private FIFO support.
The struct needs to be moved into more visible header
so private FIFOs can be declared. This also renames
according to naming convention to be private kernel
objects.
Change-Id: I9b90ddccbaf01ff8c7e2ef03c926d0328dd7ec39
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque FIFO object id type is now a pointer to
the associated FIFO structure, rather than an index
into the microkernel's array of FIFO structures.
This change is a pre-requisite to support for private
FIFOs, which are defined in source code.
Change-Id: Ieb1343d6d5dd1b747063603457d47fab2710f557
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds unit test for microkernel private semaphores.
The code piggybacks to the public semaphores tests (by
including the same source files), so any updates to
the test will be applied to both.
Note that the prj.mdef are different for both tests, since
the private semaphores test move some of the semaphores
inside source code.
Change-Id: Ic318bf6808514c5d335a46cb3e88ebf6000f4c3e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This enable defining semaphores in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_SEMAPHORE(semaphore_name). The semaphores created this
way are the same, in functionality, as those defined in MDEF
files. They can be manipulated by the standard microkernel
semaphore APIs.
Define the semaphore using:
DEFINE_SEMAPHORE(sem1);
and "sem1" can be used, for example:
task_sem_give(sem1);
or,
task_sem_take(sem1);
etc.
To use the semaphore defined in another source file, simply add:
extern const ksem_t sem11;
to the desired C or header file.
Change-Id: Ia9c128648f7a26fc776eeb8f6fcc4158b1712a97
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is in preparation to enable private semaphore support.
The struct needs to be moved into more visible header
so private semaphores can be declared. This also renames
according to naming convention to be private kernel
objects.
Change-Id: I84ac7d580404ac5e1753c1bd446d38993fd23310
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque semaphore object id type is now a pointer to
the associated semaphore structure, rather than an index
into the microkernel's array of semaphore structures.
This change is a pre-requisite to support for private
semaphores, which are defined in source code.
Change-Id: I3821360be35237bfe3bf090efce84f99e335d309
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
It is no longer necessary to generate variables containing the
object id each public mutex. This capability was once needed to
allow kernel code to reference mutexes generated by the build
system (i.e. pseudo-private mutexes); however, the existence of
private mutexes renders this obsolete.
Change-Id: I594be31268c9a336ae2a43d48c1b32dbf3d7cde0
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>