Author: mcayland
Date: Sat Jul 27 12:15:08 2013
New Revision: 1189
URL: http://tracker.coreboot.org/trac/openbios/changeset/1189
Log:
bootstrap.fs: add debug-type and debug-cr words
These words always output to the debug (serial) port even if video mode is
enabled. This makes debugging the video routines much easier when starting
QEMU with the -serial stdio option.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/bootstrap/bootstrap.fs
Modified: trunk/openbios-devel/forth/bootstrap/bootstrap.fs
==============================================================================
--- trunk/openbios-devel/forth/bootstrap/bootstrap.fs Sat Jul 27 12:15:05 2013 (r1188)
+++ trunk/openbios-devel/forth/bootstrap/bootstrap.fs Sat Jul 27 12:15:08 2013 (r1189)
@@ -660,6 +660,7 @@
\ : type 0 do count emit loop drop ;
+: debug-type bounds ?do i c@ (emit) loop ;
\
\ 7.3.4.1 Text Input
@@ -863,6 +864,7 @@
\
: cr linefeed emit ;
+: debug-cr linefeed (emit) ;
: (cr carret emit ;
: space bl emit ;
: spaces 0 ?do space loop ;
Author: mcayland
Date: Sat Jul 27 12:14:53 2013
New Revision: 1185
URL: http://tracker.coreboot.org/trac/openbios/changeset/1185
Log:
sbus.c: fix TCX24 initialisation
Even though we boot in 24-bit enabled mode, OpenBIOS only uses the 8-bit
framebuffer. Hence we need to override the depth/linebytes obtained from
QEMU to force the graphics subsystem into 8-bit mode, which was what seems
to have been happening before this patch series.
Note: it seems strange that we have to update the package linebytes
property too, however Debian etch freezes if we don't set it to match the
8-bit framebuffer even though it correctly switches to 24-bit mode.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/drivers/sbus.c
Modified: trunk/openbios-devel/drivers/sbus.c
==============================================================================
--- trunk/openbios-devel/drivers/sbus.c Sat Jul 27 12:14:50 2013 (r1184)
+++ trunk/openbios-devel/drivers/sbus.c Sat Jul 27 12:14:53 2013 (r1185)
@@ -17,6 +17,7 @@
#include "libc/vsprintf.h"
#include "drivers/drivers.h"
#include "libopenbios/ofmem.h"
+#include "libopenbios/video.h"
#define SBUS_REGS 0x28
#define SBUS_SLOTS 16
@@ -329,6 +330,17 @@
fword("property");
}
+ /* Even with a 24-bit enabled TCX card, the control plane is
+ used in 8-bit mode. So force the video subsystem into 8-bit
+ mode before initialisation. */
+ if (graphic_depth == 24) {
+ VIDEO_DICT_VALUE(video.depth) = 8;
+ VIDEO_DICT_VALUE(video.rb) = VIDEO_DICT_VALUE(video.w);
+
+ chosen = get_cur_dev();
+ set_int_property(chosen, "linebytes", VIDEO_DICT_VALUE(video.rb));
+ }
+
bind_func("hw-set-color", tcx_hw_set_color);
feval("['] qemu-tcx-driver-init is-install");