zephyr/include
Marti Bolivar f4c3163d3b arch: riscv32: provide a general mechanism for saving SoC context
RISC-V permits myriad extensions to the ISA, any of which may imply
additional context that must be saved and restored on ISR entry and
exit. The current in-tree example is the Pulpino core, which has extra
registers used by ISA extensions for running loops that shouldn't get
clobbered by an ISR.

This is currently supported by including pulpino-specific definitions
in the generic architecture code. This works, but it's a bit inelegant
and is something of a layering violation. A more generic mechanism is
required to support other RISC-V SoCs with similar requirements
without cluttering the arch code too much.

Provide that by extending the semantics of the existing
CONFIG_RISCV_SOC_CONTEXT_SAVE option to allow other SoCs to allocate
space for saving and restoring their own state, promoting the
currently pulpino-specific __soc_save_context / __soc_restore_context
routines to a RISC-V arch API.

The cost of making this generic is two more instructions in each ISR
to pass the SoC specific context to these routines in a0 rather than
just assuming the stack points to the right place. This is minimal,
and should have been done anyway to keep with the ABI.

As a first (and currently only in-tree) customer, convert the Pulpino
SoC code to this new mechanism.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-12-04 22:54:23 -05:00
..
app_memory subsys: app_memory: Fixed the size calculation for power of 2 MPUs 2018-09-20 11:25:53 -04:00
arch arch: riscv32: provide a general mechanism for saving SoC context 2018-12-04 22:54:23 -05:00
audio headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
bluetooth bluetooth: Updated comment in conn.h to clarify CB PoV 2018-11-29 10:36:11 +02:00
cmsis_rtos_v1 headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
crypto headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
debug kernel: Using boolean types for boolean constants 2018-09-28 06:28:41 +05:30
dfu headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
display doc: fix misspellings in doxygen comments 2018-11-02 17:58:29 -04:00
drivers usb: add SoF event 2018-11-23 09:18:41 -05:00
dt-bindings gpio: remove unused GPIO_INT_CLOCK_SYNC flag 2018-10-03 08:23:24 -05:00
fs headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
linker arch: arm: Add symbol for flash used 2018-12-04 14:07:59 +01:00
logging logging: Add network backend 2018-12-04 15:55:53 -05:00
mgmt mgmt: Add function to unregister GATT service 2018-11-07 14:35:22 +02:00
misc misc: rb: Make an evaluation a boolean expression 2018-11-30 08:05:11 -08:00
net net: gptp: Replace calls to power function with pre-computed values 2018-12-04 15:05:36 +02:00
nvs headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
posix lib: posix: fs: Convert to use generic fdtable 2018-11-04 22:04:11 +01:00
random headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
settings headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
shell shell: Refactor RTT backend 2018-12-04 16:24:44 -05:00
toolchain toolchain: xcc: Builtin overflow functions return boolean 2018-11-30 08:05:11 -08:00
usb usb: hid: implement idle rate 2018-12-04 15:58:19 -05:00
zephyr headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
adc.h include: adc: Fix async ADC API documentation 2018-12-04 15:52:18 -05:00
aio_comparator.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
atomic.h atomic: Change boolean functions to return bool 2018-11-30 08:05:11 -08:00
base64.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
cache.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
can.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
clock_control.h kernel: Using boolean expression on ASSERT macros 2018-09-28 06:28:41 +05:30
console.h subsys: console: Split tty definitions into tty.h, to form its own API 2018-11-30 08:05:40 -08:00
counter.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
crc.h crc: move all crc APIs into one header 2018-12-04 08:52:46 -06:00
crc8.h crc: deprecate old headers and issue warning when used 2018-12-04 08:52:46 -06:00
crc16.h crc: move all crc APIs into one header 2018-12-04 08:52:46 -06:00
crc32.h crc: deprecate old headers and issue warning when used 2018-12-04 08:52:46 -06:00
device.h kernel: add note in device.h 2018-12-03 11:32:58 -08:00
disk_access.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
display.h doc: Added generic display interface to API doc 2018-10-31 08:41:27 -04:00
dma.h c++: convert implicit conversion to explicit ones in header files 2018-11-16 15:18:36 -05:00
entropy.h drivers: entropy: Use likely()/unlikely() macros to speed up the API 2018-10-30 11:16:34 +01:00
exc_handle.h kernel: Fix type of Z_EXC_HANDLE 2018-11-16 09:18:27 -08:00
fcb.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
flash.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
flash_map.h subsys: storage: flash_map: add API for check flash driver support 2018-09-27 16:24:21 +02:00
fs.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
gna.h drivers: intel_gna: Driver for Intel GNA 2018-11-08 17:08:19 -05:00
gpio.h gpio: Remove deprecated macros 2018-10-02 12:50:56 -05:00
i2c.h drivers: i2c: remove deprecated dev_config struct 2018-11-01 13:40:26 +01:00
i2s.h i2s: add i2s_configure() as a system call 2018-11-15 16:20:36 -05:00
init.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ipm.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
irq.h kernel: add dynamic interrupt API 2018-11-10 11:01:22 -05:00
irq_nextlevel.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
irq_offload.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
json.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
kernel.h kernel: Make boolean function return bool 2018-11-30 08:05:11 -08:00
kernel_includes.h kernel.h: Header hygine, move clock/timer handling 2018-10-16 15:03:10 -04:00
kernel_version.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
led.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
led_strip.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
pinmux.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
power.h power: Move application level API's to public header 2018-11-26 18:38:40 -08:00
ptp_clock.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
pwm.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ring_buffer.h lib: ring_buffer: add raw byte access mode 2018-10-09 13:58:44 -04:00
rtc.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sched_priq.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sensor.h drivers: sensors: remove deprecated enum values 2018-10-30 15:28:41 -05:00
shared_irq.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
spi.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
spinlock.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
stats.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sw_isr_table.h arch: common: add function for updating IRQ table 2018-11-10 11:01:22 -05:00
sys_clock.h kernel: Checkpatch fixups 2018-10-16 15:03:10 -04:00
sys_io.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
syscall.h syscall: Return bool in a boolean function 2018-11-30 08:05:11 -08:00
toolchain.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
tracing.h debug: tracing: Add CPU stats module 2018-11-30 11:01:32 -08:00
tty.h subsys: console: Split tty definitions into tty.h, to form its own API 2018-11-30 08:05:40 -08:00
uart.h serial: Change poll_out signature 2018-11-29 10:18:59 -08:00
watchdog.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
zephyr.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00