This is to fix issue in [this log](https://github.com/apache/nuttx/actions/runs/9173629303/job/25222879619):
```
Configuration/Tool: esp32c3-generic/twai esp32c6-devkitm/twai esp32c6-devkitc/twai esp32h2-devkit/twai
Error: common/espressif/esp_twai.c:242:7: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
```
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
Search and replace ARCH_BOOT_EL3 with more generic
ARCH_ARM64_EXCEPTION_LEVEL that holds the EL level
in an integer variable.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This provides a capable bootloader that may be run from OCRAM.
The OCRAM contains regions that are always zero, so the linker
file avoids those with best effort.
iMX9 infrastructure expects:
- 0x20480000 (Start of OCRAM, AHAB)
- 0x2049a000 (NuttX or SPL)
- 0x204e0000 (ARM Trustzone, not used)
When started from SD-card, the offsets are:
- 0x1f000 with AHAB
- 0xa000 without AHAB
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
Value 1021, when read from ICC_IAR0_EL1 means:
"The GIC returns this value in response to a read of ICC_IAR0_EL1 or ICC_HPPIR0_EL1 at EL3,
to indicate that the interrupt being acknowledged is one which is expected to be handled at
Non-secure EL1 or EL2. This INTID is only returned when the PE is executing at EL3 using
AArch64 state, or when the PE is executing in AArch32 state in Monitor mode."
When this happens:
- FIQ is fired on group0
- IRQ is pending at group1
So simply check and handle the interrupt. In short, this provides interrupt support for
EL3.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This provides means to run NuttX completely in EL3. This may
be useful with NuttX based bootloaders that are executed from
OCRAM. Instead of SPL/U-boot combo, NuttX may replace SPL
completely.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
By default, submodules are cloned with `--depth=1`. This continues
to be true if `DISABLE_GIT_DEPTH` environment variable is not
defined (and it is not defined by default). But, if defined the
submodules will be fully cloned (without the `--depth` parameter).
The original names are confusing; the symbols' addresses point to the start and end of the
sbi executable ram area. This may also reside in l2lim and not in ddr, depending on the
configuration, and this is defined in the linker script.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
We can save execution time by
inline arm64_fullcontextrestore and arm64_switchcontext
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commits replicates some changes on files that were originally
written for other Espressif SoCs and inspired new implementations.
Eventually, these new implementations were improved and this commit
replicates these changes on the original sources.
Avoid using static mutex and recursive mutex as the resource to be
acquired/release. Instead, create a specific lock for each call if
it does not exist.
It seems like a wrong copy-and-paste from esp32c3.
Actually, internal memory mapping varies among processors.
esp32s3: lightly tested with wamr aot
esp32s2: not tested (i have no hardware access)
The bc022f8cd8 introduces a static way to calculate idle stack
address for risc-v platform. However, it uses the reverse order
to access idle stack, which breaks boards with smp configuration.
Correct the idle stack order of g_cpux_idlestack.
Fixes: bc022f8cd8 ("arch/risc-v: unify idle stack calculation")
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
As all the board allocate idle stack from _ebss. The idle stack
layout is fix and can be computed directly by using _ebss. There
is no need to use g_cpux_idlestack array anymore, remove it.
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
As the stack layout is unified, it is possible to
use a unify formula to calculate the top of idle
stack.
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
chip/s698pm_cpustart.c: In function 's698pm_cpu_boot':
Error: chip/s698pm_cpustart.c:74:17: error: unused variable 'tcb' [-Werror=unused-variable]
struct tcb_s *tcb = this_task();
^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:99: s698pm_cpustart.o] Error 1
make[1]: Target 'libarch.a' not remade because of errors.
make: *** [tools/LibTargets.mk:164: arch/sparc/src/libarch.a] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 370: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
Normalize s698pm-dkit/smp
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Make channels synchronous (i.e. share the same timebase) with the help
of SAMV7_PWMx_CHy_SYNC defines. All the channels share the same
timebase of channel 0, so this channel must be defined too.
Signed-off-by: Stepan Pressl <pressste@fel.cvut.cz>
ESP32 SoC use a static allocated array as idle stack. To fit
the existed idle stack allocation, make idle stack allocated
from ebss for the whole esp32 series.
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
Optimal size of granule is 64B (the dcache line size).
We can use it now as we don't have max. 32 granules limitation anymore.
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
This adds SBI specfication v0.3 based `riscv_sbi_system_reset()` to
support SBI firmware based system reset in kernel mode.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>