Commit graph

99014 commits

Author SHA1 Message Date
Flavio Santes
79a064fae8 net/http: Add QEMU support to the HTTP server sample app
This patch adds the QEMU prj file for the HTTP server sample
app.

Change-Id: I0b910b5ec9970a7ffe9621e19d9544d899c22132
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-14 08:30:34 +02:00
Flavio Santes
bed71d0a02 net/mqtt: Fix inline doc for MQTT
Fix inline documentation for the MQTT API.

Jira: ZEP-1669

Change-Id: I90702eae236a9189b58e0f2fb2a6c5a3eeaf959c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-14 08:30:34 +02:00
Flavio Santes
449cbbd874 net/dns: Update QEMU prj file
Update the IPv4 addresses to 192.0.2.x.

Change-Id: I0eafccfaf691cfd2ffb896e18d3fdcf091837edc
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-14 08:30:34 +02:00
Vinicius Costa Gomes
d8d16e81f5 iot/zoap: Add missing const modifier to header file
Makes it cleared that zoap_update_from_block() doesn't modify the
packet.

Change-Id: I35429b153370c50eb5ae9c914b47a3144faf2f04
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-14 08:30:33 +02:00
Vinicius Costa Gomes
b032f54f60 iot/zoap: Fix header indentation
Change-Id: Iea2dd0f2493e240caa33f81fa68e5be894f0de86
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-14 08:30:33 +02:00
Vinicius Costa Gomes
e190ffe200 iot/zoap: Fix handling of 16-bytes block-wise transfers
This fixes the case that a request for block number (NUM) 0, using a
16 byte block was considered invalid.

This was because it is encoded as the value 0 (zero), which can be
expressed as the BLOCK1 option present but without any value
associated. The old code considered this the same as the option not
existing.

Change-Id: I0f3912803a88865e9f544a6d0078ed4231775a88
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-14 08:30:33 +02:00
Vinicius Costa Gomes
62a6c9c6d0 samples/zoap-server: Update docs with information about libcoap
Add information about how to run libcoap's[1] implementation of the
ETSI testcases against zoap-server.

Jira: ZEP-1538

[1] https://github.com/obgm/libcoap (branch develop)

Change-Id: I6aa5989575cc15630371aa0761bee98fb6fe1b80
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-14 08:30:33 +02:00
Vinicius Costa Gomes
0c94d6a085 iot/zoap: Improve zoap.h documentation
Now types and functions have better explanations of their usage and
parameters associated.

Jira: ZEP-1657

Change-Id: I146688324080ac3cf0876f1db3c92c9514e1303d
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-14 08:30:33 +02:00
Anas Nashif
d4c9a7d80c net: remove obsolete CONFIG_NET_YAIP
Change-Id: Ie8ef79e7d7a6f229af3771b7786af3db89c5e458
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-14 08:30:33 +02:00
Jean-Paul Etienne
d0a33869a5 riscv32: move riscv privileged architecture specifics within a common header file
Added a riscv-privilege.h header file that contains common
definitions for all riscv SOCs supporting the riscv
privileged architecture specification.

This shall ease addition of future riscv SOCs supporting
the riscv privileged architecture spec.

Change-Id: I5714bf70eeda738a25967ed26d3d0d2aaa0c9989
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-02-14 05:23:14 +00:00
Andrew Boie
587ba7b8ea arc: move openocd_dbg section
Its current placement was splitting the vector table in half.
Move to rodata, a better place for it. There's no requirement for
it to be in the text section.

Change-Id: I67724b2a26a9cb62c2ccd473cb54c53e4f74dc32
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-14 02:14:51 +00:00
Marcus Shawcroft
459e850429 scripts: Fix hardwired python path in extract_dts_include.py
Replace the hardwired #! python path with a PATH search.  This is
necessary to allow build tools to execute from a virtualenv.

Change-Id: Ib83131fd96656bc9f76c606356b1f92c877cc117
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-14 02:14:39 +00:00
Jithu Joseph
4462509ea7 spi_test: fix variable type mismatches
This was reported by ISSM compiler.

Jira: ZEP-1179

Change-Id: Ib97ed8da830126c9fbfa2269c8b2327d2f1be2f4
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-14 02:13:53 +00:00
Jithu Joseph
ecba9dee51 test_mpool_api: fix variable type mismatches
This was reported by ISSM compiler.

Jira: ZEP-1179

Change-Id: I5700ff6b374815325fa858cfd11f8938c82d8337
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-14 02:13:52 +00:00
Jithu Joseph
d3455754d3 samples: webusb: fix variable type mismatches
This was reported by ISSM compiler.

Jira: ZEP-1179

Change-Id: Ib54d43bbfae4c7819b1e2b82d2931bfe1201ecce
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-14 02:13:52 +00:00
Anas Nashif
81dcc0933a boards: tinyTILE: enable USB console by default
Jira: ZEP-1710
Change-Id: I656373206af843915262d17c165a6525582fe12f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-13 23:44:50 +00:00
Andrew Boie
29fa81fec2 Merge remote-tracking branch 'origin/core'
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>
2017-02-13 12:32:29 -08:00
Andrew Boie
f1260fb618 arc: linker.ld: fix BSS section declaration
The BSS section needs to use AT> in XIP systems otherwise the LMA
addresses in the ELF binary are wrong, leading to issues if we
try to manipulate the binary with objcopy. The GROUP_DATA_LINK_IN
macro does the right thing here.

This was already done on other arches but ARC was missed.

Change-Id: I93748e919e0b68c1ff2dfb4b85b7064a8d980f3a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 20:02:40 +00:00
Andrew Boie
da7864e727 REVERTME: tests: crypto: disable on Xtensa
Tinycrypt's definition of 'bool' does not work properly with
Xtensa's XCC compiler.

Issue: ZEP-1722
Change-Id: Id71b5f1bcf738c83e672b64a592a68751758dbc9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:53:24 -08:00
Andrew Boie
42562b9367 xtensa: fix numerous checkpatch issues
Change-Id: I903f5f0692849fb9e7bf5d978b63b12bf1bd6e33
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Andrew Boie
1e4e68b52a sanitycheck: only disable tryrun when using SDK
Change-Id: I8018db62408240208b6f0b5e8f6f5ddf96d497f2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Mazen NEIFER
fb5299cd4a Xtensa port: Removed trailing spaces and unused macros. Reformatted comments.
Change-Id: I7f3fcba5d78c153c9b2830982e3ed6d5a1150c78
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 11:39:03 -08:00
Mazen NEIFER
e861775ebb xtensa port: Added arch .ini file to support xt-sim
Change-Id: I0c1fac867cde2c76975fda396b8f524240954be4
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Andrew Boie
60823c2325 sanitycheck: fix defconfig regex
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>
2017-02-13 11:39:03 -08:00
Mazen NEIFER
4713575cb1 tests: Introduced new config option to add extra stack size for tests.
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>
2017-02-13 11:39:03 -08:00
Andrew Boie
555c60631a REVERTME: tests: stackprot: disable on xtensa
Issue: ZEP-1702
Change-Id: Id8606e2c72bf21e236a13f48839516626929c171
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Andrew Boie
9f1ff3fd85 REVERTME: cpp_synchronization: disable on Xtensa
Issue: ZEP-1703
Change-Id: I30af7baa78b0d2ed4dd1ac7236c318c47289fa5e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:03 -08:00
Mazen NEIFER
4bff13e20a Xtensa port: Fixed Xtensa timer in case of tickles idle.
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>
2017-02-13 11:39:02 -08:00
Mazen NEIFER
ff0828faf3 Xtensa port: Fixed compilation errors caused by last rebase on master.
Change-Id: If2896bcce26652ded2059a11620370e34f98d1e4
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 11:39:02 -08:00
Mazen NEIFER
74ff1092d4 Xtensa port: Prevent preemption of locked threads.
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>
2017-02-13 11:39:02 -08:00
Andrew Boie
53f66d0bf7 xtensa: remove nonexistent offset
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:02 -08:00
Andrew Boie
de099439b1 xtensa: fix build warning if no coprocessors present
Change-Id: Ib754795eff073500a38e4b383268b4f90c1763a7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:02 -08:00
Mazen NEIFER
0cfeb626c0 Xtensa port: Fixed scheduling bug caused to missing Endianess related macros.
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>
2017-02-13 11:39:02 -08:00
Mazen NEIFER
3b95e3d729 Xtensa port: Added support for sample_controller core and set is as default.
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>
2017-02-13 11:39:02 -08:00
Andrew Boie
9249f876a9 xtensa: cleanup fatal error handling
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>
2017-02-13 11:39:02 -08:00
Andrew Boie
ceebd823e7 legacy: work around XCC issue in MDEF threads
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>
2017-02-13 11:39:02 -08:00
Andrew Boie
dec83a7ac2 xcc: add ccache support
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>
2017-02-13 11:39:02 -08:00
Mazen NEIFER
44a98fb5fd Xtensa port: Fixed defintion of MAX_HEAP_SIZE, thus, compilation of new_lib.
Xtensa linker script defines _heap_sentry which helps computing the heap size.

Change-Id: Ic35db3c98aaaebe575370fb5479de1a58e6e441e
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 11:39:02 -08:00
Andrew Boie
a95d524328 xt-run: don't leave dead emulator processes lying around
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>
2017-02-13 11:39:02 -08:00
Andrew Boie
eb50958266 xt-sim: add support for 'make debug'
Change-Id: I60b64c6b8c83e1e1c49d8cb2c5f857faee88a7a0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:01 -08:00
Mazen NEIFER
b06115aa7c Xtensa port: Fixed memory corruption in interrupt handler exit function.
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>
2017-02-13 11:39:01 -08:00
Andrew Boie
46c7275831 REVERTME: disable xip test on xtensa
https://jira.zephyrproject.org/browse/ZEP-1676

Change-Id: I5570031479de5b1d1859876c9155bd1fd70664a1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 11:39:01 -08:00
Mazen NEIFER
8e3b86fe0a Xtensa port: Connect Xtensa timer to tick IRQ in legacy test_context.
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>
2017-02-13 08:04:27 -08:00
Mazen NEIFER
a6746c83ba Xtensa port: Removed unsupported c++ flags cuasing xt-c++ to throw an error.
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>
2017-02-13 08:04:27 -08:00
Mazen NEIFER
884005673c Xtensa port: Set Swap function result to -EAGAIN.
Change-Id: I70a651012d5da873c98f6b13ada5e80e67e18e0c
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER
0cbf12489e Xtensa port: xt*-run requires options to be passed before file to be ran.
If passed after the file they are just ignored silently!

Change-Id: Ic9b04c3023e4d312382850fa5e1b5ae4ef555856
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-02-13 08:04:27 -08:00
Mazen NEIFER
51efd6d4dc Xtensa port: Moved coprocessor stack area on bottom of stack, just after TCS.
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>
2017-02-13 08:04:27 -08:00
Mazen NEIFER
ef098bf410 Xtensa port: Restore interrupted context the same way as premption resume.
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>
2017-02-13 08:04:27 -08:00
Mazen NEIFER
b978c70338 Xtensa port: Removed duplicate code and fixed update of current thread pointer.
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>
2017-02-13 08:04:27 -08:00
Mazen NEIFER
8f1dd3a6e5 sanitycheck: Fixed displayed log when current directory is a symbolic link.
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>
2017-02-13 08:04:27 -08:00