Kinsey Moore started a new discussion on 
bsps/aarch64/raspberrypi/start/mailbox.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/915#note_138813

 > +{
 > +    if (((uintptr_t)buffer & (MBOX_BUFFER_ALIGNMENT - 1)) != 0) {
 > +        return RTEMS_INVALID_ADDRESS;
 > +    }
 > +
 > +    memset(buffer, 0, size);
 > +    return RTEMS_SUCCESSFUL;
 > +}
 > +
 > +
 > +
 > +void rpi_mbox_write(uint8_t channel, uint32_t data){
 > +    while(BCM2835_REG(BCM2711_MBOX_STATUS) & BCM2711_MBOX_FULL){
 > +    }
 > +
 > +    BCM2835_REG(BCM2711_MBOX_WRITE) = (data & MBOX_MAIL_DATA_MASK) | 
 > (channel & MBOX_MAIL_CHANNEL_MASK);

Channel should be validated here since allowable values are 0-9, but the input 
value is not an enumeration and can be 0-255.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/915#note_138813
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to