[SerialICE] r83 - trunk/qemu-0.11.0

svn at coresystems.de svn at coresystems.de
Wed Dec 2 17:44:14 CET 2009


Author: stepan
Date: 2009-12-02 17:44:14 +0100 (Wed, 02 Dec 2009)
New Revision: 83

Modified:
   trunk/qemu-0.11.0/monitor.c
   trunk/qemu-0.11.0/serialice.c
   trunk/qemu-0.11.0/serialice.h
   trunk/qemu-0.11.0/vl.c
Log:
get rid of some warnings and some dead code.


Modified: trunk/qemu-0.11.0/monitor.c
===================================================================
--- trunk/qemu-0.11.0/monitor.c	2009-12-02 14:29:32 UTC (rev 82)
+++ trunk/qemu-0.11.0/monitor.c	2009-12-02 16:44:14 UTC (rev 83)
@@ -1243,7 +1243,7 @@
 #if defined(CONFIG_SERIALICE)
 static void monitor_command_lua(Monitor *mon, const char *cmdline, void *opaque)
 {
-    const char *errmsg;
+    char *errmsg;
 
     if (!strncasecmp("quit", cmdline, 5)) {
         monitor_printf(mon, "Exited LUA shell.\n");
@@ -1252,7 +1252,7 @@
         return;
     }
 
-    errmsg = serialice_lua_execute(cmdline);
+    errmsg = (char *)serialice_lua_execute(cmdline);
     if(errmsg) {
         monitor_printf(mon, "Lua error: %s\n", errmsg);
         free (errmsg);

Modified: trunk/qemu-0.11.0/serialice.c
===================================================================
--- trunk/qemu-0.11.0/serialice.c	2009-12-02 14:29:32 UTC (rev 82)
+++ trunk/qemu-0.11.0/serialice.c	2009-12-02 16:44:14 UTC (rev 83)
@@ -448,6 +448,8 @@
     return bytes_read;
 }
 
+static int handshake_mode = 0;
+
 static int serialice_write(SerialICEState * state, const void *buf,
 			   size_t nbyte)
 {
@@ -469,7 +471,7 @@
 	while (write(state->fd, buffer + i, 1) != 1) ;
 	while (read(state->fd, &c, 1) != 1) ;
 #endif
-	if (c != buffer[i]) {
+	if (c != buffer[i] && !handshake_mode) {
 	    printf("Readback error! %x/%x\n", c, buffer[i]);
 	}
     }
@@ -1042,6 +1044,8 @@
 
     printf("SerialICE: Waiting for handshake with target... ");
 
+    handshake_mode = 1; // Readback errors are to be expected in this phase.
+
     /* Trigger a prompt */
     serialice_write(s, "@", 1);
 
@@ -1058,6 +1062,8 @@
      */
     serialice_write(s, "@", 1);
 
+    handshake_mode = 0; // from now on, warn about readback errors.
+
     serialice_get_version();
 
     serialice_get_mainboard();
@@ -1067,15 +1073,6 @@
 
     /* Let the rest of Qemu know we're alife */
     serialice_active = 1;
-#if SERIALICE_HIDES_VGA
-    /* Go to Qemu monitor immediately, don't try to open
-     * vgabios-cirrus.bin, because it's not needed anyways.
-     *
-     * This is disabled because the Qemu window is distorted
-     * until the first console change when this is active
-     */
-    vga_interface_type = VGA_NONE;
-#endif
 }
 
 void serialice_exit(void)
@@ -1109,8 +1106,7 @@
 
     /* init CPUs */
     if (cpu_model == NULL) {
-	printf
-	    ("Warning: Running SerialICE with generic CPU type might fail.\n");
+	//printf("Warning: Running SerialICE with generic CPU type might fail.\n");
 #ifdef TARGET_X86_64
 	cpu_model = "qemu64";
 #else

Modified: trunk/qemu-0.11.0/serialice.h
===================================================================
--- trunk/qemu-0.11.0/serialice.h	2009-12-02 14:29:32 UTC (rev 82)
+++ trunk/qemu-0.11.0/serialice.h	2009-12-02 16:44:14 UTC (rev 83)
@@ -65,6 +65,4 @@
 			unsigned int data_size);
 int serialice_handle_store(uint32_t addr, uint32_t val, unsigned int data_size);
 
-#define SERIALICE_HIDES_VGA 0
-
 #endif

Modified: trunk/qemu-0.11.0/vl.c
===================================================================
--- trunk/qemu-0.11.0/vl.c	2009-12-02 14:29:32 UTC (rev 82)
+++ trunk/qemu-0.11.0/vl.c	2009-12-02 16:44:14 UTC (rev 83)
@@ -2756,13 +2756,6 @@
 {
     DisplayState *ds = qemu_mallocz(sizeof(DisplayState));
     ds->allocator = &default_allocator;
-#ifdef CONFIG_SERIALICE
-#if SERIALICE_HIDES_VGA
-    if (serialice_active)
-        ds->surface = qemu_create_displaysurface(ds, 640, 384);
-    else
-#endif
-#endif
     ds->surface = qemu_create_displaysurface(ds, 640, 480);
     register_displaystate(ds);
 }




More information about the SerialICE mailing list