rosco-m68k / rosco_m68k

Design, documentation and software for the Really Old School Computer (M68K)
https://rosco-m68k.com
Other
154 stars 31 forks source link

RX Error Handler does not handle stack correctly #4

Closed roscopeco closed 4 years ago

roscopeco commented 5 years ago

In the RX_ERROR_HANDLER: routine (in /firmware/rosco_m68k_v1/base_servers/serial_isr.S), the arguments passed to the C function handleRxError are not correctly cleaned up (required since -mrtd is not used in this codebase). This will cause the registers to be 'restored' to incorrect value and probably lead to a crash.

Need to look in to the GCC M68K ABI to see how these (byte-sized) arguments should be properly passed (suspect as a uint32) and then make sure they're cleaned up properly after the function call.

roscopeco commented 4 years ago

Obsolete, won't do.