mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-06 23:52:30 +00:00
Adds support for Xtensa architecture. Andrew Boie (24): xtensa: fixup license identifiers xtensa: fix find_msb_set() and find_lsb_set() xcc: add location of C++ compiler Makefile: test for -fno-asynchronous-unwind-tables xtensa: Makefile: cleanup xtensa_sim_console: remove deprecation warning xt-run: delete any stale fifos to avoid mkfifo error xt-sim: enable use of xtensa simulator with 'make run' sanitycheck: don't disable tryrun xt-run: fix sanitycheck communication REVERTME: disable xip test on xtensa xt-sim: add support for 'make debug' xt-run: don't leave dead emulator processes lying around xcc: add ccache support legacy: work around XCC issue in MDEF threads xtensa: cleanup fatal error handling xtensa: fix build warning if no coprocessors present xtensa: remove nonexistent offset REVERTME: cpp_synchronization: disable on Xtensa REVERTME: tests: stackprot: disable on xtensa sanitycheck: fix defconfig regex sanitycheck: only disable tryrun when using SDK xtensa: fix numerous checkpatch issues REVERTME: tests: crypto: disable on Xtensa Max Filippov (1): xtensa: support 'make qemu' target Mazen NEIFER (62): Xtensa port: Started port to for Xtensa cores family. Xtensa port: Added board config files for Xtensa simulator paltform Xtensa port: Added support for XCC, the Cadence Systems Inc compiler Xtensa port: Added kernel arch dependent structs and functions. Xtensa port: Added Xtensa header generic files. Xtensa port: Fixed typo in XCC toochain specific make file. Xtensa port: Added Xtensa specific include files. Xtensa port: Added support for Xtensa cores in toolchain/gcc.h. Xtensa port: Added support in arch/cpu.h for Xtensa cores. Xtensa port: Remove XCC warning about unrecognized CLI option. Xtensa port: Added fields offset support for kernel and thread structures. Xtensa port: Added Kbuild file for Xtensa arch. Xtensa port: Added support for Xtensa architecture in zephyr include files. Xtensa port: Added support for Xtensa architecture to linker-defs.h. Xtensa port: Removed the need to put an empy file soc.c in arch/xtensa/soc dir. Xtensa port: Added Xtensa internal timer configuration need by assembly files. Xtensa port: Added support for Xtensa simulator console driver. Xtensa port: Added Xtensa specific code (C + S) files. Xtensa port: Fixed tests/kernel/context to compile with Xtensa internal timer. Xtensa port: Enable long calls for Xtensa vector table. Xtensa port: Moved XCC specific libraries out of genric Xtensa make file. Xtensa port: Added linker script for several Xtensa cores. Xtensa port: Define __builtin_unreachable() as CLI macro when using XCC. Xtensa port: Changed simulation support with xt-run/xtsc-run to be qemu like. Xtensa port: Fixed assembly comments to be accurate with code. Changed Kbuild to pass also KBUILD_CPPFLAGS to CC on addition to KBUILD_CFLAGS. Xtensa port: Added support for Xtensa internal timer as system timer. Xtensa port: Replaced call to legacy sys_thread_self_get by one to k_current_get Xtensa port: _thread_entry shall use call4 to start the thread. Xtensa port: Let xcc specific make file override unsupported -Og with -O0. Xtensa port: Removed compiler warnings about printf formats/arguments mismatch. Xtensa port: Added missing initalization of thread base sturct in _new_thread. Xtensa port: Removed warnings related to function _NanoFatalErrorHandler. Xtensa port: Fixed Swap function not updating _kernel.current. Xtensa port: Fixed RAMABLE_REGION in linker scripts. sanitycheck: support other simulators (xt-run and/or xtsc) than QEMU. gitignore: Ignore Eclipse (Xtensa Xplorer) project files. Xtensa port: Fixed function setting Sawp return value. Xtensa port: Enable console when building for Xtensa simulator as board. Fixed compilation error caused by bad initialization of unamed union field. Xtensa port: Increased idle thread stack size to avoid stack overflow. Xtensa port: Removed duplicate file and renamed to sys_io.h as other platforms. Xtensa port: Fixed linker script for hifi_mini core. Xtensa port: Use directly assmebler and linker instead of via the compiler. sanitycheck: Fixed displayed log when current directory is a symbolic link. Xtensa port: Removed duplicate code and fixed update of current thread pointer. Xtensa port: Restore interrupted context the same way as premption resume. Xtensa port: Moved coprocessor stack area on bottom of stack, just after TCS. Xtensa port: xt*-run requires options to be passed before file to be ran. Xtensa port: Set Swap function result to -EAGAIN. Xtensa port: Removed unsupported c++ flags cuasing xt-c++ to throw an error. Xtensa port: Connect Xtensa timer to tick IRQ in legacy test_context. Xtensa port: Fixed memory corruption in interrupt handler exit function. Xtensa port: Fixed defintion of MAX_HEAP_SIZE, thus, compilation of new_lib. Xtensa port: Added support for sample_controller core and set is as default. Xtensa port: Fixed scheduling bug caused to missing Endianess related macros. Xtensa port: Prevent preemption of locked threads. Xtensa port: Fixed compilation errors caused by last rebase on master. Xtensa port: Fixed Xtensa timer in case of tickles idle. tests: Introduced new config option to add extra stack size for tests. xtensa port: Added arch .ini file to support xt-sim Xtensa port: Removed trailing spaces and unused macros. Reformatted comments. .gitignore | 3 + Kbuild | 2 +- Makefile | 16 +- arch/Kconfig | 4 + arch/xtensa/Kbuild | 12 + arch/xtensa/Kconfig | 81 + arch/xtensa/Makefile | 41 + arch/xtensa/core/Makefile | 18 + arch/xtensa/core/atomic.S | 405 ++++ arch/xtensa/core/cpu_idle.c | 39 + arch/xtensa/core/crt1-boards.S | 271 +++ arch/xtensa/core/crt1-sim.S | 246 ++ arch/xtensa/core/fatal.c | 242 ++ arch/xtensa/core/irq_manage.c | 38 + arch/xtensa/core/irq_offload.c | 39 + arch/xtensa/core/offsets/Makefile | 1 + arch/xtensa/core/offsets/offsets.c | 65 + arch/xtensa/core/startup/Makefile | 2 + arch/xtensa/core/startup/reset-vector.S | 695 ++++++ arch/xtensa/core/sw_isr_table.S | 59 + arch/xtensa/core/swap.S | 96 + arch/xtensa/core/thread.c | 179 ++ arch/xtensa/core/xt_zephyr.S | 388 ++++ arch/xtensa/core/xtensa_context.S | 609 +++++ arch/xtensa/core/xtensa_intr.c | 69 + arch/xtensa/core/xtensa_intr_asm.S | 140 ++ arch/xtensa/core/xtensa_vectors.S | 1887 ++++++++++++++++ arch/xtensa/include/kernel_arch_data.h | 195 ++ arch/xtensa/include/kernel_arch_func.h | 94 + .../include/kernel_event_logger_arch.h | 36 + arch/xtensa/include/offsets_short_arch.h | 40 + arch/xtensa/include/start_task_arch.h | 37 + arch/xtensa/include/xtensa_api.h | 73 + arch/xtensa/include/xtensa_config.h | 141 ++ arch/xtensa/include/xtensa_context.h | 314 +++ arch/xtensa/include/xtensa_rtos.h | 202 ++ arch/xtensa/include/xtensa_timer.h | 149 ++ arch/xtensa/soc/D_108mini/Kconfig | 12 + arch/xtensa/soc/D_108mini/Makefile | 1 + arch/xtensa/soc/D_108mini/linker.ld | 606 +++++ arch/xtensa/soc/D_212GP/Kconfig | 12 + arch/xtensa/soc/D_212GP/Makefile | 1 + arch/xtensa/soc/D_212GP/linker.ld | 612 +++++ arch/xtensa/soc/D_233L/Kconfig | 12 + arch/xtensa/soc/D_233L/Makefile | 3 + arch/xtensa/soc/D_233L/linker.ld | 513 +++++ arch/xtensa/soc/Kconfig.cores | 62 + arch/xtensa/soc/XRC_D2PM/Kconfig | 12 + arch/xtensa/soc/XRC_D2PM/Makefile | 1 + arch/xtensa/soc/XRC_D2PM/linker.ld | 616 +++++ arch/xtensa/soc/XRC_D2PM_5swIrq/Kconfig | 12 + arch/xtensa/soc/XRC_D2PM_5swIrq/Makefile | 1 + arch/xtensa/soc/XRC_D2PM_5swIrq/linker.ld | 616 +++++ .../xtensa/soc/XRC_FUSION_AON_ALL_LM/Kconfig | 12 + .../soc/XRC_FUSION_AON_ALL_LM/Makefile | 1 + .../soc/XRC_FUSION_AON_ALL_LM/linker.ld | 445 ++++ arch/xtensa/soc/hifi2_std/Kconfig | 12 + arch/xtensa/soc/hifi2_std/Makefile | 1 + arch/xtensa/soc/hifi2_std/linker.ld | 616 +++++ arch/xtensa/soc/hifi3_bd5/Kconfig | 12 + arch/xtensa/soc/hifi3_bd5/Makefile | 1 + arch/xtensa/soc/hifi3_bd5/linker.ld | 392 ++++ arch/xtensa/soc/hifi3_bd5_call0/Kconfig | 12 + arch/xtensa/soc/hifi3_bd5_call0/Makefile | 1 + arch/xtensa/soc/hifi3_bd5_call0/linker.ld | 392 ++++ arch/xtensa/soc/hifi4_bd7/Kconfig | 12 + arch/xtensa/soc/hifi4_bd7/Makefile | 1 + arch/xtensa/soc/hifi4_bd7/linker.ld | 439 ++++ arch/xtensa/soc/hifi_mini/Kconfig | 12 + arch/xtensa/soc/hifi_mini/Makefile | 1 + arch/xtensa/soc/hifi_mini/linker.ld | 364 +++ arch/xtensa/soc/hifi_mini_4swIrq/Kconfig | 12 + arch/xtensa/soc/hifi_mini_4swIrq/Makefile | 1 + arch/xtensa/soc/hifi_mini_4swIrq/linker.ld | 364 +++ arch/xtensa/soc/sample_controller/Kconfig | 12 + arch/xtensa/soc/sample_controller/Makefile | 1 + arch/xtensa/soc/sample_controller/linker.ld | 606 +++++ boards/xtensa/xt-sim/Kconfig | 12 + boards/xtensa/xt-sim/Kconfig.board | 8 + boards/xtensa/xt-sim/Kconfig.defconfig | 11 + boards/xtensa/xt-sim/Makefile | 5 + boards/xtensa/xt-sim/Makefile.board | 4 + boards/xtensa/xt-sim/board.c | 4 + boards/xtensa/xt-sim/board.h | 10 + boards/xtensa/xt-sim/xt-sim_defconfig | 4 + drivers/console/Kconfig | 19 +- drivers/console/Makefile | 1 + drivers/console/xtensa_sim_console.c | 86 + drivers/timer/Kconfig | 43 + drivers/timer/Makefile | 2 + drivers/timer/xtensa_sys_timer.c | 351 +++ include/arch/cpu.h | 2 + include/arch/xtensa/addr_types.h | 15 + include/arch/xtensa/arch.h | 144 ++ include/arch/xtensa/exc.h | 45 + include/arch/xtensa/offsets.h | 11 + include/arch/xtensa/sys_io.h | 113 + include/arch/xtensa/xtensa_irq.h | 54 + include/kernel.h | 4 +- include/legacy.h | 2 +- include/linker-defs.h | 2 + include/linker-tool-gcc.h | 2 + include/toolchain/common.h | 4 +- include/toolchain/gcc.h | 5 +- kernel/Kconfig | 1 + lib/libc/newlib/libc-hooks.c | 3 + .../microkernel/testcase.ini | 1 + .../nanokernel/testcase.ini | 1 + scripts/Makefile.toolchain.xcc | 104 + scripts/Makefile.xt-run | 32 + scripts/Makefile.xtsc-run | 51 + scripts/sanity_chk/arches/xtensa.ini | 7 + scripts/sanitycheck | 9 +- scripts/support/xt-gdb.sh | 23 + scripts/waitpid | 5 + tests/Kconfig | 5 + tests/crypto/test_aes/testcase.ini | 2 + tests/crypto/test_ctr_prng/testcase.ini | 2 + tests/crypto/test_ecc_dh/testcase.ini | 2 + tests/kernel/context/src/context.c | 5 +- .../test_fifo_api/src/test_fifo_contexts.c | 2 +- .../fifo/test_fifo_api/src/test_fifo_loop.c | 2 +- .../test_lifo_api/src/test_lifo_contexts.c | 2 +- .../lifo/test_lifo_api/src/test_lifo_loop.c | 2 +- .../kernel/mbox/mbox_api/src/test_mbox_api.c | 2 +- .../src/test_mpool_threadsafe.c | 2 +- tests/kernel/stackprot/testcase.ini | 2 +- .../cdata_api/src/test_customdata_api.c | 2 +- .../src/test_threads_cancel_abort.c | 2 +- .../lifecycle_api/src/test_threads_spawn.c | 2 +- .../src/test_threads_suspend_resume.c | 2 +- .../schedule_api/src/test_sched.h | 2 +- tests/kernel/xip/testcase.ini | 2 + .../legacy/kernel/test_context/src/context.c | 7 +- .../kernel/test_sema/nanokernel/src/sema.c | 4 +- tests/legacy/kernel/test_sleep/src/sleep.c | 4 +- .../test_stackprot/microkernel/testcase.ini | 2 +- 137 files changed, 14962 insertions(+), 39 deletions(-) create mode 100644 arch/xtensa/Kbuild create mode 100644 arch/xtensa/Kconfig create mode 100644 arch/xtensa/Makefile create mode 100644 arch/xtensa/core/Makefile create mode 100644 arch/xtensa/core/atomic.S create mode 100644 arch/xtensa/core/cpu_idle.c create mode 100644 arch/xtensa/core/crt1-boards.S create mode 100644 arch/xtensa/core/crt1-sim.S create mode 100644 arch/xtensa/core/fatal.c create mode 100644 arch/xtensa/core/irq_manage.c create mode 100644 arch/xtensa/core/irq_offload.c create mode 100644 arch/xtensa/core/offsets/Makefile create mode 100644 arch/xtensa/core/offsets/offsets.c create mode 100644 arch/xtensa/core/startup/Makefile create mode 100644 arch/xtensa/core/startup/reset-vector.S create mode 100644 arch/xtensa/core/sw_isr_table.S create mode 100644 arch/xtensa/core/swap.S create mode 100644 arch/xtensa/core/thread.c create mode 100644 arch/xtensa/core/xt_zephyr.S create mode 100644 arch/xtensa/core/xtensa_context.S create mode 100644 arch/xtensa/core/xtensa_intr.c create mode 100644 arch/xtensa/core/xtensa_intr_asm.S create mode 100644 arch/xtensa/core/xtensa_vectors.S create mode 100644 arch/xtensa/include/kernel_arch_data.h create mode 100644 arch/xtensa/include/kernel_arch_func.h create mode 100644 arch/xtensa/include/kernel_event_logger_arch.h create mode 100644 arch/xtensa/include/offsets_short_arch.h create mode 100644 arch/xtensa/include/start_task_arch.h create mode 100644 arch/xtensa/include/xtensa_api.h create mode 100644 arch/xtensa/include/xtensa_config.h create mode 100644 arch/xtensa/include/xtensa_context.h create mode 100644 arch/xtensa/include/xtensa_rtos.h create mode 100644 arch/xtensa/include/xtensa_timer.h create mode 100644 arch/xtensa/soc/D_108mini/Kconfig create mode 100644 arch/xtensa/soc/D_108mini/Makefile create mode 100644 arch/xtensa/soc/D_108mini/linker.ld create mode 100644 arch/xtensa/soc/D_212GP/Kconfig create mode 100644 arch/xtensa/soc/D_212GP/Makefile create mode 100644 arch/xtensa/soc/D_212GP/linker.ld create mode 100644 arch/xtensa/soc/D_233L/Kconfig create mode 100644 arch/xtensa/soc/D_233L/Makefile create mode 100644 arch/xtensa/soc/D_233L/linker.ld create mode 100644 arch/xtensa/soc/Kconfig.cores create mode 100644 arch/xtensa/soc/XRC_D2PM/Kconfig create mode 100644 arch/xtensa/soc/XRC_D2PM/Makefile create mode 100644 arch/xtensa/soc/XRC_D2PM/linker.ld create mode 100644 arch/xtensa/soc/XRC_D2PM_5swIrq/Kconfig create mode 100644 arch/xtensa/soc/XRC_D2PM_5swIrq/Makefile create mode 100644 arch/xtensa/soc/XRC_D2PM_5swIrq/linker.ld create mode 100644 arch/xtensa/soc/XRC_FUSION_AON_ALL_LM/Kconfig create mode 100644 arch/xtensa/soc/XRC_FUSION_AON_ALL_LM/Makefile create mode 100644 arch/xtensa/soc/XRC_FUSION_AON_ALL_LM/linker.ld create mode 100644 arch/xtensa/soc/hifi2_std/Kconfig create mode 100644 arch/xtensa/soc/hifi2_std/Makefile create mode 100644 arch/xtensa/soc/hifi2_std/linker.ld create mode 100644 arch/xtensa/soc/hifi3_bd5/Kconfig create mode 100644 arch/xtensa/soc/hifi3_bd5/Makefile create mode 100644 arch/xtensa/soc/hifi3_bd5/linker.ld create mode 100644 arch/xtensa/soc/hifi3_bd5_call0/Kconfig create mode 100644 arch/xtensa/soc/hifi3_bd5_call0/Makefile create mode 100644 arch/xtensa/soc/hifi3_bd5_call0/linker.ld create mode 100644 arch/xtensa/soc/hifi4_bd7/Kconfig create mode 100644 arch/xtensa/soc/hifi4_bd7/Makefile create mode 100644 arch/xtensa/soc/hifi4_bd7/linker.ld create mode 100644 arch/xtensa/soc/hifi_mini/Kconfig create mode 100644 arch/xtensa/soc/hifi_mini/Makefile create mode 100644 arch/xtensa/soc/hifi_mini/linker.ld create mode 100644 arch/xtensa/soc/hifi_mini_4swIrq/Kconfig create mode 100644 arch/xtensa/soc/hifi_mini_4swIrq/Makefile create mode 100644 arch/xtensa/soc/hifi_mini_4swIrq/linker.ld create mode 100644 arch/xtensa/soc/sample_controller/Kconfig create mode 100644 arch/xtensa/soc/sample_controller/Makefile create mode 100644 arch/xtensa/soc/sample_controller/linker.ld create mode 100644 boards/xtensa/xt-sim/Kconfig create mode 100644 boards/xtensa/xt-sim/Kconfig.board create mode 100644 boards/xtensa/xt-sim/Kconfig.defconfig create mode 100644 boards/xtensa/xt-sim/Makefile create mode 100644 boards/xtensa/xt-sim/Makefile.board create mode 100644 boards/xtensa/xt-sim/board.c create mode 100644 boards/xtensa/xt-sim/board.h create mode 100644 boards/xtensa/xt-sim/xt-sim_defconfig create mode 100644 drivers/console/xtensa_sim_console.c create mode 100644 drivers/timer/xtensa_sys_timer.c create mode 100644 include/arch/xtensa/addr_types.h create mode 100644 include/arch/xtensa/arch.h create mode 100644 include/arch/xtensa/exc.h create mode 100644 include/arch/xtensa/offsets.h create mode 100644 include/arch/xtensa/sys_io.h create mode 100644 include/arch/xtensa/xtensa_irq.h create mode 100644 scripts/Makefile.toolchain.xcc create mode 100644 scripts/Makefile.xt-run create mode 100644 scripts/Makefile.xtsc-run create mode 100644 scripts/sanity_chk/arches/xtensa.ini create mode 100644 scripts/support/xt-gdb.sh create mode 100755 scripts/waitpid Change-Id: I666a35e30526bcc6d57cc95ac5381abaec0ca0a5 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com> |
||
---|---|---|
.known-issues | ||
arch | ||
boards | ||
doc | ||
drivers | ||
dts | ||
ext | ||
include | ||
kernel | ||
lib | ||
misc | ||
samples | ||
scripts | ||
subsys | ||
tests | ||
.checkpatch.conf | ||
.gitattributes | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
defaults.tc | ||
Kbuild | ||
Kconfig | ||
Kconfig.zephyr | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
Makefile.inc | ||
Makefile.test | ||
zephyr-env.sh |