jetcom / xinu-arm

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

Raspberry Pi crashes after entering a number of commands #5

Closed DavidDiPaola closed 11 years ago

DavidDiPaola commented 11 years ago

When executing the date command a number of times, or ps 2 times, the Pi will stop printing anything mid-line and crash. This may be a serial issue.

DavidDiPaola commented 11 years ago

I've counted about 1008 characters printed before the system crashes. This is suspiciously similar to the UART output ring buffer's size of 1024 characters.

DavidDiPaola commented 11 years ago

The PL011's uartInterrupt() routine does not seem to be the issue. This was confirmed by turning on the LED at the start of the UART ISR and off at the end. The LED never stayed on even when the system crashed.

In addition, this behavior doesn't seem to be due to any IRQ handler since the above test was repeated using the VIC emulator's IRQ handler routine.

tebrown commented 11 years ago

uartInterrupt() is called by the VIC, so if the LED stays on, doesn't that mean that we lockup/crash in uartInterrupt?

On Mar 5, 2013, at 8:25 PM, rememberthe8bit notifications@github.com wrote:

The PL011's uartInterrupt() routine does not seem to be the issue. This was confirmed by turning on the LED at the start of the UART ISR and off at the end. The LED never stayed on even when the system crashed.

— Reply to this email directly or view it on GitHub.

DavidDiPaola commented 11 years ago

That is correct. Since the LED turned [back] off, the ISR didn't crash.

tebrown commented 11 years ago

Ah.. I misread the original note. I missed the word 'never'. That explains my confusion.

On Mar 7, 2013, at 6:56 PM, rememberthe8bit notifications@github.com wrote:

That is correct. Since the LED turned [back] off, the ISR didn't crash.

— Reply to this email directly or view it on GitHub.

DavidDiPaola commented 11 years ago

It seems that entering characters raises the limit of the number of characters that can be printed before crashing. Or, at least, it can echo more characters than it could just print normally.

jsb2092 commented 11 years ago

Have you run this through the emulator with gdb attached yet to see what happens? I suspect this will make it much easier to track the issue down.

DavidDiPaola commented 11 years ago

I'll build the emulator tonight (now) and see what I find.