This patch expands on the work from the last patchset and makes the following
changes:
- Remove the now-obsolete C console files/functions
- Separate out the video routines into MOL, TCX and VGA paths
- Unify the video descriptor with Forth (instead of having both a C struct
and Forth variables holding video information, have the C struct members
point directly to the relevant dictionary cells)
- Fix any bugs found as a result of the refactoring above
- Add new debug-…
[View More]type and debug-cr words for debugging over the serial port
even when video mode is enabled
- Remove the cls() from the serial console for SPARC32/64
- Fix a decode-string off-by-one property bug
The next stage after this will be to switch the TCX video initialisation path
over to use Forth FCode evaluation in conjunction with a set of new probe
functions.
Mark Cave-Ayland (20):
video_common.c: remove video_open() and video_write() methods
libopenbios: remove the C terminal emulator file console_common.c
packages: rename video.c to molvideo.c ready for MOL-specific video
routines
video_common.c: remove manual screen clear since fb8-erase-screen
does this now
video_common.c: move startup_splash() and refresh_palette() to
packages/molvideo.c
video_common.c: now fill_rect() is no longer called directly, merge
it into the video_fill_rect()
video_common.c: remove video_scroll1() and draw_pixel() as they are
no longer needed
video_common.c: rename get_color() and set_color() functions
video_common.c: Move osi_fb_info_t struct contents directly into the
video_info struct
video_common.c: unify the video_info structure with Forth
video_common.c: split video setup routines into setup_video()
video_common.c: remove the video_get_res() function
video_common.c: move colour palette code into individual devices
sbus.c: fix TCX24 initialisation
video_common.c: fix 32-bit display modes on 64-bit architectures
video_common.c: remove init_video() function
console: remove libopenbios/console.h
bootstrap.fs: add debug-type and debug-cr words
SPARC: remove cls() from the console startup
property.fs: fix off-by-one error in decode-string
openbios-devel/arch/sparc32/boot.h | 3 -
openbios-devel/arch/sparc32/console.c | 36 +--
openbios-devel/arch/sparc32/openbios.c | 4 +-
openbios-devel/arch/sparc64/console.c | 12 -
openbios-devel/arch/sparc64/openbios.c | 2 -
openbios-devel/arch/x86/openbios.c | 8 +-
openbios-devel/config/scripts/switch-arch | 4 +
openbios-devel/drivers/sbus.c | 13 +
openbios-devel/drivers/vga_vbe.c | 87 +++---
openbios-devel/forth/bootstrap/bootstrap.fs | 2 +
openbios-devel/forth/device/display.fs | 38 ++-
openbios-devel/forth/device/property.fs | 2 +-
openbios-devel/include/arch/sparc32/io.h | 7 +
openbios-devel/include/drivers/drivers.h | 1 +
openbios-devel/include/libopenbios/console.h | 9 -
openbios-devel/include/libopenbios/video.h | 48 +--
openbios-devel/libopenbios/build.xml | 1 -
openbios-devel/libopenbios/console_common.c | 416 --------------------------
openbios-devel/libopenbios/video_common.c | 377 +++++++----------------
openbios-devel/packages/build.xml | 2 +-
openbios-devel/packages/molvideo.c | 172 +++++++++++
openbios-devel/packages/video.c | 90 ------
22 files changed, 442 insertions(+), 892 deletions(-)
delete mode 100644 openbios-devel/include/libopenbios/console.h
delete mode 100644 openbios-devel/libopenbios/console_common.c
create mode 100644 openbios-devel/packages/molvideo.c
delete mode 100644 openbios-devel/packages/video.c
--
1.7.10.4
[View Less]
Author: mcayland
Date: Sun Jun 9 14:25:36 2013
New Revision: 1153
URL: http://tracker.coreboot.org/trac/openbios/changeset/1153
Log:
terminal.fs: Fix CSI n;mH and CSI n;mf control sequences.
Fix an off-by-one error in the lines/columns calculations and also ensure that
we correctly interpret control sequences when not all of the optional
parameters are present.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/terminal.fs
…
[View More]
Modified: trunk/openbios-devel/forth/device/terminal.fs
==============================================================================
--- trunk/openbios-devel/forth/device/terminal.fs Sun Jun 9 14:25:33 2013 (r1152)
+++ trunk/openbios-devel/forth/device/terminal.fs Sun Jun 9 14:25:36 2013 (r1153)
@@ -97,17 +97,39 @@
endof
ascii f of
2 (esc-number)
- 2 = if
- #columns 1- min to column#
- #lines 1- min to line#
- then
+ case
+ 2 of
+ 1- #columns 1- min to column#
+ 1- #lines 1- min to line#
+ endof
+ 1 of
+ 0 to column#
+ 1- #lines 1- min to line#
+ endof
+ 0 of
+ 0 to column#
+ 0 to line#
+ drop
+ endof
+ endcase
endof
ascii H of
- 2 (esc-number)
- 2 = if
- #columns 1- min to column#
- #lines 1- min to line#
- then
+ 2 (esc-number)
+ case
+ 2 of
+ 1- #columns 1- min to column#
+ 1- #lines 1- min to line#
+ endof
+ 1 of
+ 0 to column#
+ 1- #lines 1- min to line#
+ endof
+ 0 of
+ 0 to column#
+ 0 to line#
+ drop
+ endof
+ endcase
endof
ascii J of
0 to (escseq)
[View Less]
Author: mcayland
Date: Sun Jun 9 14:25:33 2013
New Revision: 1152
URL: http://tracker.coreboot.org/trac/openbios/changeset/1152
Log:
terminal.fs: handle all cursor positioning within the terminal package.
Currently the column positioning is handled by the framebuffer code in
display.fs where it shouldn't really be. This also fixes a crash bug when
window-top is set and a line wraps onto the line beneath it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
…
[View More] trunk/openbios-devel/forth/device/display.fs
trunk/openbios-devel/forth/device/terminal.fs
Modified: trunk/openbios-devel/forth/device/display.fs
==============================================================================
--- trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:30 2013 (r1151)
+++ trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:33 2013 (r1152)
@@ -210,20 +210,6 @@
swap
then
fb8-blitmask
- \ now advance the position
- column# 1+
- dup #columns = if
- drop 0 to column#
- line# 1+
- dup #lines >= if
- line#
- 0 to line#
- 1 delete-lines
- then
- to line#
- else
- to column#
- then
;
: fb8-reset-screen ( -- )
Modified: trunk/openbios-devel/forth/device/terminal.fs
==============================================================================
--- trunk/openbios-devel/forth/device/terminal.fs Sun Jun 9 14:25:30 2013 (r1151)
+++ trunk/openbios-devel/forth/device/terminal.fs Sun Jun 9 14:25:33 2013 (r1152)
@@ -229,12 +229,13 @@
then
endof
a of \ LF
- line# 1+ to line# 0 to column#
+ line# 1+ to line#
+ 0 to column#
line# #lines >= if
- line# 1-
0 to line#
1 delete-lines
- to line#
+ #lines 1- to line#
+ toggle-cursor exit
then
endof
b of \ VT
@@ -253,7 +254,21 @@
1b (sequence) c!
1 to (escseq)
endof
+
+ \ draw character and advance position
+ column# #columns >= if
+ 0 to column#
+ line# 1+ to line#
+ line# #lines >= if
+ 0 to line#
+ 1 delete-lines
+ #lines 1- to line#
+ then
+ then
+
dup draw-character
+ column# 1+ to column#
+
endcase
toggle-cursor
;
[View Less]