Restore partition.h formatting to match upstream and keep this PR\nfocused on board_boot_image changes only.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Rework board_boot_image() to use a fixed handoff layout instead of heap\nallocation in the final chain-boot path.\n\n- validate load-header entry and segment placement against reserved regions\n- reserve top DRAM area for handoff args + new stack\n- reserve top IRAM area for a copied boot stub\n- map segments via bootloader_mmap/munmap and copy RTC segments before handoff\n- jump through copied IRAM stub to perform IRAM/DRAM final copy and branch\n to the new entry point
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Use BIOC_PARTINFO to resolve the selected slot flash offset and load\nsegments via bootloader_mmap()/bootloader_munmap() rather than\npreloading all segments into heap buffers.\n\nKeep a minimal RTC handoff stage for the final DRAM copy and entry\njump to avoid chain-boot self-overwrite while reducing memory usage.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Build workflow run 22017418819 failed in Linux (sim-02) while downloading the minmea archive:\n\n End-of-central-directory signature not found\n\nThis retries CI without source changes because the failure is external and non-deterministic.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Document that the ESP32 DevKitC mcuboot_nsh flow invokes
board_boot_image() through BOARDIOC_BOOT_IMAGE and add a reference to
the MCUboot application documentation for generic boot flow details.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Preload RAM sections to temporary buffers and perform the final copy from
RTC fast memory before jumping to the new image entry point. Use a dedicated
handoff stack and overlap checks to avoid self-overwrite during chain boot.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
The previous Build workflow failed in Linux (arm64-01) while downloading
argtable3 with:
gzip: stdin: not in gzip format
This appears to be a transient upstream/network artifact fetch issue, so this
commit retriggers CI without source changes.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Drop the temporary OTA_IMG_GET_OFFSET extension from the partition API.
After removing ROM remap from board_boot_image(), this ioctl is no longer
used by the boot path, so keeping it only increases PR scope without benefit.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
For location-fixed MCUboot images, ROM mapping is handled by image\nstartup. board_boot_image only needs to load RAM sections and jump to\nentry.\n\nDrop the extra ROM remap/cache handling in the IRAM stub and remove\npartition-offset handling that is no longer used in this flow.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
board_boot_image chain-boots directly to the selected slot and does not go
through ROM bootloader section loading. Load IRAM/DRAM/LP RTC sections
from the image load header before jumping, and keep ROM remap in the
IRAM stub for non-primary-slot boot.
Also include the required loader/cache headers so BOARDCTL_BOOT_IMAGE
builds cleanly when this file is enabled.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Read the MCUboot-Espressif load header at hdr_size and use it to populate entry point plus IROM/DROM mapping parameters.
This replaces the incorrect esp_image_header_t parsing path in board_boot_image() for this flow and aligns with the image layout used by MCUboot/nxboot on ESP32.
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
This commit fixes the style issues in the ESP32 boot image implementation:
- Reset esp32_partition.c to upstream master to fix extensive formatting issues
- Add minimal OTA_IMG_GET_OFFSET ioctl case with correct NuttX style
- esp32_boot_image.c and partition.h already fixed in previous commits
Signed-off-by: Aviral Garg <aviral.garg.2023@gmail.com>
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Fix coding style issues in esp32_boot_image.c reported by checkpatch.sh and nxstyle, including brace alignment and blank line usage.
Signed-off-by: Aviral Garg <aviral.garg.2023@gmail.com>
This commit adds the board_boot_image() implementation for ESP32, enabling support for MCUboot and nxboot bootloaders. It includes parsing the image header and setting up the necessary MMU mappings.
Signed-off-by: Aviral Garg <aviral.garg.2023@gmail.com>
- Add support for the MR-NAVQ95 which is an open-source development
board designed for mobile robotics applications.
- Utilizes the NXP i.MX95 processor M7 core
- Configurations:
'nsh' A minimal configuration that only enables nsh shell
on a UART
'rpmsg' This configuration is similar to nsh but in addition
it offers the Remote Processing Messaging (RPMsg) service to
enable heterogeneous inter-core communication.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Improve checks for the position outside of the LCD's area. Fix the input
when possible.
Slightly improve the documentation.
Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
Use size_t instead of unsigned int for 'mask' to avoid address truncation,
especially when memory addresses exceed 32 bits.
Signed-off-by: liang.huang <liang.huang@houmo.ai>
Enabling MPU will fix imx95-evk:rpmsg by making rsc-table and vrings
regions non-cachable. Since the rewrite of RpMsg these regions are not
invalidated anymore.
Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
Fix incorrect flag handling and string escaping in the `make host_info`
diagnostic target.
Previously, CFLAGS, CXXFLAGS, and LDFLAGS were passed in a form that caused
improper splitting and quoting, which resulted in malformed output and
incorrectly escaped configuration values such as CONFIG_APPS_DIR.
This change ensures that:
- Compilation flags are passed as proper shell strings
- Flags are split correctly using shlex
- Configuration values are escaped exactly once when generating sysinfo.h
- Parsed output matches the contents of the .config file
This change affects diagnostic output only and does not modify the NuttX
build process or generated binaries.
Signed-off-by: Adwait Godbole <adwaitngodbole@gmail.com>
When the VIRTIO_RPMSG_F_CPUNAME feature is not negotiated, the driver
previously would crash due to DEBUGASSERT. This commit adds support
for a fallback mechanism:
1. Add rpmsg_virtio_probe_cpuname() API that accepts an optional cpuname
parameter to be used when VIRTIO_RPMSG_F_CPUNAME is not available.
2. Modify rptun driver to pass the cpuname from rptun device config
to rpmsg_virtio_probe_cpuname().
3. Refactor rptun device register/unregister to prioritize RPMSG device
handling before other virtio device types.
This ensures the system works correctly in scenarios where the remote
side does not support the VIRTIO_RPMSG_F_CPUNAME feature.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
With CONFIG_PAGING enabled and the RISC-V SV39 MMU active, the page fault
handler incorrectly tracked page table levels: `ptprev` pointed to the L1
page table while `ptlevel` indicated L2. This inconsistency caused faulty
virtual address resolution.
This commit fixes the traversal logic to ensure consistent level tracking
across all three page table levels (L1–L3), enabling reliable page fault
handling and on-demand paging.
Additional changes:
- Set PGT_L3_SIZE to 2048 to enable mapping up to 8MB of address space.
- Update knsh_paging config to avoid crashes caused by excessive memory
alignment requirements.
- Add knsh64_paging config to verify this commit works as expected.
Signed-off-by: liang.huang <liang.huang@houmo.ai>
This commit refactors nxsched_waitpid() by extracting the core waiting logic
into a separate waittcb() helper function. This change significantly reduces
the cyclomatic complexity of the main function while preserving all original
functionality and improving code maintainability with better separation of
concerns between initialization and wait handling logic.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit eliminates the goto statement in nxsched_waitpid() function to
improve code quality metrics compliance. The control flow has been restructured
using nested if-else statements to achieve identical functionality while
maintaining MISRA/HIS coding standard compliance and improving code readability.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Verified on qemu-armv7a and mps2-an500 platforms with
CoreMark benchmark and system profiling examples
Signed-off-by: yinshengkai <yinshengkai@bytedance.com>
Add support for ARMv6-M and ARMv8-M Baseline architectures
(Cortex-M0/M0+/M23) in the mcount profiling function. These cores
only support limited Thumb-1 instruction set and require different
assembly instructions compared to ARMv7-M and higher.
Changes:
- Use MOVS+BICS instead of BIC for bit clearing on M0/M23
- Separate register restore for limited push/pop instructions
- Use BX instead of direct POP to PC on M0/M23
Signed-off-by: yinshengkai <yinshengkai@bytedance.com>
Add lib_bsdmemset.c from newlib (Red Hat BSD license) which provides
an optimized memset using word-aligned writes and loop unrolling for
improved performance on larger buffers.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
1. remove_item It needs to use the full path to exclude the file, otherwise the exclusion will fail
2. No include path was added, resulting in the header file not being found
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>