RTEMS | Review all uart/console driver set_attributes() for B0 handling (#5558)

SHIVAM DEOLANKAR (@D3athSkulll) gitlab at rtems.org
Sat Apr 25 02:34:09 UTC 2026




SHIVAM DEOLANKAR commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5558#note_149042


Inspected the bsps/powerpc/ . Only the shared file needs a fix rest of the bsps here have it implemented in the core logic in one or the other way.

Reviewed PowerPC shared console driver. `conSetAttr()` does not guard against baud rate 0 and passes it to `BSP_uart_set_baud()`, which may result in divide-by-zero internally. Added explicit check to reject baud rate 0.

\_______________________________________________________________________\_

Reviewed `m5xx_uart_setAttributes()` for  **powerpc/ss555**. Baud-dependent calculations are guarded with `if (baud > 0)`, ensuring no divide-by-zero occurs. B0 is safely ignored. No changes required.

Same is the case for console.c for powerpc/gen5200. It is handled.

The files console-linflex.c and console-esci.c for **powerpc/mpc55xxevb.**  The case is handled.

Also reviewing tqm8xx SCC driver . It explicitly handles B0 via input/output speed logic and rejects zero baud with a runtime check before use. This prevents divide-by-zero and aligns with expected behavior. No changes required.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5558#note_149042
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/20260425/20ae442d/attachment-0001.htm>


More information about the bugs mailing list