[SerialICE] New patch to review for serialice: dfb7151 SerialICE: Move dumb screen init

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Mon Aug 20 23:03:52 CEST 2012


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1469

-gerrit

commit dfb71513504e66b8eb4599a56ffbca9ddc5491e8
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Mon Aug 20 23:53:23 2012 +0300

    SerialICE: Move dumb screen init
    
    This is not really part of SerialICE session in anyway.
    
    Change-Id: Ie0fc0058208e720abd309b0145184f9054feb5a9
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 qemu-0.15.x/Makefile.target |  3 +++
 qemu-0.15.x/console.h       |  1 +
 qemu-0.15.x/serialice.c     | 57 +--------------------------------------------
 3 files changed, 5 insertions(+), 56 deletions(-)

diff --git a/qemu-0.15.x/Makefile.target b/qemu-0.15.x/Makefile.target
index 445949d..e1efe50 100644
--- a/qemu-0.15.x/Makefile.target
+++ b/qemu-0.15.x/Makefile.target
@@ -239,6 +239,9 @@ obj-i386-y += pc_piix.o
 obj-i386-$(CONFIG_KVM) += kvmclock.o
 obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
 
+# Dummy VNC output
+obj-i386-y += dumb_screen.o
+
 # shared objects
 obj-ppc-y = ppc.o
 obj-ppc-y += vga.o
diff --git a/qemu-0.15.x/console.h b/qemu-0.15.x/console.h
index 67d1373..3e34577 100644
--- a/qemu-0.15.x/console.h
+++ b/qemu-0.15.x/console.h
@@ -352,6 +352,7 @@ void vga_hw_invalidate(void);
 void vga_hw_screen_dump(const char *filename);
 void vga_hw_text_update(console_ch_t *chardata);
 
+void dumb_screen(void);
 int is_graphic_console(void);
 int is_fixedsize_console(void);
 int text_console_init(QemuOpts *opts, CharDriverState **_chr);
diff --git a/qemu-0.15.x/serialice.c b/qemu-0.15.x/serialice.c
index 5fe5cfb..69568f0 100644
--- a/qemu-0.15.x/serialice.c
+++ b/qemu-0.15.x/serialice.c
@@ -42,11 +42,6 @@
 #include "serialice.h"
 #include "sysemu.h"
 
-#define SERIALICE_BANNER 1
-#if SERIALICE_BANNER
-#include "serialice_banner.h"
-#endif
-
 #define DEFAULT_RAM_SIZE 128
 #define BIOS_FILENAME "bios.bin"
 
@@ -54,56 +49,6 @@ const SerialICE_target *target;
 
 int serialice_active = 0;
 
-static DisplayState *ds;
-static int screen_invalid = 1;
-
-static void serialice_refresh(void *opaque)
-{
-    uint8_t *dest;
-    int bpp, linesize;
-
-    if (!screen_invalid) {
-        return;
-    }
-
-    dest = ds_get_data(ds);
-    bpp = (ds_get_bits_per_pixel(ds) + 7) >> 3;
-    linesize = ds_get_linesize(ds);
-
-    memset(dest, 0x00, linesize * ds_get_height(ds));
-#if SERIALICE_BANNER
-    int x, y;
-    if (bpp == 4) {
-        for (y = 0; y < 240; y++) {
-            for (x = 0; x < 320; x++) {
-                int doff = (y * linesize) + (x * bpp);
-                int soff = (y * (320 * 3)) + (x * 3);
-                dest[doff + 0] = serialice_banner[soff + 2];    // blue
-                dest[doff + 1] = serialice_banner[soff + 1];    // green
-                dest[doff + 2] = serialice_banner[soff + 0];    // red
-            }
-        }
-    } else {
-        printf("Banner enabled and BPP = %d (line size = %d)\n", bpp, linesize);
-    }
-#endif
-
-    dpy_update(ds, 0, 0, ds_get_width(ds), ds_get_height(ds));
-    screen_invalid = 0;
-}
-
-static void serialice_invalidate(void *opaque)
-{
-    screen_invalid = 1;
-}
-
-static void serialice_screen(void)
-{
-    ds = graphic_console_init(serialice_refresh, serialice_invalidate,
-                              NULL, NULL, ds);
-    qemu_console_resize(ds, 320, 240);
-}
-
 // **************************************************************************
 // high level communication with the SerialICE shell
 
@@ -269,7 +214,7 @@ void serialice_io_write(uint16_t port, unsigned int size, uint32 data)
 
 static void serialice_init(void)
 {
-    serialice_screen();
+    dumb_screen();
 
     printf("SerialICE: Open connection to target hardware...\n");
     target = serialice_serial_init();



More information about the SerialICE mailing list