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>
Enhances the existing microkernel mutex test project to verify
that recursive mutex locking works properly. The implementation
utilizes the new in-file defined mutexes to demonstrate that
this capability also works.
[DL: Update the original patch from Allan Stephens
@ https://oic-review.01.org/gerrit/3256 to utilize
the new interface. Also updated the commit message. ]
Change-Id: Iaf8b4a5cd97d1dce53d6134a978cc565279d038c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This enable defining mutexes in source code in addition to
defining in MDEF files. This introduces the macro
DEFINE_MUTEX(mutex_name). The mutexes created this way are
the same, in functionality, as those defined in MDEF files.
They can be manipulated by the standard microkernel
mutex APIs.
Sample usage:
DEFINE_MUTEX(mutex1);
void one_function(void)
{
task_mutex_lock_wait(mutex1);
...
task_mutex_unlock(mutex1);
}
To use the mutex defined in another source file, simply add:
extern const kmutex_t mutex1;
to the desired C or header file.
[ DL: This is a slightly modified version of similar patch
by Allan Stephens available at
https://oic-review.01.org/gerrit/3255 ]
Change-Id: Ib9cd8193eaf849a8aad1d217912759324ee8818e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This is in preparation to enable private mutex support.
The struct needs to be moved into more visible header
so private mutexes can be declared. This also renames
according to naming convention to be private kernel
objects.
Change-Id: Ifccb60a837b44e443be0b091c2df4f06373718fe
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The opaque mutex object id type is now a pointer to the associated
mutex structure, rather than an index into the microkernel's
array of mutex structures.
This change is a pre-requisite to support for private mutexes
(i.e. mutexes not defined using a project's MDEF file).
[DL: fix some whitespace issues.]
Change-Id: Ida419f1674df245f51a36d28ca7d4631239f1edd
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This change removes the internal number-to-function mapping
of microkernel services. Instead, function pointers are used
to specify which service to use.
This is in preparation for private kernel objects. Before this,
only kernel objects that are defined in MDEF files would have
corresponding functions included in the final binary, via sysgen
by populating an array of number-to-function mapping. This
causes an issue when a certain type of objects are all defined
with source code, and never in MDEF file. The corresponding
mapping would be deleted, and the functions are never included
in the binary. For example, if no mutexes are defined in MDEF
file, the _k_mutex_*() functions would not be included.
With this change, any usage of private kernel objects will hint
to the linker that those functions are needed, and should not be
removed from final binary.
Change-Id: If48864abcd6471bcb7964ec00fe668bcabe3239b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Renames the menu to "Processor Capabilities" as it is both more concise and
it gives a more "consistent feel" to the menu names (referring to the platform
equivalent "Platform Capabilities".)
Change-Id: I1f835e11e382f811720c17e194b4bf410ef74d31
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Reduces redundancy in the x86 Kconfig menus.
Change-Id: I90ff7d6aedda2aa02528b6821eeaf7eb6bea321c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The Kconfig option PROT_MODE_SWITCH_PROMPT was being used to conditionally
display the "Boot Sequence Options" Kconfig menu. It is simpler to include
both PROT_MODE_SWITCH and its dependent BOOT_A20_ENABLE in the parent menu.
However, doing so necessitates that the name of the parent menu be changed
from "Bootloader Options" to "Boot Options".
Change-Id: I9b9a074a0d4ec5209f5349b42178409c73875b00
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Changes the order of the floating point options so that the SSE Kconfig options
are not interspersed with the floating point options.
Change-Id: I8390b5049f95b3088e7abf48bf492a544e7f5f50
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
It makes more sense to have the x86 Kconfig options CPU_FLOAT_UNSUPPORTED
and CPU_SSE_UNSUPPORTED to be selected by the CPU than have those options
dependent upon the selected CPU.
Change-Id: I862baabee6a81cc79206c37a50b8594354a40403
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
There is no need for any x86 Kconfig to have a dependency upon the following
Kconfig options as they are always true when building for ARCH=x86.
X86_32
ISA_IA32
ARCH="x86"
Change-Id: I810e9712589199871953f043e8be746ab03230f8
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Uses tabs instead of spaces for consistency.
Change-Id: Ic85b710dc7f667f9b28b97839f020921afe13f3f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The Kconfig option HARDWARE_BP_SUPPORTED is not used.
Change-Id: Ifed886f733e8125ef1c45926e46e31ff48d06316
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
The top-level menus "x86 Core Options" and "Bus Options (PCI etc.)" are now
sub-menus to the the top-level menu "General Platform Configurations".
Also, the "Board Capabilities" sub-menu has been hoisted out of the
"x86 Core Options" menu and placed as a renamed sub-menu
(Platform Capabilities) to the top-level "General Platform Configurations"
menu.
This helps to create a more logical flow when using "make menuconfig".
Change-Id: I3a837b039eb735ec4073a1721f00753705fba020
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Fixes up the summary lines in the "Board Capabilities" menu so that the
descriptions are more consistent with each other as well as their option names.
Change-Id: I6a030af702340c5ef634217ff6d4bfd046ed24c5
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Combines the following Kconfig options to create PLATFORM_IA32:
PLATFORM_GENERIC_PC
PLATFORM_PCMINUTEIA
PLATFORM_ATOM_N28XX
The new name aligns with the 'arch/x86/platforms/ia32' platform directory.
Change-Id: I4474cb43040f888d5164382184c27bbb38527440
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
1. The new name aligns with the 'arch/x86/platforms/ia32_pci' platform
directory.
2. A shorter prompt works better with menuconfig.
3. Removes IOAPIC selection as HPET_TIMER selection makes it implicit.
4. Removes LINK_AUX_COMPILER_LIBS selection as it does not exist.
5. Removes CPU_MINUTEIA selection to permit CPU_ATOM as a valid choice.
Change-Id: I55694d2594a103f4f5ca233c279df0556ff1327f
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates the default platform configuration files as they had not been properly
maintained.
Change-Id: I5f554c287af51f4d7dcf224b7816f40d14c576d4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Enables standard doxygen GUI that shows relationships
and allows code access.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: If496f221924d3504d8d9d120e3d80650e724af48
Signed-off-by: Carol Lee <carol.lee@windriver.com>
Do not delete files that do not exist and just clean
the outdir directory which has all the objects.
The source directories now do not have any built objects.
Change-Id: I5774fa325717c65b6666de495b35f9b86f57473c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The footprint-min test cases intentionally turn CONFIG_PRINTK
off to show the minimal footprint. On ARC, printk() is being used
in some core IRQ management code, resulting in a build error.
On other OSes such as Linux, disabling printk() causes any use
of them to compile to nothing rather than generate a build error.
We should do the same here, we shouldn't try to discourage the use
of console logs in the codebase.
Change-Id: Ibbbc044eef715066b3bb9e96b073934320b71aa9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This policy was in place for the old sanity checks, was simply
overlooked.
Change-Id: Id021a669b35622f9e9cba23b4417c5d0b7afc15c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Enhances description for task definition. Adds examples of most
frequently used task operations. Enhances descriptions in task
API tables.
Change-Id: I5b29e2e2715f7d672f375861ae01b26ffa762fc8
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This is really not a platform target, rename it to match
what it really does, which is building drivers.
Change-Id: Ie36781fa0916371013de81b9fa542a9e790af7e6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The way we build the libc files is not a real library that can be
used as a libc and makes managing the source files a bit
difficult, so lets revert back to building the c function files
like everything else in the system to avoid any confusion.
Change-Id: I4e998e37bc376522fe253c4aefefe7804597f0f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We should be able to point to a defconfig file that is
outside of the buildsystem instead of using system
provided defconfigs.
In Makefile of application, specify for example:
KBUILD_DEFCONFIG=/tmp/micro_basic_atom_defconfig
Change-Id: I63e500bf74892654587b63d788a94541c33072e8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The top make file has a documentation target that does not work.
Change it to work with our documentation and scripts.
Change-Id: Id32643900d122f54778e3179930f2e8e34387aa1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit adds a quick reference on how to debug an
application with qemu and gdb.
Change-Id: Ib75465b110a65285dc55888fbfb95e8271ad83f9
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit updates information about Makefile variables
that define a project. It updates the definition for ARCH,
removes old BSP related definitions and adds definitions
for PLATFORM_CONFIG and O variables.
Change-Id: Id89251f576da0543b3349d75a87fa5b5e92326e7
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>