RTEMS | bsps/riscv: Checked conditions for FDT pointer (!1057)
Gedare Bloom (@gedare)
gitlab at rtems.org
Tue Feb 10 18:34:31 UTC 2026
Gedare Bloom started a new discussion on bsps/shared/start/bsp-fdt.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1057#note_142345
> #ifdef BSP_DTB_IS_SUPPORTED
> - return system_dtb;
> + bsp_fdt = system_dtb;
> #else
> - return &bsp_fdt_blob[0];
> + bsp_fdt = &bsp_fdt_blob[0];
> #endif
> +
> +if (bsp_fdt == NULL) {
> + rtems_fatal(RTEMS_FATAL_SOURCE_BSP, 0);
> +}
> +
> +if (((uintptr_t)bsp_fdt & 0x7) != 0) {
> + rtems_fatal(RTEMS_FATAL_SOURCE_BSP, FDT_ERR_ALIGNMENT);
> +}
> +int err = fdt_check_header(bsp_fdt);
declare all variables at the start of the block
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1057#note_142345
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260210/65363b07/attachment-0001.htm>
More information about the bugs
mailing list