qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] patch for serial port support(linux host only)
  2005-05-09 10:01 [Qemu-devel] patch for serial port support(linux host only) Cai Qiang
@ 2005-05-09  7:04 ` Filip Navara
  2005-05-09 15:31   ` Cai Qiang
  2005-05-20 16:42 ` [Qemu-devel] FreeDOS FDAPM kills Keybord Andreas Bollhalder
  1 sibling, 1 reply; 4+ messages in thread
From: Filip Navara @ 2005-05-09  7:04 UTC (permalink / raw)
  To: qemu-devel

Cai Qiang wrote:
[snip]

>	I has also worked on serial port support for windows host, but my build of 
>qemu always crash, althrough I have tried different method: cross-compile 
>using i386-mingw32msvc;  mingw/msys. If anyone who has build qemu windows 
>port can teach me about it, I will try to finish my windows support when I 
>get time.
>  
>
[snip]

Let me guess ... you're using GCC 3.4.x, right? To compile QEMU with 
MinGW you need to use GCC 3.3.x, otherwise op.c will get overoptimized 
and QEMU can't handle that...

- Filip

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] patch for serial port support(linux host only)
@ 2005-05-09 10:01 Cai Qiang
  2005-05-09  7:04 ` Filip Navara
  2005-05-20 16:42 ` [Qemu-devel] FreeDOS FDAPM kills Keybord Andreas Bollhalder
  0 siblings, 2 replies; 4+ messages in thread
From: Cai Qiang @ 2005-05-09 10:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: alexander.burker


Hi,
	Here are patch for serial port support(partial; linux host only). You can 
invoke it by adding sth like "-serial /dev/ttyS0" in arguments to let qemu 
using host's serial port as its serial port. qemu will change host's serial 
port setting(baudrate, databits, stopbits, parity) when guest os change them. 
In my test, I use minicom's zmodem to send file. When sending file to qemu, 
things works fine. When sending file from qemu, file can be sent completely, 
but qemu gives many warning saying "serial8250: too much work for irq4".
	I has also worked on serial port support for windows host, but my build of 
qemu always crash, althrough I have tried different method: cross-compile 
using i386-mingw32msvc;  mingw/msys. If anyone who has build qemu windows 
port can teach me about it, I will try to finish my windows support when I 
get time.

	Any comments/tests are welcome.

Best Regards

	Cai Qiang


--- qemu-0.7.0/vl.c	2005-04-27 20:52:05.000000000 +0000
+++ qemu-0.7.0-serialport/vl.c	2005-05-09 09:24:43.000000000 +0000
@@ -1226,13 +1226,13 @@
     fcntl(0, F_SETFL, old_fd0_flags);
 }
 
-static void term_init(void)
+static void term_init(int in)
 {
     struct termios tty;
 
-    tcgetattr (0, &tty);
+    tcgetattr (in, &tty);
     oldtty = tty;
-    old_fd0_flags = fcntl(0, F_GETFL);
+    old_fd0_flags = fcntl(in, F_GETFL);
 
     tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
                           |INLCR|IGNCR|ICRNL|IXON);
@@ -1246,11 +1246,11 @@
     tty.c_cc[VMIN] = 1;
     tty.c_cc[VTIME] = 0;
     
-    tcsetattr (0, TCSANOW, &tty);
+    tcsetattr (in, TCSANOW, &tty);
 
     atexit(term_exit);
 
-    fcntl(0, F_SETFL, O_NONBLOCK);
+    fcntl(in, F_SETFL, O_NONBLOCK);
 }
 
 CharDriverState *qemu_chr_open_stdio(void)
@@ -1272,7 +1272,7 @@
     stdio_clients[stdio_nb_clients++] = chr;
     if (stdio_nb_clients == 1) {
         /* set the terminal in raw mode */
-        term_init();
+        term_init(0);
     }
     return chr;
 }
@@ -1290,6 +1290,126 @@
     fprintf(stderr, "char device redirected to %s\n", slave_name);
     return qemu_chr_open_fd(master_fd, master_fd);
 }
+
+#include <termios.h>
+static void set_baudrate(int fd, int v)
+{
+	struct termios newtio;
+	int BaudRate;
+
+  switch (v) {
+    case 600: 	BaudRate = B600; 	break;
+    case 1200: 	BaudRate = B1200; 	break;
+    case 2400: 	BaudRate = B2400; 	break;
+    case 4800: 	BaudRate = B4800; 	break;
+    case 9600: 	BaudRate = B9600; 	break;
+    case 19200: BaudRate = B19200; 	break;
+    case 38400: BaudRate = B38400; 	break;
+    case 57600: BaudRate = B57600; 	break;
+    case 115200:BaudRate = B115200; break;
+	default:	BaudRate=B115200;	break;
+  }
+
+    tcgetattr( fd,&newtio);
+	newtio.c_cflag &= ~CBAUD;
+	newtio.c_cflag |= BaudRate;
+    tcflush(fd, TCIFLUSH);
+    tcsetattr(fd,TCSANOW,&newtio);
+}
+
+static void set_databits(int fd, int v)
+{
+	struct termios newtio;
+
+    tcgetattr( fd,&newtio);
+	newtio.c_cflag &= ~CSIZE;
+	const int databits[] = { CS5, CS6, CS7, CS8 };
+	v-=5;
+	newtio.c_cflag |= v<sizeof(databits)/sizeof(databits[0])?databits[v]:CS8;
+    tcflush(fd, TCIFLUSH);
+    tcsetattr(fd,TCSANOW,&newtio);
+}
+
+static void set_stopbits(int fd, int v)
+{
+	struct termios newtio;
+
+    tcgetattr( fd,&newtio);
+	if (v==2)
+		newtio.c_cflag |= CSTOPB;
+	else
+		newtio.c_cflag &= ~CSTOPB;
+    tcflush(fd, TCIFLUSH);
+    tcsetattr(fd,TCSANOW,&newtio);
+}
+static void set_parity(int fd, int v)
+{
+	struct termios newtio;
+
+    tcgetattr( fd,&newtio);
+	switch (v) {
+    	case 0:
+  			newtio.c_iflag=0;
+      		break;
+    	case 1:
+	        newtio.c_iflag = INPCK;
+		 	newtio.c_cflag |= PARENB|PARODD;
+      		break;
+    	case 2:
+	        newtio.c_iflag = INPCK;
+		 	newtio.c_cflag |= PARENB;
+		 	newtio.c_cflag &= ~PARODD;
+      		break;
+	   	case 3:
+      		break;
+    	case 4:
+      		break;
+  	}
+    tcflush(fd, TCIFLUSH);
+    tcsetattr(fd,TCSANOW,&newtio);
+}
+
+static void Notify_serial_param_set( CharDriverState *chr, int msg)
+{
+	if (chr != NULL) {
+		int mode=msg>>16, param=msg&0xffff;
+		int pmode;		
+		switch (mode) {
+			case 0:
+			case 1:
+#define  PC_CLOCK_XTL   1843200.0
+				set_baudrate(((FDCharDriver *)(chr->opaque))->fd_in, (int) 
(PC_CLOCK_XTL /(16 * param)));
+				break;
+			case 3:		//lcr
+          		set_databits(((FDCharDriver *)(chr->opaque))->fd_in,(param&0x03) 
+ 5);
+          		set_stopbits(((FDCharDriver *)(chr->opaque))->fd_in,
(param&(1<<2)) ? 2 : 1);
+		        if ((param&(1<<3)) == 0)
+		          	pmode = 0;
+         		else
+		            pmode = ((param & 0x30) >> 4) + 1;
+	          	set_parity(((FDCharDriver *)(chr->opaque))->fd_in,pmode);
+				break;
+			default:
+				break;
+		}
+	}
+}
+
+static CharDriverState *qemu_chr_open_dev(const char *devname)
+{
+    int fd;
+	CharDriverState *s;
+    
+    if ( (fd=open(devname, O_RDWR|O_NDELAY)) < 0) 
+        return NULL;
+    s = qemu_chr_open_fd(fd, fd);
+	if (s!=NULL) {
+		s->chr_send_event=Notify_serial_param_set;
+	    /* set the terminal in raw mode */
+	    term_init(fd);
+	}
+    return s;
+}
 #else
 CharDriverState *qemu_chr_open_pty(void)
 {
@@ -1311,6 +1431,8 @@
         return qemu_chr_open_pty();
     } else if (!strcmp(filename, "stdio")) {
         return qemu_chr_open_stdio();
+    } else if (!strncmp(filename, "/dev/", 5)) {
+        return qemu_chr_open_dev(filename);
     } else 
 #endif
     {

--- qemu-0.7.0/hw/serial.c	2005-04-27 20:52:05.000000000 +0000
+++ qemu-0.7.0-serialport/hw/serial.c	2005-05-09 09:14:39.000000000 +0000
@@ -117,6 +117,7 @@
     case 0:
         if (s->lcr & UART_LCR_DLAB) {
             s->divider = (s->divider & 0xff00) | val;
+			qemu_chr_send_event(s->chr, (addr<<16)|s->divider);
         } else {
             s->thr_ipending = 0;
             s->lsr &= ~UART_LSR_THRE;
@@ -132,6 +133,7 @@
     case 1:
         if (s->lcr & UART_LCR_DLAB) {
             s->divider = (s->divider & 0x00ff) | (val << 8);
+			qemu_chr_send_event(s->chr, (addr<<16)|s->divider);
         } else {
             s->ier = val & 0x0f;
             if (s->lsr & UART_LSR_THRE) {
@@ -144,6 +146,7 @@
         break;
     case 3:
         s->lcr = val;
+		qemu_chr_send_event(s->chr, (addr<<16)|val);
         break;
     case 4:
         s->mcr = val & 0x1f;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] patch for serial port support(linux host only)
  2005-05-09  7:04 ` Filip Navara
@ 2005-05-09 15:31   ` Cai Qiang
  0 siblings, 0 replies; 4+ messages in thread
From: Cai Qiang @ 2005-05-09 15:31 UTC (permalink / raw)
  To: qemu-devel


Hi,

On Monday 09 May 2005 07:04, Filip Navara wrote:
>
> Let me guess ... you're using GCC 3.4.x, right? To compile QEMU with
> MinGW you need to use GCC 3.3.x, otherwise op.c will get overoptimized
> and QEMU can't handle that...

Oh, yes, I check and find my cross-tools i386-mingw32msvc is gcc version 3.4.1 
(mingw special), and my windows mingw is gcc version 3.4.2 (mingw-special). 
Thanks a lot and I will try GCC 3.3.x.

-- 
Best Regards

	Cai Qiang

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] FreeDOS FDAPM kills Keybord
  2005-05-09 10:01 [Qemu-devel] patch for serial port support(linux host only) Cai Qiang
  2005-05-09  7:04 ` Filip Navara
@ 2005-05-20 16:42 ` Andreas Bollhalder
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Bollhalder @ 2005-05-20 16:42 UTC (permalink / raw)
  To: qemu-devel

Hello

I have tried to debug the nasty problem, that I loose the keyboard
input in QEMU, when using FreeDOS with HIMEM, EMM386 and FDAPM. I
found a "raise_exception 0xd" in the debug log. I think this is a GPF.

If I use HIMEM and FDAPM, it works fine.

Because HIMEM, EMM386 and FDAPM is working on a real machine, could
there be an error in QEMU ? The interesting point is around the "hlt"
command.

Andreas

========================================
OK: HIMEM, FDAPM
----------------
IN: 
0x00005efe:  pop    %ax
0x00005eff:  testb  $0x1,%cs:852
0x00005f05:  je     0x5f09

OP:
0x0000: movl_A0_ESP
0x0001: andl_A0_ffff
0x0002: addl_A0_SS
0x0003: lduw_kernel_T0_A0
0x0004: addw_ESP_2
0x0005: movw_EAX_T0
0x0006: movl_A0_im 0x354
0x0007: addl_A0_seg 0x50
0x0008: ldub_kernel_T0_A0
0x0009: movl_T1_im 0x1
0x000a: testl_T0_T1_cc
0x000b: set_cc_op 0x16
0x000c: jz_subb 0x0
0x000d: goto_tb0
0x000e: movl_eip_im 0x2d7
0x000f: movl_T0_im 0x83dc3e0
0x0010: exit_tb
0x0011: goto_tb1
0x0012: movl_eip_im 0x2d9
0x0013: movl_T0_im 0x83dc3e1
0x0014: exit_tb
0x0015: end

AFTER FLAGS OPT:
0x0000: movl_A0_ESP
0x0001: andl_A0_ffff
0x0002: addl_A0_SS
0x0003: lduw_kernel_T0_A0
0x0004: addw_ESP_2
0x0005: movw_EAX_T0
0x0006: movl_A0_im 0x354
0x0007: addl_A0_seg 0x50
0x0008: ldub_kernel_T0_A0
0x0009: movl_T1_im 0x1
0x000a: testl_T0_T1_cc
0x000b: set_cc_op 0x16
0x000c: jz_subb 0x0
0x000d: goto_tb0
0x000e: movl_eip_im 0x2d7
0x000f: movl_T0_im 0x83dc3e0
0x0010: exit_tb
0x0011: goto_tb1
0x0012: movl_eip_im 0x2d9
0x0013: movl_T0_im 0x83dc3e1
0x0014: exit_tb
0x0015: end

OUT: [size=205]
0x089ee270:  mov    0x10(%ebp),%edi
0x089ee273:  and    $0xffff,%edi
0x089ee279:  mov    0x60(%ebp),%ecx
0x089ee27c:  add    %ecx,%edi
0x089ee27e:  mov    %edi,%edx
0x089ee280:  mov    %edi,%eax
0x089ee282:  shr    $0x9,%edx
0x089ee285:  and    $0xfffff001,%eax
0x089ee28a:  and    $0x7f8,%edx
0x089ee290:  lea    0x344(%edx,%ebp,1),%edx
0x089ee297:  cmp    (%edx),%eax
0x089ee299:  mov    %edi,%eax
0x089ee29b:  je     0x89ee2a9
0x089ee29d:  push   $0x0
0x089ee29f:  call   0x80d3ab0
0x089ee2a4:  pop    %edx
0x089ee2a5:  mov    %eax,%ebx
0x089ee2a7:  jmp    0x89ee2af
0x089ee2a9:  add    0x4(%edx),%eax
0x089ee2ac:  movzwl (%eax),%ebx
0x089ee2af:  mov    0x10(%ebp),%eax
0x089ee2b2:  add    $0x2,%eax
0x089ee2b5:  mov    %ax,0x10(%ebp)
0x089ee2b9:  mov    %bx,0x0(%ebp)
0x089ee2bd:  mov    $0x354,%edi
0x089ee2c2:  mov    0x50(%ebp),%ecx
0x089ee2c8:  add    %ecx,%edi
0x089ee2ca:  mov    %edi,%edx
0x089ee2cc:  mov    %edi,%eax
0x089ee2ce:  shr    $0x9,%edx
0x089ee2d1:  and    $0xfffff000,%eax
0x089ee2d6:  and    $0x7f8,%edx
0x089ee2dc:  lea    0x344(%edx,%ebp,1),%edx
0x089ee2e3:  cmp    (%edx),%eax
0x089ee2e5:  mov    %edi,%eax
0x089ee2e7:  je     0x89ee2f5
0x089ee2e9:  push   $0x0
0x089ee2eb:  call   0x80d3660
0x089ee2f0:  pop    %edx
0x089ee2f1:  mov    %eax,%ebx
0x089ee2f3:  jmp    0x89ee2fb
0x089ee2f5:  add    0x4(%edx),%eax
0x089ee2f8:  movzbl (%eax),%ebx
0x089ee2fb:  mov    $0x1,%esi
0x089ee300:  mov    %ebx,%eax
0x089ee302:  and    %esi,%eax
0x089ee304:  mov    %eax,0x2c(%ebp)
0x089ee307:  movl   $0x16,0x30(%ebp)
0x089ee30e:  cmpb   $0x0,0x2c(%ebp)
0x089ee312:  jne    0x89ee319
0x089ee314:  jmp    0x89ee32b
0x089ee319:  jmp    0x98bc46d
0x089ee31e:  movl   $0x2d7,0x20(%ebp)
0x089ee325:  mov    $0x83dc3e0,%ebx
0x089ee32a:  ret    
0x089ee32b:  jmp    0x98bc47b
0x089ee330:  movl   $0x2d9,0x20(%ebp)
0x089ee337:  mov    $0x83dc3e1,%ebx
0x089ee33c:  ret    

EAX=00100200 EBX=00003b5e ECX=000f0000 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=00000a3e
EIP=000002d7 EFL=00000002 [-------]    CPL=0 II=0 A20=1
ES =0502 00005020 ffffffff 00cf9300
CS =05c3 00005c30 0000ffff 00000000
SS =00cf 00000cf0 0000ffff 00000000
DS =00cf 00000cf0 ffffffff 00cf9300
FS =0000 00000000 0000ffff 00000000
GS =0000 00000000 0000ffff 00000000
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT=     000026b0 00000018
IDT=     00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000001 CCD=00000001 CCO=LOGICB  
----------------
IN: 
0x00005f07:  sti    

OP:
0x0000: sti
0x0001: set_inhibit_irq
0x0002: movl_eip_im 0x2d8
0x0003: movl_T0_0
0x0004: exit_tb
0x0005: end

AFTER FLAGS OPT:
0x0000: sti
0x0001: set_inhibit_irq
0x0002: movl_eip_im 0x2d8
0x0003: movl_T0_0
0x0004: exit_tb
0x0005: end

OUT: [size=21]
0x089ee340:  orl    $0x200,0x24(%ebp)
0x089ee347:  orl    $0x8,0x38(%ebp)
0x089ee34b:  movl   $0x2d8,0x20(%ebp)
0x089ee352:  xor    %ebx,%ebx
0x089ee354:  ret    

EAX=00100200 EBX=00003b5e ECX=000f0000 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=00000a3e
EIP=000002d8 EFL=00000202 [-------]    CPL=0 II=1 A20=1
ES =0502 00005020 ffffffff 00cf9300
CS =05c3 00005c30 0000ffff 00000000
SS =00cf 00000cf0 0000ffff 00000000
DS =00cf 00000cf0 ffffffff 00cf9300
FS =0000 00000000 0000ffff 00000000
GS =0000 00000000 0000ffff 00000000
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT=     000026b0 00000018
IDT=     00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000001 CCD=00000001 CCO=LOGICB  
----------------
IN: 
0x00005f08:  hlt    

OP:
0x0000: movl_eip_im 0x2d9
0x0001: hlt
0x0002: end

AFTER FLAGS OPT:
0x0000: movl_eip_im 0x2d9
0x0001: hlt
0x0002: end

OUT: [size=27]
0x089ee360:  movl   $0x2d9,0x20(%ebp)
0x089ee367:  andl   $0xfffffff7,0x38(%ebp)
0x089ee36b:  mov    $0x101,%eax
0x089ee370:  mov    %eax,0x300(%ebp)
0x089ee376:  call   0x80c8ff0

Servicing hardware INT=0x08
EAX=00100200 EBX=00003b5e ECX=000f0000 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=00000a3e
EIP=000002d9 EFL=00000202 [-------]    CPL=0 II=0 A20=1
ES =0502 00005020 ffffffff 00cf9300
CS =05c3 00005c30 0000ffff 00000000
SS =00cf 00000cf0 0000ffff 00000000
DS =00cf 00000cf0 ffffffff 00cf9300
FS =0000 00000000 0000ffff 00000000
GS =0000 00000000 0000ffff 00000000
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT=     000026b0 00000018
IDT=     00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000000 CCD=00100800 CCO=EFLAGS  
----------------
IN: 
0x00005f09:  popf   

OP:
0x0000: movl_A0_ESP
0x0001: andl_A0_ffff
0x0002: addl_A0_SS
0x0003: lduw_kernel_T0_A0
0x0004: movw_eflags_T0_cpl0
0x0005: addw_ESP_2
0x0006: movl_eip_im 0x2da
0x0007: set_cc_op 0x1
0x0008: movl_T0_0
0x0009: exit_tb
0x000a: end

AFTER FLAGS OPT:
0x0000: movl_A0_ESP
0x0001: andl_A0_ffff
0x0002: addl_A0_SS
0x0003: lduw_kernel_T0_A0
0x0004: movw_eflags_T0_cpl0
0x0005: addw_ESP_2
0x0006: movl_eip_im 0x2da
0x0007: set_cc_op 0x1
0x0008: movl_T0_0
0x0009: exit_tb
0x000a: end

OUT: [size=139]
0x089ee380:  mov    0x10(%ebp),%edi
0x089ee383:  and    $0xffff,%edi
0x089ee389:  mov    0x60(%ebp),%ecx
0x089ee38c:  add    %ecx,%edi
0x089ee38e:  mov    %edi,%edx
0x089ee390:  mov    %edi,%eax
0x089ee392:  shr    $0x9,%edx
0x089ee395:  and    $0xfffff001,%eax
0x089ee39a:  and    $0x7f8,%edx
0x089ee3a0:  lea    0x344(%edx,%ebp,1),%edx
0x089ee3a7:  cmp    (%edx),%eax
0x089ee3a9:  mov    %edi,%eax
0x089ee3ab:  je     0x89ee3b9
0x089ee3ad:  push   $0x0
0x089ee3af:  call   0x80d3ab0
0x089ee3b4:  pop    %edx
0x089ee3b5:  mov    %eax,%ebx
0x089ee3b7:  jmp    0x89ee3bf
0x089ee3b9:  add    0x4(%edx),%eax
0x089ee3bc:  movzwl (%eax),%ebx
0x089ee3bf:  mov    %ebx,%eax
0x089ee3c1:  mov    %ebx,%edx
0x089ee3c3:  and    $0x8d5,%eax
0x089ee3c8:  mov    %eax,0x28(%ebp)
0x089ee3cb:  sar    $0x9,%edx
0x089ee3ce:  mov    %ebx,%ecx
0x089ee3d0:  and    $0x2,%edx
0x089ee3d3:  mov    $0x1,%eax
0x089ee3d8:  sub    %edx,%eax
0x089ee3da:  mov    %eax,0x34(%ebp)
0x089ee3dd:  and    $0x7300,%ecx
0x089ee3e3:  mov    0x24(%ebp),%eax
0x089ee3e6:  and    $0xffff8cff,%eax
0x089ee3eb:  or     %ecx,%eax
0x089ee3ed:  mov    %eax,0x24(%ebp)
0x089ee3f0:  mov    0x10(%ebp),%eax
0x089ee3f3:  add    $0x2,%eax
0x089ee3f6:  mov    %ax,0x10(%ebp)
0x089ee3fa:  movl   $0x2da,0x20(%ebp)
0x089ee401:  movl   $0x1,0x30(%ebp)
0x089ee408:  xor    %ebx,%ebx
0x089ee40a:  ret    

EAX=00100200 EBX=00003b5e ECX=000f0000 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=00000a40
EIP=000002da EFL=00000002 [-------]    CPL=0 II=0 A20=1
ES =0502 00005020 ffffffff 00cf9300
CS =05c3 00005c30 0000ffff 00000000
SS =00cf 00000cf0 0000ffff 00000000
DS =00cf 00000cf0 ffffffff 00cf9300
FS =0000 00000000 0000ffff 00000000
GS =0000 00000000 0000ffff 00000000
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT=     000026b0 00000018
IDT=     00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000000 CCD=00100800 CCO=EFLAGS  








========================================
FAILED: HIMEM, EMM386, FDAPM
----------------------------
IN: 
0x000040fe:  pop    %ax
0x000040ff:  testb  $0x1,%cs:852
0x00004105:  je     0x4109

OP:
0x0000: movl_A0_ESP
0x0001: andl_A0_ffff
0x0002: addl_A0_SS
0x0003: lduw_user_T0_A0
0x0004: addw_ESP_2
0x0005: movw_EAX_T0
0x0006: movl_A0_im 0x354
0x0007: addl_A0_seg 0x50
0x0008: ldub_user_T0_A0
0x0009: movl_T1_im 0x1
0x000a: testl_T0_T1_cc
0x000b: set_cc_op 0x16
0x000c: jz_subb 0x0
0x000d: goto_tb0
0x000e: movl_eip_im 0x2d7
0x000f: movl_T0_im 0x83ff788
0x0010: exit_tb
0x0011: goto_tb1
0x0012: movl_eip_im 0x2d9
0x0013: movl_T0_im 0x83ff789
0x0014: exit_tb
0x0015: end

AFTER FLAGS OPT:
0x0000: movl_A0_ESP
0x0001: andl_A0_ffff
0x0002: addl_A0_SS
0x0003: lduw_user_T0_A0
0x0004: addw_ESP_2
0x0005: movw_EAX_T0
0x0006: movl_A0_im 0x354
0x0007: addl_A0_seg 0x50
0x0008: ldub_user_T0_A0
0x0009: movl_T1_im 0x1
0x000a: testl_T0_T1_cc
0x000b: set_cc_op 0x16
0x000c: jz_subb 0x0
0x000d: goto_tb0
0x000e: movl_eip_im 0x2d7
0x000f: movl_T0_im 0x83ff788
0x0010: exit_tb
0x0011: goto_tb1
0x0012: movl_eip_im 0x2d9
0x0013: movl_T0_im 0x83ff789
0x0014: exit_tb
0x0015: end

OUT: [size=205]
0x08a94380:  mov    0x10(%ebp),%edi
0x08a94383:  and    $0xffff,%edi
0x08a94389:  mov    0x60(%ebp),%ecx
0x08a9438c:  add    %ecx,%edi
0x08a9438e:  mov    %edi,%edx
0x08a94390:  mov    %edi,%eax
0x08a94392:  shr    $0x9,%edx
0x08a94395:  and    $0xfffff001,%eax
0x08a9439a:  and    $0x7f8,%edx
0x08a943a0:  lea    0xb44(%edx,%ebp,1),%edx
0x08a943a7:  cmp    (%edx),%eax
0x08a943a9:  mov    %edi,%eax
0x08a943ab:  je     0x8a943b9
0x08a943ad:  push   $0x1
0x08a943af:  call   0x80d3ab0
0x08a943b4:  pop    %edx
0x08a943b5:  mov    %eax,%ebx
0x08a943b7:  jmp    0x8a943bf
0x08a943b9:  add    0x4(%edx),%eax
0x08a943bc:  movzwl (%eax),%ebx
0x08a943bf:  mov    0x10(%ebp),%eax
0x08a943c2:  add    $0x2,%eax
0x08a943c5:  mov    %ax,0x10(%ebp)
0x08a943c9:  mov    %bx,0x0(%ebp)
0x08a943cd:  mov    $0x354,%edi
0x08a943d2:  mov    0x50(%ebp),%ecx
0x08a943d8:  add    %ecx,%edi
0x08a943da:  mov    %edi,%edx
0x08a943dc:  mov    %edi,%eax
0x08a943de:  shr    $0x9,%edx
0x08a943e1:  and    $0xfffff000,%eax
0x08a943e6:  and    $0x7f8,%edx
0x08a943ec:  lea    0xb44(%edx,%ebp,1),%edx
0x08a943f3:  cmp    (%edx),%eax
0x08a943f5:  mov    %edi,%eax
0x08a943f7:  je     0x8a94405
0x08a943f9:  push   $0x1
0x08a943fb:  call   0x80d3660
0x08a94400:  pop    %edx
0x08a94401:  mov    %eax,%ebx
0x08a94403:  jmp    0x8a9440b
0x08a94405:  add    0x4(%edx),%eax
0x08a94408:  movzbl (%eax),%ebx
0x08a9440b:  mov    $0x1,%esi
0x08a94410:  mov    %ebx,%eax
0x08a94412:  and    %esi,%eax
0x08a94414:  mov    %eax,0x2c(%ebp)
0x08a94417:  movl   $0x16,0x30(%ebp)
0x08a9441e:  cmpb   $0x0,0x2c(%ebp)
0x08a94422:  jne    0x8a94429
0x08a94424:  jmp    0x8a9443b
0x08a94429:  jmp    0x996257d
0x08a9442e:  movl   $0x2d7,0x20(%ebp)
0x08a94435:  mov    $0x83ff788,%ebx
0x08a9443a:  ret    
0x08a9443b:  jmp    0x996258b
0x08a94440:  movl   $0x2d9,0x20(%ebp)
0x08a94447:  mov    $0x83ff789,%ebx
0x08a9444c:  ret    

EAX=00100200 EBX=00003b5e ECX=00000000 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=00000a3e
EIP=000002d7 EFL=00023202 [-------]    CPL=3 II=0 A20=1
ES =c9fc 000c9fc0 0000ffff 00000000
CS =03e3 00003e30 0000ffff 00000000
SS =00cf 00000cf0 0000ffff 00000000
DS =00cf 00000cf0 0000ffff 00000000
FS =0000 00000000 0000ffff 00000000
GS =0000 00000000 0000ffff 00000000
LDT=0008 00003b64 00000020 00008200
TR =0010 00110000 00002069 00008911
GDT=     00003ae4 0000007f
IDT=     00124634 000007ff
CR0=e0000011 CR2=00000000 CR3=00125000 CR4=00000000
CCS=00000001 CCD=00000001 CCO=LOGICB  
----------------
IN: 
0x00004107:  sti    

OP:
0x0000: sti
0x0001: set_inhibit_irq
0x0002: movl_eip_im 0x2d8
0x0003: movl_T0_0
0x0004: exit_tb
0x0005: end

AFTER FLAGS OPT:
0x0000: sti
0x0001: set_inhibit_irq
0x0002: movl_eip_im 0x2d8
0x0003: movl_T0_0
0x0004: exit_tb
0x0005: end

OUT: [size=21]
0x08a94450:  orl    $0x200,0x24(%ebp)
0x08a94457:  orl    $0x8,0x38(%ebp)
0x08a9445b:  movl   $0x2d8,0x20(%ebp)
0x08a94462:  xor    %ebx,%ebx
0x08a94464:  ret    

EAX=00100200 EBX=00003b5e ECX=00000000 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=00000a3e
EIP=000002d8 EFL=00023202 [-------]    CPL=3 II=1 A20=1
ES =c9fc 000c9fc0 0000ffff 00000000
CS =03e3 00003e30 0000ffff 00000000
SS =00cf 00000cf0 0000ffff 00000000
DS =00cf 00000cf0 0000ffff 00000000
FS =0000 00000000 0000ffff 00000000
GS =0000 00000000 0000ffff 00000000
LDT=0008 00003b64 00000020 00008200
TR =0010 00110000 00002069 00008911
GDT=     00003ae4 0000007f
IDT=     00124634 000007ff
CR0=e0000011 CR2=00000000 CR3=00125000 CR4=00000000
CCS=00000001 CCD=00000001 CCO=LOGICB  
----------------
IN: 
0x00004108:  hlt    

OP:
0x0000: movl_eip_im 0x2d8
0x0001: raise_exception 0xd
0x0002: end

AFTER FLAGS OPT:
0x0000: movl_eip_im 0x2d8
0x0001: raise_exception 0xd
0x0002: end

OUT: [size=23]
0x08a94470:  movl   $0x2d8,0x20(%ebp)
0x08a94477:  sub    $0x4,%esp
0x08a9447a:  movl   $0xd,(%esp,1)
0x08a94481:  call   0x80ccf40
0x08a94486:  pop    %eax

EAX=00100200 EBX=00003b5e ECX=00000000 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=000001d8
EIP=00000754 EFL=00003002 [-------]    CPL=0 II=1 A20=1
ES =0000 00000000 00000000 00000000
CS =000c 00122070 000025c3 00009a12
SS =0038 000036b0 00000200 00009200
DS =0000 00000000 00000000 00000000
FS =0000 00000000 00000000 00000000
GS =0000 00000000 00000000 00000000
LDT=0008 00003b64 00000020 00008200
TR =0010 00110000 00002069 00008911
GDT=     00003ae4 0000007f
IDT=     00124634 000007ff
CR0=e0000011 CR2=00000000 CR3=00125000 CR4=00000000
CCS=00000001 CCD=00000001 CCO=LOGICB  
----------------
IN: 
0x001227c4:  call   0x2070

OP:
0x0000: movl_T0_im 0x757
0x0001: movl_A0_ESP
0x0002: subl_A0_2
0x0003: andl_A0_ffff
0x0004: movl_T1_A0
0x0005: addl_A0_SS
0x0006: stw_kernel_T0_A0
0x0007: movw_ESP_T1
0x0008: movl_eip_im 0x0
0x0009: reset_inhibit_irq
0x000a: movl_T0_0
0x000b: exit_tb
0x000c: end

AFTER FLAGS OPT:
0x0000: movl_T0_im 0x757
0x0001: movl_A0_ESP
0x0002: subl_A0_2
0x0003: andl_A0_ffff
0x0004: movl_T1_A0
0x0005: addl_A0_SS
0x0006: stw_kernel_T0_A0
0x0007: movw_ESP_T1
0x0008: movl_eip_im 0x0
0x0009: reset_inhibit_irq
0x000a: movl_T0_0
0x000b: exit_tb
0x000c: end

OUT: [size=92]
0x08a94490:  mov    $0x757,%ebx
0x08a94495:  mov    0x10(%ebp),%edi
0x08a94498:  sub    $0x2,%edi
0x08a9449b:  and    $0xffff,%edi
0x08a944a1:  mov    %edi,%esi
0x08a944a3:  mov    0x60(%ebp),%ecx
0x08a944a6:  add    %ecx,%edi
0x08a944a8:  mov    %edi,%edx
0x08a944aa:  mov    %edi,%eax
0x08a944ac:  shr    $0x9,%edx
0x08a944af:  and    $0xfffff001,%eax
0x08a944b4:  and    $0x7f8,%edx
0x08a944ba:  lea    0x1344(%edx,%ebp,1),%edx
0x08a944c1:  cmp    (%edx),%eax
0x08a944c3:  mov    %edi,%eax
0x08a944c5:  je     0x8a944d4
0x08a944c7:  movzwl %bx,%edx
0x08a944ca:  push   $0x0
0x08a944cc:  call   0x80d3d10
0x08a944d1:  pop    %eax
0x08a944d2:  jmp    0x8a944da
0x08a944d4:  add    0x4(%edx),%eax
0x08a944d7:  mov    %bx,(%eax)
0x08a944da:  mov    %si,0x10(%ebp)
0x08a944de:  movl   $0x0,0x20(%ebp)
0x08a944e5:  andl   $0xfffffff7,0x38(%ebp)
0x08a944e9:  xor    %ebx,%ebx
0x08a944eb:  ret    

EAX=00100200 EBX=00003b5e ECX=00000034 EDX=00000001
ESI=00000a6c EDI=00000001 EBP=00000a62 ESP=000001ca
EIP=000000d6 EFL=00003002 [-------]    CPL=0 II=0 A20=1
ES =0000 00000000 00000000 00000000
CS =000c 00122070 000025c3 00009a12
SS =0038 000036b0 00000200 00009200
DS =0000 00000000 00000000 00000000
FS =0000 00000000 00000000 00000000
GS =0000 00000000 00000000 00000000
LDT=0008 00003b64 00000020 00008200
TR =0010 00110000 00002069 00008911
GDT=     00003ae4 0000007f
IDT=     00124634 000007ff
CR0=e0000011 CR2=00000000 CR3=00125000 CR4=00000000
CCS=000001ca CCD=00000000 CCO=SUBL    

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-20 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-09 10:01 [Qemu-devel] patch for serial port support(linux host only) Cai Qiang
2005-05-09  7:04 ` Filip Navara
2005-05-09 15:31   ` Cai Qiang
2005-05-20 16:42 ` [Qemu-devel] FreeDOS FDAPM kills Keybord Andreas Bollhalder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).