jetcom / xinu-arm

Xinu arm port, for Raspberry Pi
Other
28 stars 32 forks source link

Fixed uart from randomly stopping #10

Closed kvnallsn closed 11 years ago

kvnallsn commented 11 years ago

The driver for the pl011 uart was never signaling the output semaphore(uartprt->osema) which cause the threads to eventually lock up and stopping outputing/recieving any data. Adding in the signaln calls seems to have fixed this

caltry commented 11 years ago

Looks good to me.

Strangely, XINU keeps track of the number of free bytes in the buffer (uartptr->ocount) and the number of used bytes in the buffer (uartptr->osema) independently. Your change keeps these in sync.

Did you know that signaln() calls the scheduler? Every time you press a key or call putc(), the scheduler runs!

Off to @rememberthe8bit for a final look-through, since this is his component.

DavidDiPaola commented 11 years ago

It looked fine to me. I copied the MIPS's UART code and replaced only the platform-specific parts, so I'm no expert. @caltry very strange behavior. I'm surprised the original routine worked...