By convention Kconfigs are in all uppercase, but not strictly
required to be so. Currently the Xtensa build defines
CONFIG_${XTENSA_CORE} which can have lowercase letters. This
is marked for cleanup in ZEP-1711.
Issue: ZEP-1711
Change-Id: Ia901ea1688202129f1629001a77f498522859f14
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This option is added in order to support Xtensa, which needs more stack than
other architecture. This allows having a centralized way to change stack
requirements for all tests.
This extra stack size is eaqual to 0 for most architectures, except Xtensa
which requires additional 768 bytes for each stack.
Change-Id: Ie5dcae1dfd29018d36ef35dae22dc4c1a2ecdc14
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This driver was written for v1.5 before the introduction of the function
_sys_clock_final_tick_announce. At that time _sys_idle_elapsed_ticks was reset
to 0 automatically. Now that it is reset by the new function, the driver needed
to be fixed.
Change-Id: I039b4dbacb691aaf992b37e44404abd19a54a833
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
When an IRQ is serviced, the ISR dispatcher will check for any new thread in
the ready queue and switch to it. However, if the current thread is marked as
non preemptable due to _kernel.current->base.preempt > _NON_PREEMPT_THRESHOLD
then we should not switch to another one.
Change-Id: Icdc08105cc6433da479bb95265710462a0f37c0b
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
XCC does neither define __BYTE_ORDER__ nor __ORDER_LITTLE/BIG_ENDIAN__ macros.
This resulted in field preempt of thread.base not correctly built from other
union fields prio and sched_locked, which caused wrong scheduling.
Change-Id: I8566ef4a5cf555906c012c4adc488f9afb26c053
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This core is not depreciated and compilationfor it is even faster than D_233L.
Change-Id: I6b8149ca9e879770c3ed0973ffb9304e2e3c8d8d
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
1) Fatal errors now all go through _SysFatalErrorHandler. When the
simulator is used, only the death of 'essential' threads will result
in the simulator exiting; some test cases that test exceptions may
actually expect a thread to terminate abnormally.
2) The human readability of the exception errors is improved.
Change-Id: I77f57ea0eae15b0c55237681b959cd21e3fe8c1c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The XCC compiler freaks out if a section name passed via
__attribute__((section)) has parenthesis in it. This happens in the
case of _MDEF_THREAD_DEFINE.
It turns out the whole mechanism of placing kernel objects in completely
unique sections is totally unnecessary. This patch is a workaround until
we can clean this up.
Change-Id: I12c88a1b8f5b27bec27d608614356c1b479c0a8c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This toolchain Makefile defines CC/CXX directly so we need to add
a USE_CCACHE case here.
Change-Id: Iee8dc6ab030db8dc45b16e21c5b17864e51341b4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A ctrl-c in the script wouldn't terminate the child process.
Only do the pid trick if we're communicating with sanitycheck over
pipes.
Change-Id: I79da7362958b5fac00defd74d4b709076085575b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The a3 register was supposed to hold the _thread pointer but it seems that it
does not in all cases. Safe to restore it from _kernel structure.
Change-Id: Ie2ff6c3faf0fe70de4c5877ab59433d0c165145b
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
The test will also need to increase the stack to run correctly for Xtensa cores.
Change-Id: If94f12a941dc8eccf879558bdebdc7ccb2d047f1
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
Manu command lin eoption are not supported by xt-c++. There are filtered out
when calling Makefile.toolchain.xcc.
Change-Id: I1e60843d2b23f90250fbb493487c6fc838b7485a
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
If passed after the file they are just ignored silently!
Change-Id: Ic9b04c3023e4d312382850fa5e1b5ae4ef555856
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This change should allow threads that do not access coprocessor to safely
overflow on the coprocessor save area without any issue.
Change-Id: Ic2acd20b60b6bef0b7feeb8cfb54d548eba892f0
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This was a kind of optimization that save few cycles in the cost of code
duplication. However the path where we resume from interrupt withouch changing
the running thread is buggy and leads to many tests to fail. For now I'd prefer
to remove this optimization and have a working port. Later, once everything is
OK, I'll have time to optimize things.
Change-Id: I7af58f383848d157b9f3b3fbeceede3e83f9ce61
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
Having duplicate code leads always to this kind of situation where a bug is
fixed in one place and not in the other. This bug of updating current thread
pointer was already fixed before in the Swap function, but not in the interrupt
handler.
Change-Id: I466aea2d35382446c5c82fe775ada31f0bd19492
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
When current directory is a symbolic link or in a symbolic link then os.getcwd
return the real path leading to os.path.relpath returning not so nice relative
path.
Change-Id: I3e24d3e6f1fe7185992f64803d3728e9588d67e1
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
Sanitycheck actually creates the pipes, using a naming convention imposed
by QEMU. We also need to leave a PID file.
'xt-run' Make target removed, we don't need it.
Change-Id: Ie9fd9dbb1327eb4b10424e7ee5d2f4dc09b121a4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This allows handling options like --fatal-warnings that are passed by
sanitycheck.
Change-Id: Ia78dcef480d9d81cab6051453204c05d52917af2
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This completely breaks all the cc-option checks. It's not clear
why this was done for everyone running sanitycheck.
Change-Id: I3f944423869ccb15fab29c28130820a93cd94917
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some options which are already defined by the build system
for the C compiler or assembler have been removed: -c,
-xassembler-with-cpp, -nostdinc.
References to deleted variable flagALongCall and flagLongCall
removed.
Formatting for 80 columns, there is now one flag per line.
Change-Id: Ieecdb75e26f64c6f58dec3cc636552e7b31a678d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some GCC variants don't support this. Moved later in the Makefile
after the toolchain Makefile has been included so the test works
properly.
Change-Id: Ia9ec2582c486197ea3df3d878173643c14786408
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Xtensa port uses more stack than others. This was discussed with the team and
we agreed that this can be accepted for the first beta.
We will investigate this later to see how to avoid allocating coproc registers
for the system threads in order to reduce the stack overhead. However this
will not be before the port is considered stable.
Change-Id: Icd5b2b0ab68d0906b5408f35f081b100acabc010
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
The old syntax is not accepted by some compilers including XCC.
Change-Id: Id90849a2159652ec225dd2c50d2dc2ddc22a3e08
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
The retval field shall hold the return value itself not a pointer on its
location.
Change-Id: I3f9e225f2bdd501f88441946b5187ebbd17a71e3
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
When debugging Xtensa port, on needs for sure to create an Xtensa Xplorer
project in order to be able to debug his project. These files will appear
in the git repository as non versioned files. It is safe to ignore them as
we won't anybody commit these files (user specific).
Change-Id: I156ec5c7393f1db98286da0b841a4e8496a9ff89
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
In scripts/Makefile.qemu, the target qemu is already an alias for taget run.
In scripts/Makefile.xt{,sc}-run there is no target qemu but a target run.
Change-Id: Ib9dce3561ef9367b17d30070354e709df4d7e528
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This was introduced during a copy/paste when updating patch
https://gerrit.zephyrproject.org/r/#/c/10323/6..7
Change-Id: Id6857dd28a16974361932285b44559f702c4d910
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This function needs to be decalred in a file included by _thread_entry.
It also needs to have exit function declared as not returning.
Change-Id: I2a01e7408cf70266351ae5089f45b5d9d009fabe
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>