qemu/slirp bootp.c bootp.h ip_icmp.h libslirp.h...
CVSROOT: /cvsroot/qemu
Module name: qemu
Branch:
Changes by: Fabrice Bellard <[email protected]> 05/06/05 17:11:42
Modified files:
slirp : bootp.c bootp.h ip_icmp.h libslirp.h
slirp_config.h udp.c udp.h
Log message:
64 bit fixes (initial patch by Gwenole Beauchesne)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/bootp.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/bootp.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/ip_icmp.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/libslirp.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/slirp_config.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/udp.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/udp.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Hello
On my WinXP host, I get a compile error in "udp.c" with the current QEMU version from the CVS. I use MinGW and MSYS (1.0.10). I was able to compile all versions of QEMU before.
Maybe, I'm too early and miss some updates which are on the way...
Andreas
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I/d/dev/QEMU/qemu/target-i386 -I/d/dev/QEMU/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/d/dev/QEMU/qemu/fpu -I/d/dev/QEMU/qemu/slirp -c -o slirp/udp.o /d/dev/QEMU/qemu/slirp/udp.c
d:/dev/QEMU/qemu/slirp/udp.c: In function `udp_emu':
d:/dev/QEMU/qemu/slirp/udp.c:428: warning: no semicolon at end of struct or union
d:/dev/QEMU/qemu/slirp/udp.c:428: parse error before '.' token d:/dev/QEMU/qemu/slirp/udp.c:405: warning: unused variable addrlen' d:/dev/QEMU/qemu/slirp/udp.c:429: warning: unused variable seqn' d:/dev/QEMU/qemu/slirp/udp.c:430: warning: unused variable message' d:/dev/QEMU/qemu/slirp/udp.c:431: warning: unused variable data_type' d:/dev/QEMU/qemu/slirp/udp.c:432: warning: unused variable `pkt_len' d:/dev/QEMU/qemu/slirp/udp.c: At top level:
d:/dev/QEMU/qemu/slirp/udp.c:433: warning: type defaults to int' in declaration of cu_head'
d:/dev/QEMU/qemu/slirp/udp.c:433: warning: data definition has no type or storage class
d:/dev/QEMU/qemu/slirp/udp.c:435: parse error before "switch" d:/dev/QEMU/qemu/slirp/udp.c:618: warning: type defaults to int' in declaration of cu_head'
d:/dev/QEMU/qemu/slirp/udp.c:618: conflicting types for cu_head' d:/dev/QEMU/qemu/slirp/udp.c:433: previous declaration of cu_head' d:/dev/QEMU/qemu/slirp/udp.c:618: `m' undeclared here (not in a function)
d:/dev/QEMU/qemu/slirp/udp.c:618: warning: data definition has no type or storage class
d:/dev/QEMU/qemu/slirp/udp.c:619: parse error before '->' token
make: *** [slirp/udp.o] Error 1
Quoted 22 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Fabrice Bellard
Sent: Sunday, June 05, 2005 7:12 PM
To: [email protected]
Subject: [Qemu-devel] qemu/slirpbootp.cbootp.hip_icmp.hlibslirp.h...*This message was transferred with a trial version of CommuniGate(tm) Pro*
CVSROOT: /cvsroot/qemu
Module name: qemu
Branch:
Changes by: Fabrice Bellard <[email protected]>
05/06/05 17:11:42Modified files:
slirp :bootp.cbootp.hip_icmp.hlibslirp.h
slirp_config.hudp.cudp.h
Quoted 5 lines
Log message:
64 bit fixes (initial patch by Gwenole Beauchesne)CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/bootp.
c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/bootp.h.diff?t
r1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/ip_icmp.h.diff
?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/libslirp.h.dif
f?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/slirp_config.h
.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/udp.c.diff?tr1
=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/slirp/udp.h.diff?tr1
=1.1&tr2=1.2&r1=text&r2=text
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Le Sun, 05 Jun 2005 20:00:12 +0200, Andreas Bollhalder a écrit :
Quoted 7 lines
Hello
On my WinXP host, I get a compile error in "
udp.c" with the current QEMU version from the CVS. I use MinGW and MSYS (1.0.10). I was able to compile all versions of QEMU before.Maybe, I'm too early and miss some updates which are on the way...
s_addr is already in use in winsock2.h
8< --
struct in_addr {
union {
struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
struct { u_short s_w1,s_w2; } S_un_w;
u_long S_addr;
} S_un;
#define s_addr S_un.S_addr
#define s_host S_un.S_un_b.s_b2
#define s_net S_un.S_un_b.s_b1
#define s_imp S_un.S_un_w.s_w2#define s_impno S_un.S_un_b.s_b4
#define s_lh S_un.S_un_b.s_b3
};
8< --
I can built if I change the name.
udp.c.try renamed from udp.c +2 -2
@@ -425,7 +425,7 @@ uint32_t d_addr; // destination address uint16_t s_family; // source family uint16_t s_port; // source port - uint32_t s_addr; // source address + uint32_t so_addr; // source address uint32_t seqn; // sequence number uint16_t message; // message uint16_t data_type; // data type
@@ -617,7 +617,7 @@ return; cu_head = mtod(m, struct cu_header *); cu_head->s_port = addr.sin_port; - cu_head->s_addr = our_addr.s_addr; + cu_head->so_addr = our_addr.s_addr; } return;
Quoted 32 lines
Andreas
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I.
(quoted diff) +0
-3-I/d/dev/QEMU/qemu/target-i386 -I/d/dev/QEMU/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/d/dev/QEMU/qemu/fpu -I/d/dev/QEMU/qemu/slirp -c -o slirp/udp.o /d/dev/QEMU/qemu/slirp/udp.cd:/dev/QEMU/qemu/slirp/udp.c: In function `udp_emu':
d:/dev/QEMU/qemu/slirp/udp.c:428: warning: no semicolon at end of struct or union
d:/dev/QEMU/qemu/slirp/udp.c:428: parse error before '.' token d:/dev/QEMU/qemu/slirp/udp.c:405: warning: unused variableaddrlen' d:/dev/QEMU/qemu/slirp/udp.c:429: warning: unused variableseqn' d:/dev/QEMU/qemu/slirp/udp.c:430: warning: unused variablemessage' d:/dev/QEMU/qemu/slirp/udp.c:431: warning: unused variabledata_type' d:/dev/QEMU/qemu/slirp/udp.c:432: warning: unused variable `pkt_len' d:/dev/QEMU/qemu/slirp/udp.c: At top level:
d:/dev/QEMU/qemu/slirp/udp.c:433: warning: type defaults toint' in declaration ofcu_head'
d:/dev/QEMU/qemu/slirp/udp.c:433: warning: data definition has no type or storage class
d:/dev/QEMU/qemu/slirp/udp.c:435: parse error before "switch" d:/dev/QEMU/qemu/slirp/udp.c:618: warning: type defaults toint' in declaration ofcu_head'
d:/dev/QEMU/qemu/slirp/udp.c:618: conflicting types forcu_head' d:/dev/QEMU/qemu/slirp/udp.c:433: previous declaration ofcu_head' d:/dev/QEMU/qemu/slirp/udp.c:618: `m' undeclared here (not in a function) d:/dev/QEMU/qemu/slirp/udp.c:618: warning: data definition has no type or storage class
d:/dev/QEMU/qemu/slirp/udp.c:619: parse error before '->' token make: *** [slirp/udp.o] Error 1
Hello
This did it and I have it up and working. Thank a lot!!
Andreas
Quoted 73 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ronald
Sent: Monday, June 06, 2005 3:02 AM
To: [email protected]
Subject: [Qemu-devel] RE: qemu/slirpbootp.cbootp.hip_icmp.hlibslirp.h...*This message was transferred with a trial version of CommuniGate(tm) Pro*
Le Sun, 05 Jun 2005 20:00:12 +0200, Andreas Bollhalder a écrit :Quoted 3 lines
Hello
On my WinXP host, I get a compile error in "
udp.c" with thecurrent QEMU
Quoted 1 line
version from the CVS. I use MinGW and MSYS (1.0.10). I was
able to compile
Quoted 3 lines
all versions of QEMU before.
Maybe, I'm too early and miss some updates which are on the way...
s_addris already in use inwinsock2.h8< --
struct in_addr { union { struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b; struct { u_short s_w1,s_w2; } S_un_w; u_long S_addr; } S_un; #define s_addr S_un.S_addr #define s_host S_un.S_un_b.s_b2 #define s_net S_un.S_un_b.s_b1 #define s_imp S_un.S_un_w.s_w2#define
s_impnoS_un.S_un_b.s_b4
#defines_lhS_un.S_un_b.s_b3
};8< --
I can built if I change the name.
udp.c.try renamed from udp.c +1
-1@@ -425,7 +425,7 @@ uint32_t d_addr; // destination address uint16_t s_family; // source family uint16_t s_port; // source port - uint32_t s_addr; // source address + uint32_t so_addr; //source address
udp.c.try renamed from udp.c +1
-1uint32_t seqn; // sequence number uint16_t message; // message uint16_t data_type; // data type@@ -617,7 +617,7 @@ return; cu_head = mtod(m, struct cu_header *); cu_head->s_port = addr.sin_port; - cu_head->s_addr = our_addr.s_addr; + cu_head->so_addr = our_addr.s_addr; } return;Quoted 5 lines
Andreas
Quoted 11 lines
Review
Quoted 4 lines
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I.
(quoted diff) +0
-3-I/d/dev/QEMU/qemu/target-i386 -I/d/dev/QEMU/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/d/dev/QEMU/qemu/fpu -I/d/dev/QEMU/qemu/slirp -c -o slirp/udp.o/d/dev/QEMU/qemu/slirp/udp.c
Quoted 2 lines
d:/dev/QEMU/qemu/slirp/udp.c: In function `udp_emu':
d:/dev/QEMU/qemu/slirp/udp.c:428: warning: no semicolon atend of struct
Quoted 3 lines
or union
d:/dev/QEMU/qemu/slirp/udp.c:428: parse error before '.' token d:/dev/QEMU/qemu/slirp/udp.c:405: warning: unused variable
`addrlen'
Quoted 2 lines
Quoted 2 lines
d:/dev/QEMU/qemu/slirp/udp.c:429: warning: unused variable `seqn' d:/dev/QEMU/qemu/slirp/udp.c:430: warning: unused variable
`message'
Quoted 3 lines
Quoted 1 line
d:/dev/QEMU/qemu/slirp/udp.c:431: warning: unused variable
`data_type'
Quoted 1 line
d:/dev/QEMU/qemu/slirp/udp.c:432: warning: unused variable
`pkt_len'
Quoted 2 lines
Quoted 2 lines
d:/dev/QEMU/qemu/slirp/udp.c: At top level:
d:/dev/QEMU/qemu/slirp/udp.c:433: warning: type defaults to `int'
in
Quoted 6 lines
Quoted 2 lines
declaration of `cu_head' d:/dev/QEMU/qemu/slirp/udp.c:433: warning: data definition
has no type or
Quoted 3 lines
storage class
d:/dev/QEMU/qemu/slirp/udp.c:435: parse error before "switch" d:/dev/QEMU/qemu/slirp/udp.c:618: warning: type defaults to `int'
in
Quoted 3 lines
Quoted 3 lines
declaration of
cu_head' d:/dev/QEMU/qemu/slirp/udp.c:618: conflicting types forcu_head' d:/dev/QEMU/qemu/slirp/udp.c:433: previous declaration of
`cu_head'
Quoted 18 lines
Quoted 1 line
d:/dev/QEMU/qemu/slirp/udp.c:618: `m' undeclared here (not
in a function)
Quoted 1 line
d:/dev/QEMU/qemu/slirp/udp.c:618: warning: data definition
has no type or
Quoted 2 lines
storage class
d:/dev/QEMU/qemu/slirp/udp.c:619: parse error before '->'token make: ***
Quoted 2 lines
[
slirp/udp.o] Error 1_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] Writing to ROM-Range 0xC800-EFFF
In reply to RonaldHello
What does I need to change in the source code of QEMU that it would be possible to enable write access to the ROM adresses from 0xC800 up to 0xEFFF ? For instance, "UMBPCI.SYS"
(http://www.uwe-sieber.de/umbpci_e.html) can made this range accessible for direct access if no BIOS-ROM is using it. The original chipset which QEMU emulate (Intel 440FX) does allow this, but in QEMU, it won't work.
Any ideas ?
Andreas
Re: [Qemu-devel] Writing to ROM-Range 0xC800-EFFF
Quoted 10 lines · Andreas Bollhalder
Hello
What does I need to change in the source code of QEMU that it would be possible to enable write access to the ROM adresses from
0xC800up to0xEFFF? For instance, "UMBPCI.SYS"
(http://www.uwe-sieber.de/umbpci_e.html) can made this range accessible for direct access if no BIOS-ROM is using it. The original chipset which QEMU emulate (Intel 440FX) does allow this, but in QEMU, it won't work.
Quoted 4 lines
Any ideas ?
Andreas
I'd recommend looking at i440fx_init() in hw/pci.c as a starting point.
Also see if you can modify the constant IO_MEM_ROM.
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
Re: [Qemu-devel] Writing to ROM-Range 0xC800-EFFF
Hello Jim
Thank you for the tips. I will have a look into it. Would be nice if QEMU could allow us to enable write access to the BIOS memory range (shadow RAM) which isn't in use.
Andreas
Quoted 22 lines · Jim C. Brown
Quoted 10 lines · Andreas Bollhalder
Hello
What does I need to change in the source code of QEMU that it would be possible to enable write access to the ROM adresses from
0xC800up to0xEFFF? For instance, "UMBPCI.SYS"
(http://www.uwe-sieber.de/umbpci_e.html) can made this range accessible for direct access if no BIOS-ROM is using it. The original chipset which QEMU emulate (Intel 440FX) does allow this, but in QEMU, it won't work.Quoted 4 lines
Any ideas ?
Andreas
I'd recommend looking at
i440fx_init()inhw/pci.cas a starting point.Also see if you can modify the constant
IO_MEM_ROM.
[Qemu-devel] QEMU freeze with "Servicing hardware INT=0x08"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello
I'm using QEMU 0.8.0 CVS under Windows. In the x86 version, one of my DOS application freezes QEMU amd I have to close it.
I enabled the debugging with "-d in_asm,op_opt". At the end of the log file, I have over 1770 times the entry stating that QEMU is serving Int 0x08.
Is this because the DOS application is poorly written or could this be a problem of QEMU ?
What debug options are the best to use in my case ?
Thanks for your opinions.
Andreas
- ----------------
IN:0x0000cd0a: repnz scas %es:(%di),%ax
AFTER FLAGS OPT:0x0000: jnz_ecxw 0x00x0001: goto_tb1 0x174b6e00x0002: movl_eip_im 0xdbc0x0003: movl_T0_im 0x174b6e10x0004: exit_tb0x0005: movl_T0_EAX0x0006: movl_A0_EDI0x0007: andl_A0_ffff0x0008: addl_A0_seg 0x400x0009: lduw_user_T1_A00x000a: cmpl_T0_T1_cc0x000b: movl_T0_Dshiftw0x000c: addw_EDI_T00x000d: decw_ECX0x000e: set_cc_op 0xf0x000f: jz_subw 0x10x0010: goto_tb0 0x174b6e00x0011: movl_eip_im 0xdba0x0012: movl_T0_im 0x174b6e00x0013: exit_tb0x0014: end
- ----------------
IN:0x0000cd0c: jne 0xcd8b
AFTER FLAGS OPT:0x0000: setz_T0_cc0x0001: jnz_T0_label 0x00x0002: goto_tb0 0x174b7200x0003: movl_eip_im 0xe3b0x0004: movl_T0_im 0x174b7200x0005: exit_tb0x0006: goto_tb1 0x174b7200x0007: movl_eip_im 0xdbe0x0008: movl_T0_im 0x174b7210x0009: exit_tb0x000a: end
- ----------------
IN:
0x0000cd8b: addw $0x1,1114 0x0000cd90: adcw $0x0,1116 0x0000cd95: jmp 0xccd6
AFTER FLAGS OPT:0x0000: movl_A0_im 0x45a0x0001: addl_A0_seg 0x700x0002: movl_T1_im 0x10x0003: lduw_user_T0_A00x0004: addl_T0_T10x0005: stw_user_T0_A00x0006: update2_cc0x0007: movl_A0_im 0x45c0x0008: addl_A0_seg 0x700x0009: movl_T1_im 0x00x000a: lduw_user_T0_A00x000b: set_cc_op 0x70x000c: adcw_user_T0_T1_cc0x000d: goto_tb0 0x174b7600x000e: movl_eip_im 0xd860x000f: movl_T0_im 0x174b7600x0010: exit_tb0x0011: end
- ----------------
IN:
0x0000ccd6: mov $0x8001,%ax 0x0000ccd9: or %ax,%ax 0x0000ccdb: jmp 0xcd6c
AFTER FLAGS OPT:0x0000: movl_T0_im 0x80010x0001: movw_EAX_T00x0002: movl_T1_EAX0x0003: movl_T0_EAX0x0004: orl_T0_T10x0005: movw_EAX_T00x0006: update1_cc0x0007: set_cc_op 0x170x0008: goto_tb0 0x174b7a00x0009: movl_eip_im 0xe1c0x000a: movl_T0_im 0x174b7a00x000b: exit_tb0x000c: end
- ----------------
IN:
0x0000cd6c: pop %di 0x0000cd6d: mov %dx,%ds 0x0000cd6f: lret
AFTER FLAGS OPT:0x0000: movl_A0_ESP0x0001: andl_A0_ffff0x0002: addl_A0_SS0x0003: lduw_user_T0_A00x0004: addw_ESP_20x0005: movw_EDI_T00x0006: movl_T0_EDX0x0007: movl_seg_T0_vm 0x6c0x0008: movl_A0_ESP0x0009: andl_A0_ffff0x000a: movl_T1_A00x000b: addl_A0_seg 0x600x000c: lduw_user_T0_A00x000d: andl_T0_ffff0x000e: jmp_T00x000f: addl_A0_im 0x20x0010: lduw_user_T0_A00x0011: movl_seg_T0_vm 0x4c0x0012: addw_ESP_40x0013: movl_T0_00x0014: exit_tb0x0015: end
- ----------------
IN:0x00008c02: jne 0x8c09
AFTER FLAGS OPT:0x0000: setz_T0_cc0x0001: jnz_T0_label 0x00x0002: goto_tb0 0x174b8200x0003: movl_eip_im 0x3990x0004: movl_T0_im 0x174b8200x0005: exit_tb0x0006: goto_tb1 0x174b8200x0007: movl_eip_im 0x3940x0008: movl_T0_im 0x174b8210x0009: exit_tb0x000a: end
- ----------------
IN:
0x00008c09: pop %bx 0x00008c0a: jmp 0x8c13
AFTER FLAGS OPT:0x0000: movl_A0_ESP0x0001: andl_A0_ffff0x0002: addl_A0_SS0x0003: lduw_user_T0_A00x0004: addw_ESP_20x0005: movw_EBX_T00x0006: goto_tb0 0x174b8600x0007: movl_eip_im 0x3a30x0008: movl_T0_im 0x174b8600x0009: exit_tb0x000a: end
Servicing hardware INT=0x08
... 1770 times repeated
Servicing hardware INT=0x08
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFD6kaEkyKr2gmercERAlv/AKCS6Yt0Zvd/amFAYkYvv2jK91DXrACfd0rv V0CkkLrB4vxWstfeZ9q/lgY=
=juM5
-----END PGP SIGNATURE-----