Commit Graph

20 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 47fba91367 soc: riscv: telink_b91: add missing init.h, devicetree.h
File was including device.h for nothing, it needs init.h and
devicetree.h instead.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-30 11:51:57 +02:00
Yong Cong Sin 84b86d9b0c soc: riscv: Add ability to use custom sys_io functions
Add Kconfig RISCV_SOC_HAS_CUSTOM_SYS_IO symbol so that a riscv
SoC can set to specify that it has a custom implementation for
sys_io functions.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-26 09:43:59 +02:00
Jimmy Zheng 4f26203b59 soc: riscv: andes_v5: remove redundant CONFIG_CACHE_ENABLE
Replace redundant CONFIG_CACHE_ENABLE by generic Kconfig CONFIG_ICACHE,
CONFIG_DCACHE.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng e6b1251b0d soc: riscv: andes_v5: enlarge TEST_EXTRA_STACK_SIZE
Enlarge TEST_EXTRA_STACK_SIZE for AE350 RV64 bitstream.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng b6122c358a soc: riscv: andes_v5: add Andes I/O Coherence Port option
Add CONFIG_SOC_ANDES_V5_IOCP to indicate Andes I/O Coherence Port handle
cache coherency between cache and external non-caching master, such as DMA
controller.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng a1665cbf1c soc: riscv: andes_v5: refine Andes L2 cache
Refine source code and flush all I/D-Cache before update L2 cache register.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng 65edd8433c soc: riscv: andes_v5: add Andes EXEC.IT option
Andes EXEC.IT (Execution on Instruction Table) is supported by Andes
toolchain only. Andes toolchain will replaces suitable 32-bit instructions
with the 16-bit "exec.it <INDEX>" in which <INDEX> points to a
corresponding 32-bit instruction in look up table.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng 004e00a0bd soc: riscv: andes_v5: add RV32E_CPU option
Add CONFIG_RV32E_CPU for AE350 platform integrated with Andes RV32E core,
such as N22, D23 core.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng d5c4bd6830 soc: riscv: andes_v5: support RISC-V C extension
Enable RISC-V C extension for Andes core.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng 9c7f0376b8 soc: riscv: andes_v5: support PMP and USERSPACE
Enable PMP and set PMP granularity to 8 for most of ae350 bitstream.
This commit also make MPU_ALIGN() apply to __rom_region_end in XIP system.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng bf0e01bee2 soc: riscv: andes_v5: refine Andes PMA
Refine PMA driver and define MPU_ALIGN() to PMA granularity in
RAM_SECTIONS, otherwise MPU_ALIGN() is defined to PMP granularity.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng de1cd06294 soc: riscv: andes_v5: update ae350 linker.ld
Synchronize ae350 linker.ld with riscv generic linker.ld and workaround
kernel object address may be 0x0 in XIP system.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Tim-Marek Thomas 5d75940ae3 boards: riscv: neorv32: Updates compatibility to neoverse v1.8.6
With NEORV32 v1.8.2 the UART module was changed to a simpler
implementation. This updates the UART driver for the open-source NEORV32
RISC-V compatible processor system (SOC).

Signed-off-by: Tim-Marek Thomas <thomas@sra.uni-hannover.de>
2023-07-11 18:19:55 +00:00
Daniel Mangum 43b057a7ce soc: neorv32: Fix spelling in reset.S
Fixes minor misspelling of instruction in the neorv32 reset.S.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2023-07-09 17:50:09 +00:00
Keith Packard 710422ec5e include/zephyr: Fix linker scripts to define _end after all static RAM data
The Zephyr linker scripts have inconsistent ordering of various chunks of
data which lands in RAM at runtime. This leads to the value of _end not
being consistently defined as the maximum address of static variables used
in the application.

Create a helper linker fragment, zephyr/linker/ram-end.ld, which can be
included after the last possible definition of RAM data, that consistently
sets _image_ram_end, _end and z_mapped_end.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-28 08:41:02 +00:00
Manojkumar Subramaniam 6e887e3f61 soc: riscv: Add initial support for Efinix Sapphire SoC
- It's a riscv privilege spec SoC

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-06-27 12:09:57 +00:00
Carlo Caione fc480c9382 riscv: privileged: Add support for CLIC vectored mode
Zephyr currently only supports CLINT direct mode and CLINT vectored
mode. Add support for CLIC vectored mode as well.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-17 07:48:52 -04:00
Carlo Caione 6160383ec7 riscv: Rename RISCV_MTVEC_VECTORED_MODE to RISCV_VECTORED_MODE
Before adding support for the CLIC vectored mode, rename
CONFIG_RISCV_MTVEC_VECTORED_MODE to CONFIG_RISCV_VECTORED_MODE to be
more generic and eventually include also the CLIC vectored mode.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-17 07:48:52 -04:00
Khor Swee Aun 5bf2260e90 soc: riscv: riscv-privileged: INTEL Nios V/g support
Add support for INTEL FPGA Nios V/g RISC-V based Processors.
Also amended SOC_NIOSV_M to use ATOMIC_OPERATIONS_BUILTIN.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-06-17 07:34:05 -04:00
Carlo Caione 8eeb5c992e riscv: Move directory to *-privileged
Because the spec is "privileged" not "privilege".

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-09 11:46:29 -04:00