fix PGTABLE_SIZE not defined in sama5d4-ek/knsh
Error: common/arm_allocateheap.c:177:11: error: 'PGTABLE_SIZE' undeclared (first use in this function); did you mean 'PGTABLE_L2_SIZE'?
177 | size -= PGTABLE_SIZE * CONFIG_SMP_NCPUS;
| ^~~~~~~~~~~~
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
If smp enabled, mmu default disabled in arm_head.S,
We have to re-enable it in arm_boot per-chip.
Causing knsh-smp failed with user-space memory access
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
As out current design, each cpu manage task mmu table by insert
and erase like-behavior for arm32, have to per-cpu mmu-table when kernel
build.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
As out current design, each cpu manage task mmu table by insert
and erase like-behavior for arm32, have to per-cpu mmu-table when kernel
build.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
If smp enabled, mmu default disabled in arm_head.S,
We have to re-enable it in arm_boot per-chip.
Causing knsh-smp failed with user-space memory access
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
To fix a fpu illegal instruction exception due to fcsr have invalid
rounding-mode, restore fcsr/f0~f31 with a random value from stack because fpu
context is not save into stack when mstatus.fs is clean(not dirty).
The number of save/restore fpu context operations is not equal.
In fact, CONFIG_ARCH_LAZYFPU is a performance optimization mechanism aimed at
minimizing the saving and restoring of FPU registers. In some cases, it
may only need to be saved once but must be restored multiple times.
Therefore, this optimization mechanism dictates that saving cannot be
done on the stack; it must be stored at a fixed location(e.g. task
control block buffer), as the stack requires push/pop operations to be
matched.
In case of that CONFIG_ARCH_LAZYFPU is off, save/restore FPU registers
always into stack to avoid the above issues.
Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
The code used subi instruction to decrement the Y pointer but this
instruction only affects a byte, not a word. Fixed it by using
pre-decrement in the LD instruction instead.
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.
Signed-off-by: Leo Chung <gewalalb@gmail.com>
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.
Signed-off-by: Leo Chung <gewalalb@gmail.com>
Add missing bootloader_enable_qio_mode() function in flash_qio_mode.c when
CONFIG_ESPRESSIF_FLASH_MODE_QIO option is enabled.
Signed-off-by: Leo Chung <gewalalb@gmail.com>
Modify types.h and inttypes.h to use the correct _int32_t and _uint32_t types.
Type is now defined according to recent compiler versions.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This adds new fields to the metadata section used by MCUBoot.
The openocd-esp32 project requires these fields to properly map the
flash segments and enable using SW breakpoints and flash through
openocd-esp32.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This makes units compatible with what Linux uses for SocketCAN bitrate
and allows representing usual Single Wire Can (SAE J2411) usual bitrates
of 33333 and 83333 bps.
Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
This commit bumps common source version for RISC-V-based Espressif
SoCs on NuttX. Specifically, this solves an issue regarding SPI
flash frequency selection on ESP32-C6.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
Add the hardware register definition file for the GPDMA peripheral.
This is necessary to support implementing dma driver in the future.
Also adds skeleton arch dma header that includes the hardware file.
Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
Added menus for usart, I2C, and SPI selection to make the peripheral selection submenu easier to navigate.
Added DMA1 and DMA2 selection options.
Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
Some hardware configurations require bss and data initialization before being called.
Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
Fix nxstyle errors
Adds Kconfig options to select UART6 for the STM32H5, and updates the architecture files accordingly.
Signed-off-by: Tyler Bennett <tbennett@2g-eng.com>
Previously, SIOCSCANBITRATE brought the iterface up to ensure changes
where immediately applied. This was confusing, see
https://lists.apache.org/thread/g8d0m6yp7noywhroby5br4hxt3r4og2c
Now SIOCSCANBITRATE fails is interface is up.
All existing SocketCAN drivers updated.
Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
H5 implementation of functions defined in include/nuttx/progmem.h.
The driver supports a subset of the flash peripheral functions.
- Assumes non-secure memory accesses. Does not check for memory protection mechanisms.
References implementation in arch/arm/src/stm32h7/stm32h743xx_flash.c
This commit disables the esptool's stubs when flashing ESP32-C3
(`CONFIG_ESPRESSIF_ESPTOOLPY_NO_STUB=y`) if the serial/JTAG console
is enabled (`CONFIG_ESPRESSIF_USBSERIAL=y`).
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit fixes a bug on the `usbconsole` defconfigs for
Espressif's RISC-V SoCs when the serial/JTAG is used and the
Kconfig macro `DEBUG_FEATURES` is enabled. This config enables the
`showprogress` macro during start-up. Previously, `riscv_lowputc`
function was used by this macro, but it is not suitable for the
serial/JTAG console. Instead, use the `esp_rom_printf` function
that is suitable for both serial/JTAG and UART consoles.
Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
The alignment of the ctrlreq was correct by luck, and was broken
when the spinlock was added to the structure. In non-smp configurations
spinlock_t is currently 8-bits, causing wrong alignment of the
ctrlreq structure.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.
CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF
Signed-off-by: chao an <anchao.archer@bytedance.com>
If a process causes a fatal error when it's running a system call, the
whole system should crash as the crash originated from the kernel.
Do this by running the PANIC() branch, if task is in syscall.
Signed-off-by: Ville Juven <ville.juven@unikie.com>