Index: Makefile.target =================================================================== RCS file: /cvsroot/qemu/qemu/Makefile.target,v retrieving revision 1.55 diff -u -u -r1.55 Makefile.target --- Makefile.target 15 Jan 2005 12:02:56 -0000 1.55 +++ Makefile.target 26 Jan 2005 22:20:17 -0000 @@ -316,7 +316,7 @@ # Hardware support VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o -VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o +VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o port-e9.o endif ifeq ($(TARGET_ARCH), ppc) VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) Index: vl.c =================================================================== RCS file: /cvsroot/qemu/qemu/vl.c,v retrieving revision 1.117 diff -u -u -r1.117 vl.c --- vl.c 15 Jan 2005 21:50:11 -0000 1.117 +++ vl.c 26 Jan 2005 22:20:19 -0000 @@ -136,6 +136,7 @@ int full_screen = 0; TextConsole *vga_console; CharDriverState *serial_hds[MAX_SERIAL_PORTS]; +CharDriverState *port_e9_hds[MAX_PORT_E9_PORTS]; CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; /***********************************************************/ @@ -2845,6 +2846,7 @@ QEMU_OPTION_monitor, QEMU_OPTION_serial, QEMU_OPTION_parallel, + QEMU_OPTION_port_e9, QEMU_OPTION_loadvm, QEMU_OPTION_full_screen, QEMU_OPTION_pidfile, @@ -2908,6 +2910,7 @@ { "monitor", 1, QEMU_OPTION_monitor }, { "serial", 1, QEMU_OPTION_serial }, { "parallel", 1, QEMU_OPTION_parallel }, + { "port-e9", 1, QEMU_OPTION_port_e9 }, { "loadvm", HAS_ARG, QEMU_OPTION_loadvm }, { "full-screen", 0, QEMU_OPTION_full_screen }, { "pidfile", HAS_ARG, QEMU_OPTION_pidfile }, @@ -2990,6 +2993,8 @@ char monitor_device[128]; char serial_devices[MAX_SERIAL_PORTS][128]; int serial_device_index; + char port_e9_devices[MAX_PORT_E9_PORTS][128]; + int port_e9_device_index; char parallel_devices[MAX_PARALLEL_PORTS][128]; int parallel_device_index; const char *loadvm = NULL; @@ -3029,7 +3034,12 @@ for(i = 1; i < MAX_PARALLEL_PORTS; i++) parallel_devices[i][0] = '\0'; parallel_device_index = 0; - + + pstrcpy(port_e9_devices[0], sizeof(port_e9_devices[0]), "vc"); + for(i = 1; i < MAX_PORT_E9_PORTS; i++) + port_e9_devices[i][0] = '\0'; + port_e9_device_index = 0; + nb_tun_fds = 0; net_if_type = -1; nb_nics = 1; @@ -3349,6 +3359,15 @@ sizeof(parallel_devices[0]), optarg); parallel_device_index++; break; + case QEMU_OPTION_port_e9: + if (port_e9_device_index >= MAX_PORT_E9_PORTS) { + fprintf(stderr, "qemu: too many port e9 ports\n"); + exit(1); + } + pstrcpy(port_e9_devices[port_e9_device_index], + sizeof(port_e9_devices[0]), optarg); + port_e9_device_index++; + break; case QEMU_OPTION_loadvm: loadvm = optarg; break; @@ -3585,6 +3604,19 @@ } } + for(i = 0; i < MAX_PORT_E9_PORTS; i++) { + if (port_e9_devices[i][0] != '\0') { + port_e9_hds[i] = qemu_chr_open(port_e9_devices[i]); + if (!port_e9_hds[i]) { + fprintf(stderr, "qemu: could not open port e9 device '%s'\n", + port_e9_devices[i]); + exit(1); + } + if (!strcmp(port_e9_devices[i], "vc")) + qemu_chr_printf(port_e9_hds[i], "port_e9_%d console\n", i); + } + } + /* setup cpu signal handlers for MMU / self modifying code handling */ #if !defined(CONFIG_SOFTMMU) Index: vl.h =================================================================== RCS file: /cvsroot/qemu/qemu/vl.h,v retrieving revision 1.66 diff -u -u -r1.66 vl.h --- vl.h 15 Jan 2005 12:02:56 -0000 1.66 +++ vl.h 26 Jan 2005 22:20:19 -0000 @@ -230,6 +230,16 @@ extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; +/* port E9 ports */ + +#define MAX_PORT_E9_PORTS 1 + +#if (MAX_PORT_E9_PORTS != 1) + #error "No more than one port E9 is supported" +#endif + +extern CharDriverState *port_e9_hds[MAX_PORT_E9_PORTS]; + /* network redirectors support */ #define MAX_NICS 8 @@ -643,6 +653,10 @@ typedef struct ParallelState ParallelState; ParallelState *parallel_init(int base, int irq, CharDriverState *chr); +/* port-e9.c */ + +CharDriverState *port_e9_init(CharDriverState *chr); + /* i8259.c */ void pic_set_irq(int irq, int level); Index: hw/pc.c =================================================================== RCS file: /cvsroot/qemu/qemu/hw/pc.c,v retrieving revision 1.35 diff -u -u -r1.35 pc.c --- hw/pc.c 15 Jan 2005 12:02:56 -0000 1.35 +++ hw/pc.c 26 Jan 2005 22:20:19 -0000 @@ -547,6 +547,12 @@ } } + for(i = 0; i < MAX_PORT_E9_PORTS; i++) { + if(port_e9_hds[i]) { + port_e9_init(port_e9_hds[i]); + } + } + if (pci_enabled) { for(i = 0; i < nb_nics; i++) { pci_ne2000_init(pci_bus, &nd_table[i]);