Disable support to local ISR declaration on Espressif SoCs.
Code relocation is not yet supported, causing build fail.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
PMU related functions need to be located in IRAM when sleep
process is triggered, as cache is disabled past a certain point
in the execution of the sleep process.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
esp32-mp.c calls z_sched_ipi() so it needs to include ksched.h,
as it is no longer included via kernel.h after removal of
kernel/internal/smp.h.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Use esp_restart call to guarantee and registered
shutdown handlers will be triggered before rebooting.
This guarantees that subsystems like Wi-Fi and BLE
will deinit correctly.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add ULP Coprocessor board support for C6.
This requires a change in the board qualifier depending on the build
target.
Update esp32c6 overlay and configuration files to the proper name.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Improve naming of the scheduler and call it what it is: simple. Using
'dumb' for the default scheduler algorithm in Zephyr is a bad idea.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Current interrupt allocator is not taking into account
reserved areas. In case of esp32c6, Wi-Fi isn't properly
configured, causing instability or even non-functional feature.
This adds the reserved area ranges for all risc-v based SoC and
unify the slot finding based on interrupt source.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Make sure QIO mode calls are not in flash, otherwise
it will fail during bootloader/flash init.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Make sure chip revision reading returns real value
for some especific chip revision, which is currently
failing.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
When DEBUG_OPTIMIZATION or NO_OPTIMIZATION is
enabled, efuse reading fails during bootloader start.
Move those calls into IRAM area so that reading when
cache is disabled works without any faults.
In HAL side, we need to use low level calls to read
CPU id instead of Zephyr's default one.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fixing multiple things related to psram usage:
- fix conflicting psram0 dts node for all ESP32 SiP and SoC.
- fix dcache and icache area used in psram mapping.
- fix smh spiram heap allocations.
- add `espressif,esp32-psram` compatible to set psram0 size in dts.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
As a result of flash initialization improvements
and fixes, some of the mcuboot linker entries
are no longer necessary.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Currently, each SoC has its own CMakeLists.txt file
to handle esp32 runner.
This PR merged it all in a common file and fixes
missing configuration such as flashing frequency,
mode and size.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Removes the VDDSDIO control during boot for some SoCs.
Only ESP32 allows managing such configuration during
initialization.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Update to support APP_CPU flash access.
- fix the map_rom_segment so it can be used in other context
- add IROM and DROM region size in Kconfig
- update the memory.h by using dts records
- fix the appcpu ld file to support flash
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Update and enable Wi-Fi/Bluetooth software coexistence management.
This improves package handling and is recommended to be used
in high traffic scenarios.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Remove ESP heap from the sources. System heap is default heap.
Use heap adapter layer to configure used heap.
Use MEM_POOL memory request config to Wi-Fi and Bluetooth drivers.
Update the Wi-Fi and BLE memory needs.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Makes the esp_console_init() calling during hardware initialization
conditioned to CONFIG_ESP_CONSOLE
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Add SPIRAM noinit output sections on related targets so the user can
allocate variables with macros EXT_RAM_BSS_ATTR and EXT_RAM_NOINIT_ATTR.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add new fields to the `esp_image_load_header_t`
* provide IROM and DROM fields to fix debugging features
* extend the header to up to 96 Bytes for future use
Signed-off-by: Marek Matej <marek.matej@espressif.com>
This PR includes changes in all Espressif's SoCs to enable
keeping data in RTC memory after deep-sleep.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").
This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.
The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.
Hence this revert.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Build is failing due to wrong calls to appcpu
stall and clock gating. This fixes it
by using proper registers.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Updates for AMP targets
- use common AMP Kconfig
- update APPCPU linker script
- place AMP common area in the reserved space
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Multiple AMP related updates:
- use common AMP Kconfig
- rework the APPCPU linker script
- use MCUboot image format for APPCPU image
- fix multi-processing startup code
Signed-off-by: Marek Matej <marek.matej@espressif.com>
smp_log usage should be only used when SMP is enabled.
This is currently causing build issues after the fix
provided by #82377
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Replaces hard-coded memory addresses and sizes with macros that retrieve
such values from the device tree.
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
This definition is deleted in the follwoing commit;
8233b70
as a part of "cleanup", however this definition is
used by smp_log
Signed-off-by: Arif Balik <arifbalik@outlook.com>
Fixes a wrong placement of a Kconfig which was put into the
wrong file and was bleeding through to every board
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Introduce `CONFIG_RISCV_GP_PURPOSE` choice to make sure that only
one of `CONFIG_RISCV_GP` or `CONFIG_RISCV_CURRENT_VIA_GP` can be
enabled, instead of relying of dependencies.
To do that, introduce a new
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING` that can be selected
by SoC when it implemented global pointer (GP) initialization for
relative addressing in its linker.
`CONFIG_RISCV_GP` will be the default choice when
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING=y`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
FH4X SoC type contains improvements in ROM code that
can save up to 35kB of memory.
Update hal_espressif in order to select proper linker
file based on upon SoC model.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>