Author: mcayland Date: Mon Jan 7 13:57:56 2013 New Revision: 1084 URL: http://tracker.coreboot.org/trac/openbios/changeset/1084
Log: Ignore any attempts to emit a character to stdout when stdout is set to 0.
When booting in standard (non-verbose) mode, BootX sets the stdout package handle to zero to suppress output, yet still continues to invoke the underlying emit word. This would cause OpenBIOS to become confused, often getting stuck in a tight loop.
This patch checks the value of stdout before calling the underlying emit word, and simply returns if stdout is not set.
Based upon an original patch by William Hahne will07c5@gmail.com.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/forth/admin/iocontrol.fs
Modified: trunk/openbios-devel/forth/admin/iocontrol.fs ============================================================================== --- trunk/openbios-devel/forth/admin/iocontrol.fs Mon Jan 7 13:57:54 2013 (r1083) +++ trunk/openbios-devel/forth/admin/iocontrol.fs Mon Jan 7 13:57:56 2013 (r1084) @@ -80,8 +80,11 @@ ;
: io-emit ( char -- ) - io-out-char c! - io-out-char 1 " write" stdout @ $call-method drop + stdout @ if + io-out-char c! + io-out-char 1 " write" stdout @ $call-method + then + drop ;
variable CONSOLE-IN-list