zephyr/include
Jean-Paul Etienne cd83e85edc arch: added support for the riscv32 architecture
RISC-V is an open-source instruction set architecture.
Added support for the 32bit version of RISC-V to Zephyr.

1) exceptions/interrupts/faults are handled at the architecture
   level via the __irq_wrapper handler. Context saving/restoring
   of registers can be handled at both architecture and SOC levels.
   If SOC-specific registers need to be saved, SOC level needs to
   provide __soc_save_context and __soc_restore_context functions
   that shall be accounted by the architecture level, when
   corresponding config variable RISCV_SOC_CONTEXT_SAVE is set.

2) As RISC-V architecture does not provide a clear ISA specification
   about interrupt handling, each RISC-V SOC handles it in its own
   way. Hence, at the architecture level, the __irq_wrapper handler
   expects the following functions to be provided by the SOC level:
   __soc_is_irq: to check if the exception is the result of an
                 interrupt or not.
   __soc_handle_irq: handle pending IRQ at SOC level (ex: clear
                     pending IRQ in SOC-specific IRQ register)

3) Thread/task scheduling, as well as IRQ offloading are handled via
   the RISC-V system call ("ecall"), which is also handled via the
   __irq_wrapper handler. The _Swap asm function just calls "ecall"
   to generate an exception.

4) As there is no conventional way of handling CPU power save in
   RISC-V, the default nano_cpu_idle and nano_cpu_atomic_idle
   functions just unlock interrupts and return to the caller, without
   issuing any CPU power saving instruction. Nonetheless, to allow
   SOC-level to implement proper CPU power save, nano_cpu_idle and
   nano_cpu_atomic_idle functions are defined as __weak
   at the architecture level.

Change-Id: I980a161d0009f3f404ad22b226a6229fbb492389
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-01-13 19:52:23 +00:00
..
arch arch: added support for the riscv32 architecture 2017-01-13 19:52:23 +00:00
bluetooth Bluetooth: hci_ecc: Verify LE Generate DHKey command parameters 2017-01-05 08:49:17 +02:00
debug kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
display
drivers clock/stm32: add STM32F107 reset and clock control 2017-01-12 09:46:27 -06:00
fs fs: expose generic ramdisk/flash disk access functions 2016-11-09 02:45:45 +00:00
linker net: Declare a macro to define stacks used by networking 2016-12-02 12:41:14 +02:00
logging kernel: remove dependency on CONFIG_NANO_TIMERS/TIMEOUTS 2017-01-08 18:09:52 +00:00
misc util.h: Add IS_ENABLED() macro for expression-legal ifdef-checking 2017-01-11 23:32:32 +00:00
net net: ieee802154: Expose basic network parameters through net mgmt API 2017-01-06 12:27:01 +01:00
shell shell: move shell to its own subsystem 2016-12-25 19:35:11 +00:00
toolchain arch: added support for the riscv32 architecture 2017-01-13 19:52:23 +00:00
usb usb: Add end-point stall APIs and flow control APIS 2016-11-09 02:45:46 +00:00
adc.h drivers/adc: Make references to driver_api const 2016-10-24 22:22:20 +00:00
aio_comparator.h aio_cmp_qmsi: Add get_pending_int API 2016-11-03 21:30:02 +00:00
atomic.h doc: Various corrections to doxygen info for Kernel APIs 2016-11-16 21:43:16 +00:00
cache.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
clock_control.h drivers/clock_control: Make references to driver_api const 2016-10-24 22:22:21 +00:00
counter.h counter: Fix interface 2016-11-30 14:39:10 +00:00
device.h device: do not set struct as deprecated 2016-12-11 06:36:14 -05:00
disk_access.h include: Add a generic disk interface 2016-11-09 02:45:44 +00:00
dma.h dma.h: add missing includes 2016-11-10 01:04:27 +00:00
eth.h drivers/eth: Make references to driver_api const 2016-10-24 22:22:22 +00:00
flash.h drivers/flash: Make references to driver_api const 2016-10-24 22:22:26 +00:00
fs.h fs: Make API naming adhere to the appropriate namespace 2016-10-31 08:08:10 +02:00
gpio.h gpio: Fix spelling mistake. 2017-01-03 09:30:55 +00:00
i2c.h i2c: Add doxygen markup for internal only definitions. 2016-12-04 12:49:43 +00:00
init.h kernel: deprecate old init levels 2016-11-09 17:59:44 +00:00
ipm.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
irq_offload.h
irq.h doc: Fix up API description for IRQ_CONNECT() 2016-11-18 02:31:33 +00:00
kernel_version.h kernel: Allow SYS_KERNEL_VER_MAJOR(), etc. return full range of values. 2016-10-22 10:04:00 +00:00
kernel.h kernel: profiling: Expose an API call to analyze call stacks 2017-01-11 15:19:18 +00:00
legacy.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
linker-defs.h arch: added support for the riscv32 architecture 2017-01-13 19:52:23 +00:00
linker-tool-gcc.h arch: added support for the riscv32 architecture 2017-01-13 19:52:23 +00:00
linker-tool.h
microkernel.h include: remove old kernel defintions 2016-11-07 11:32:57 -08:00
nanokernel.h include: remove old kernel defintions 2016-11-07 11:32:57 -08:00
pinmux.h drivers/pinmux: Make references to driver_api const 2016-10-24 22:22:24 +00:00
power.h power_mgmt: Rename _sys_soc_resume notification disabling API 2016-11-11 20:40:54 +00:00
pwm.h drivers: pwm: re-design pwm API interfaces 2016-10-31 20:01:04 +00:00
random.h random: Introduce random device API. 2016-12-24 16:40:11 +00:00
rtc.h rtc_qmsi: Add get_pending_int API 2016-11-03 21:30:21 +00:00
section_tags.h arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
sections.h arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
sensor.h sensor: Fix samples that assume incorrect sensor_value type. 2017-01-08 16:16:15 +00:00
shared_irq.h drivers/shared_irq: Make references to driver_api const 2016-10-24 22:22:23 +00:00
spi.h drivers/spi: Make references to driver_api const 2016-10-24 22:22:20 +00:00
sw_isr_table.h nios2: add static interrupt handling code 2016-06-22 16:42:21 +00:00
sys_clock.h doc: Add descriptions for clock-related helper macros 2016-11-18 02:31:35 +00:00
sys_io.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
toolchain.h doc: revert unnamed union/struct workaround in favour of known-issues 2016-07-01 21:53:45 +00:00
uart.h serial: fix up uart_poll_in docstring 2016-11-16 22:57:30 +00:00
watchdog.h drivers/watchdog: Make references to driver_api const. 2016-10-24 22:22:19 +00:00
zephyr.h include: remove old kernel defintions 2016-11-07 11:32:57 -08:00