From: Ben Thomas <bthomas@virtualiron.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] - make qemu serial summagraphics settings a bit more fluid
Date: Thu, 18 May 2006 14:50:27 -0400 [thread overview]
Message-ID: <446CC1F3.707@virtualiron.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
Changeset 9967 made the qemu serial line Summagraphics support a little
more flexible with respect to the COM line chosen. This patch
furthers that effort by removing the COM2 restriction. This patch
allows a "-summa n" command line option to qemu to specify which, if
any, COM port should be using the Summagraphics protocols.
Signed-off-by: Ben Thomas (ben@virtualiron.com)
--
------------------------------------------------------------------------
Ben Thomas Virtual Iron Software
bthomas@virtualiron.com Tower 1, Floor 2
978-849-1214 900 Chelmsford Street
Lowell, MA 01851
[-- Attachment #2: summa.patch --]
[-- Type: text/x-patch, Size: 3672 bytes --]
diff -r 48c0f5489d44 tools/ioemu/hw/pc.c
--- a/tools/ioemu/hw/pc.c Thu May 18 11:39:03 2006 +0100
+++ b/tools/ioemu/hw/pc.c Thu May 18 14:46:20 2006 -0400
@@ -537,7 +537,7 @@ void pc_init(uint64_t ram_size, int vga_
for(i = 0; i < MAX_SERIAL_PORTS; i++) {
if (serial_hds[i]) {
sp = serial_init(serial_io[i], serial_irq[i], serial_hds[i]);
- if (i == SUMMA_PORT)
+ if (serial_summa[i])
summa_init(sp, serial_hds[i]);
}
}
diff -r 48c0f5489d44 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c Thu May 18 11:39:03 2006 +0100
+++ b/tools/ioemu/vl.c Thu May 18 14:46:20 2006 -0400
@@ -146,6 +146,7 @@ int repeat_key = 1;
int repeat_key = 1;
TextConsole *vga_console;
CharDriverState *serial_hds[MAX_SERIAL_PORTS];
+int serial_summa[MAX_SERIAL_PORTS];
int xc_handle;
time_t timeoffset = 0;
@@ -2244,6 +2245,7 @@ void help(void)
"Debug/Expert options:\n"
"-monitor dev redirect the monitor to char device 'dev'\n"
"-serial dev redirect the serial port to char device 'dev'\n"
+ "-summa n set serial line COMn to be a Summagraphics tablet"
"-S freeze CPU at startup (use 'c' to start execution)\n"
"-s wait gdb connection to port %d\n"
"-p port ioreq port for xen\n"
@@ -2349,6 +2351,7 @@ enum {
QEMU_OPTION_monitor,
QEMU_OPTION_domainname,
QEMU_OPTION_serial,
+ QEMU_OPTION_summa,
QEMU_OPTION_timeoffset,
QEMU_OPTION_loadvm,
QEMU_OPTION_full_screen,
@@ -2425,6 +2428,7 @@ const QEMUOption qemu_options[] = {
{ "domain-name", 1, QEMU_OPTION_domainname },
{ "timeoffset", HAS_ARG, QEMU_OPTION_timeoffset },
{ "serial", 1, QEMU_OPTION_serial },
+ { "summa", 1, QEMU_OPTION_summa },
{ "loadvm", HAS_ARG, QEMU_OPTION_loadvm },
{ "full-screen", 0, QEMU_OPTION_full_screen },
@@ -2554,6 +2558,7 @@ int main(int argc, char **argv)
char monitor_device[128];
char serial_devices[MAX_SERIAL_PORTS][128];
int serial_device_index;
+ int summa_index;
char qemu_dm_logfilename[64];
const char *loadvm = NULL;
unsigned long nr_pages, *page_array;
@@ -2588,9 +2593,11 @@ int main(int argc, char **argv)
pstrcpy(monitor_device, sizeof(monitor_device), "vc");
pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "vc");
- pstrcpy(serial_devices[1], sizeof(serial_devices[1]), "null");
- for(i = 2; i < MAX_SERIAL_PORTS; i++)
+ serial_summa[0] = 0;
+ for(i = 1; i < MAX_SERIAL_PORTS; i++) {
serial_devices[i][0] = '\0';
+ serial_summa[i] = 0;
+ }
serial_device_index = 0;
nb_tun_fds = 0;
@@ -2931,6 +2938,15 @@ int main(int argc, char **argv)
sizeof(serial_devices[0]), optarg);
serial_device_index++;
break;
+ case QEMU_OPTION_summa:
+ summa_index = atoi(optarg);
+ if ( (summa_index <= 0) || (summa_index > MAX_SERIAL_PORTS) ) {
+ fprintf(stderr, "qemu: summa index out of range\n");
+ exit(1);
+ }
+ serial_summa[i-1] = 1;
+ break;
+
case QEMU_OPTION_loadvm:
loadvm = optarg;
break;
diff -r 48c0f5489d44 tools/ioemu/vl.h
--- a/tools/ioemu/vl.h Thu May 18 11:39:03 2006 +0100
+++ b/tools/ioemu/vl.h Thu May 18 14:46:20 2006 -0400
@@ -238,9 +238,9 @@ void console_select(unsigned int index);
/* serial ports */
#define MAX_SERIAL_PORTS 4
-#define SUMMA_PORT 1
extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
+extern serial_summa[MAX_SERIAL_PORTS];
/* network redirectors support */
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2006-05-18 18:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446CC1F3.707@virtualiron.com \
--to=bthomas@virtualiron.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.