Hi *, I have a DOS program which needs direct access to a specific PCI card (Eyelink II eye tracker). When I start the program (all ports are set in the dosemu configuration) dosemu crashes with the following debug messages: PCIBIOS: pcibios present ERROR: Fault handler re-entered! signal=11 _trapno=0xE ERROR: cpu exception in dosemu code outside of DPMI client! trapno: 0x0e errorcode: 0x00000004 cr2: 0x00cf10ba eip: 0x0808adc5 esp: 0xbfd44b10 eflags: 0x00010202 cs: 0x0073 ds: 0x007b es: 0x007b ss: 0x007b Can anybody help me or is it not possible to use direct PCI access in dosemu? Here are more details: The output of lspci for the card is: 04:02.0 Class ff45: PLX Technology, Inc. PCI <-> IOBus Bridge (prog-if 4c) Subsystem: Unknown device 454c:1000 Flags: bus master, medium devsel, latency 64, IRQ 3 Memory at f7bfef00 (32-bit, non-prefetchable) [size=256] I/O ports at dc00 [size=256] Memory at f7bff000 (32-bit, non-prefetchable) [size=4K] Memory at f7c00000 (32-bit, non-prefetchable) [size=1M] Capabilities: [40] Power Management version 1 Capabilities: [48] #17 [0080] Therefore I set the following parameters in dosemu.conf: $_ports = "range 0xdc00,(0xdc00+256)" $_irqpassing = "3" $_pci = (on) running dosemu 1.3.3 with >> dosemu -s -DZh and starting the program I get the attached boot.log Thank you in advance! best, -- Thomas Tanner ---------------- email: tanner@xxxxxxxxxxxxxxxx phone: (+49) 7071 601 608 GnuPG key id: 1024/5924D4DD Max Planck Institute for Biological Cybernetics Spemannstrasse 38 72076 Tübingen, Germany
CONF: config variable parser_version_3 set CONF: config variable c_system set CONF: Parsing built-in dosemu.conf file. CONF: config variable version_3_style_used set CONF: Parsing built-in global.conf file. CONF: config variable version_3_style_used unset CONF: config variable version_3_style_used set CONF: opened include file /etc/dosemu/dosemu.conf CONF: closed include file /etc/dosemu/dosemu.conf CONF: mapping driver = 'auto' debug flags: -a+cw CONF: Disabling use of pentium timer CONF: dosbanner on CONF: timer freq=18, update=54925 CONF: CPU set to 386 CONF: CPUEMU set to 0 for 386 CONF: 8192k bytes XMS memory CONF: 2048k bytes EMS memory CONF: EMS-frame = 0xe400 CONF: DPMI-Server on (0x5000) CONF: DPMI base addr = 0x10000000 CONF: PM DOS API Translator on CONF: No DJGPP NULL deref checks: off CONF: dosemu running on console CONF: VGA-BIOS-Segment 0 CONF: VGA-BIOS-Segment set to 0xc000 CONF: VGA-BIOS-Size 0 CONF: VGA-BIOS-Size set to 0x10000 CHIPSET: 12 CONF: time mode = 'bios' SER: directory /var/lock namestub LCK.. binary No MOUSE: no device specified, type 0 using internaldriver: yes, emulate3buttons: no baudrate: 0 CONF: Keyboard-layout keyb-user CONF: **** Warning: floppy /dev/fd0 not accessable, disabled CONF: fastfloppy = 1 CONF: IPX support off CONF(LPT0) f: (null) c: lpr -l t: 20 port: 0 CONF(LPT1) f: (null) c: lpr -l -P lpt2 t: 20 port: 0 CONF(LPT2) f: (null) c: lpr -l -P lpt3 t: 20 port: 0 CONF: not allowing speaker port access CONF: IRQ 3 for irqpassing uses SIGIO CONF: Packet Driver enabled. CONF: range of I/O ports 0xdc00-0xdd00 ERROR: Port I/O requires root privs device: /var/lib/dosemu/freedos type 4 h: -1 s: -1 t: -1 drive C: CONF: config variable c_system unset debug flags: Zh Linux kernel 2.6.17; CPU speed is 2800000000 Hz CPU-EMU speed is 2800 MHz CONF: running exclusively as ROOT: uid=0 (cached 0) gid=0 (cached 0) CONF: Warning: PCI requires root, disabled DBG_FD already set DOSEMU-1.3.3.0 is coming up on Linux version 2.6.17.3 CONF: reserving 640Kb at 0x00000 for 'd' (Base DOS memory (first 640K)) CONF: reserving 48Kb at 0xF4000 for 'r' (Dosemu reserved area) CPU: Stack bottom 0xbfd31000, top 0xbfd48000, esp=0xbfd35120 major = 4 minor = 1 CONF: reserving 128Kb at 0xA0000 for 'v' (Video memory) CONF: reserving 4Kb at 0xC0000 for 'V' (VGAEMU Video BIOS) SERIAL $Header: /cvsroot/dosemu/dosemu/src/base/serial/ser_init.c,v 1.23 2005/08/22 00:05:17 bartoldeman Exp $ DMA: DMA Controller initialized - 8 & 16 bit modes DMA: Installing DMA Handler on channel 1 DMA: Installing DMA Handler on channel 5 PKT: Cannot allocate TAP device (dynamic): Kein passendes Gerät gefunden CONF: reserving 64Kb at 0xE4000 for 'E' (EMS page frame) CONF: reserving 140Kb at 0xC1000 for 'U' (Upper Memory Block (UMB, XMS 3.0)) TIME: using 9154 usec for updating ALRM timer DMA: DMA Controller Reset - 8 & 16 bit modes TICKS: update ticks to 937933 TICKS: update ticks to 937933 TICKS: update ticks to 937932 TICKS: update ticks to 937932 TICKS: update ticks to 937925 TICKS: update ticks to 937928 TICKS: update ticks to 937928 TICKS: update ticks to 937928 TICKS: update ticks to 937928 TICKS: update ticks to 937928 TICKS: update ticks to 937928 TICKS: update ticks to 937929 TICKS: update ticks to 937929 TICKS: update ticks to 937929 TICKS: update ticks to 937929 TICKS: update ticks to 937929 TICKS: update ticks to 937929 TICKS: update ticks to 937929 8042: read port 0x60 = 0x21 8042: read port 0x60 = 0xa1 8042: read port 0x60 = 0x2a 8042: read port 0x60 = 0x27 8042: read port 0x60 = 0xaa 8042: read port 0x60 = 0xa7 8042: read port 0x60 = 0x1c 8042: read port 0x60 = 0x9c 8042: read port 0x60 = 0x2e 8042: read port 0x60 = 0xae 8042: read port 0x60 = 0x20 8042: read port 0x60 = 0xa0 8042: read port 0x60 = 0x39 8042: read port 0x60 = 0xb9 8042: read port 0x60 = 0x12 8042: read port 0x60 = 0x92 8042: read port 0x60 = 0x2d 8042: read port 0x60 = 0xad 8042: read port 0x60 = 0x12 8042: read port 0x60 = 0x92 8042: read port 0x60 = 0x1c 8042: read port 0x60 = 0x9c 8042: read port 0x60 = 0x12 8042: read port 0x60 = 0x92 8042: read port 0x60 = 0x15 8042: read port 0x60 = 0x95 8042: read port 0x60 = 0x12 8042: read port 0x60 = 0x92 8042: read port 0x60 = 0x26 8042: read port 0x60 = 0xa6 8042: read port 0x60 = 0x17 8042: read port 0x60 = 0x97 8042: read port 0x60 = 0x31 8042: read port 0x60 = 0xb1 8042: read port 0x60 = 0x25 8042: read port 0x60 = 0xa5 8042: read port 0x60 = 0x03 8042: read port 0x60 = 0x83 8042: read port 0x60 = 0x1c 8042: read port 0x60 = 0x9c TICKS: update ticks to 938015 TICKS: update ticks to 938015 TICKS: update ticks to 938016 TICKS: update ticks to 938016 PCIBIOS: pcibios present ERROR: Fault handler re-entered! signal=11 _trapno=0xE ERROR: cpu exception in dosemu code outside of DPMI client! trapno: 0x0e errorcode: 0x00000004 cr2: 0x00cf10ba eip: 0x0808adc5 esp: 0xbfd44b10 eflags: 0x00010202 cs: 0x0073 ds: 0x007b es: 0x007b ss: 0x007b System info: linux-gate.so.1 => (0xffffe000) librt.so.1 => /lib/tls/librt.so.1 (0xb7f63000) libdl.so.2 => /lib/tls/libdl.so.2 (0xb7f5f000) libc.so.6 => /lib/tls/libc.so.6 (0xb7e26000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7e14000) /lib/ld-linux.so.2 (0xb7f8e000) glibc 2.3.6 NPTL 2.3.6 Es werden eingebaute Spezifikationen verwendet. Ziel: i486-linux-gnu Konfiguriert mit: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu Thread-Modell: posix gcc-Version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3) Linux exp2lin 2.6.17.3 #1 PREEMPT Fri Jul 7 20:44:38 CEST 2006 i686 GNU/Linux 00000000-000a0000 rwxs 00000000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a0000-000a1000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a1000-000a2000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a2000-000a3000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a3000-000a4000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a4000-000a5000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a5000-000a6000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a6000-000a7000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a7000-000a8000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a8000-000a9000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000a9000-000aa000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000aa000-000ab000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000ab000-000ac000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000ac000-000ad000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000ad000-000ae000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000ae000-000af000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000af000-000b0000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b0000-000b1000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b1000-000b2000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b2000-000b3000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b3000-000b4000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b4000-000b5000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b5000-000b6000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b6000-000b7000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b7000-000b8000 rwxs 00210000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000b8000-000c0000 rwxs 00110000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000c0000-000c1000 r-xs 000c0000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 000c1000-00110000 rwxs 000c1000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) 08048000-0819b000 r-xp 00000000 03:02 1401205 /usr/bin/dosemu.bin 0819b000-081c6000 rwxp 00153000 03:02 1401205 /usr/bin/dosemu.bin 081c6000-0869d000 rwxp 081c6000 00:00 0 [heap] 10000000-10001000 ---p 10000000 00:00 0 10001000-11405000 rwxp 10001000 00:00 0 b6973000-b7183000 rwxp b6973000 00:00 0 b7183000-b7a93000 rwxs 00000000 00:0e 13788 /dev/shm/dosemu_6938 (deleted) b7a93000-b7ab7000 r-xp 00000000 03:02 1421435 /lib/tls/libm-2.3.6.so b7ab7000-b7ab9000 rwxp 00023000 03:02 1421435 /lib/tls/libm-2.3.6.so b7ab9000-b7b4c000 r-xp 00000000 03:02 1417068 /lib/libslang.so.2.0.6 b7b4c000-b7b5c000 rwxp 00092000 03:02 1417068 /lib/libslang.so.2.0.6 b7b5c000-b7b7b000 rwxp b7b5c000 00:00 0 b7b7d000-b7b9c000 r-xp 00000000 03:02 1403008 /usr/share/locale/de/LC_MESSAGES/libc.mo b7b9c000-b7bd1000 r-xs 00000000 03:02 964649 /var/db/nscd/passwd b7bd1000-b7dc3000 r-xp 00000000 03:02 1433784 /usr/lib/locale/locale-archive b7dc3000-b7dc4000 rwxp b7dc3000 00:00 0 b7dc4000-b7dd2000 r-xp 00000000 03:02 1421445 /lib/tls/libpthread-2.3.6.so b7dd2000-b7dd4000 rwxp 0000d000 03:02 1421445 /lib/tls/libpthread-2.3.6.so b7dd4000-b7dd6000 rwxp b7dd4000 00:00 0 b7dd6000-b7f04000 r-xp 00000000 03:02 1421431 /lib/tls/libc-2.3.6.so b7f04000-b7f09000 r-xp 0012e000 03:02 1421431 /lib/tls/libc-2.3.6.so b7f09000-b7f0c000 rwxp 00133000 03:02 1421431 /lib/tls/libc-2.3.6.so b7f0c000-b7f0f000 rwxp b7f0c000 00:00 0 b7f0f000-b7f11000 r-xp 00000000 03:02 1421434 /lib/tls/libdl-2.3.6.so b7f11000-b7f13000 rwxp 00001000 03:02 1421434 /lib/tls/libdl-2.3.6.so b7f13000-b7f19000 r-xp 00000000 03:02 1421447 /lib/tls/librt-2.3.6.so b7f19000-b7f1b000 rwxp 00006000 03:02 1421447 /lib/tls/librt-2.3.6.so b7f25000-b7f26000 r-xp 00000000 03:02 1403927 /usr/share/locale/en_GB/LC_MESSAGES/libc.mo b7f26000-b7f28000 r-xp 00000000 03:02 1405943 /usr/lib/gconv/ISO8859-15.so b7f28000-b7f2a000 rwxp 00001000 03:02 1405943 /usr/lib/gconv/ISO8859-15.so b7f2a000-b7f2f000 r-xp 00000000 03:02 1404907 /usr/lib/libgpm.so.1.19.6 b7f2f000-b7f30000 rwxp 00004000 03:02 1404907 /usr/lib/libgpm.so.1.19.6 b7f30000-b7f31000 r-xp 00000000 03:02 1695018 /usr/local/lib/dosemu/libplugin_gpm.so b7f31000-b7f32000 rwxp 00000000 03:02 1695018 /usr/local/lib/dosemu/libplugin_gpm.so b7f32000-b7f39000 r-xp 00000000 03:02 1695020 /usr/local/lib/dosemu/libplugin_term.so b7f39000-b7f3b000 rwxp 00006000 03:02 1695020 /usr/local/lib/dosemu/libplugin_term.so b7f3b000-b7f3e000 rwxp b7f3b000 00:00 0 b7f3e000-b7f53000 r-xp 00000000 03:02 1418073 /lib/ld-2.3.6.so b7f53000-b7f55000 rwxp 00015000 03:02 1418073 /lib/ld-2.3.6.so bfd2d000-bfd48000 rwxp bfd2d000 00:00 0 [stack] ffffe000-fffff000 ---p 00000000 00:00 0 [vdso] Debug info: gdb /usr/bin/dosemu.bin GNU gdb 6.4.90-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu"...attach 6938 info registers backtrace full detach quit Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) Attaching to program: /usr/bin/dosemu.bin, process 6938 Reading symbols from /lib/tls/librt.so.1...done. Loaded symbols for /lib/tls/librt.so.1 Reading symbols from /lib/tls/libdl.so.2...done. Loaded symbols for /lib/tls/libdl.so.2 Reading symbols from /lib/tls/libc.so.6...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/tls/libpthread.so.0...done. [Thread debugging using libthread_db enabled] [New Thread -1210304832 (LWP 6938)] Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/local/lib/dosemu/libplugin_term.so...done. Loaded symbols for /usr/local/lib/dosemu/libplugin_term.so Reading symbols from /lib/libslang.so.2...done. Loaded symbols for /lib/libslang.so.2 Reading symbols from /lib/tls/libm.so.6...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /usr/local/lib/dosemu/libplugin_gpm.so...done. Loaded symbols for /usr/local/lib/dosemu/libplugin_gpm.so Reading symbols from /usr/lib/libgpm.so.1...done. Loaded symbols for /usr/lib/libgpm.so.1 Reading symbols from /usr/lib/gconv/ISO8859-15.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-15.so 0xb7e67ace in waitpid () from /lib/tls/libc.so.6 (gdb) eax 0xfffffe00 -512 ecx 0xbfd44720 -1076607200 edx 0x0 0 ebx 0x1b31 6961 esp 0xbfd446f8 0xbfd446f8 ebp 0x10202 0x10202 esi 0x1b1a 6938 edi 0xbfd44834 -1076606924 eip 0xb7e67ace 0xb7e67ace <waitpid+30> eflags 0x246 [ PF ZF IF ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51 (gdb) #0 0xb7e67ace in waitpid () from /lib/tls/libc.so.6 No symbol table info available. #1 0x0808cfed in gdb_debug () at debug.c:112 dosemu_pid = 6938 dbg_pid = 0 status = 0 #2 0x0808b876 in dosemu_fault1 (signal=11, scp=0xbfd44834) at sigsegv.c:291 No locals. #3 0x0808bfcd in dosemu_fault (signal=11, context= {gs = 51, __gsh = 0, fs = 0, __fsh = 0, es = 123, __esh = 49168, ds = 123, __dsh = 0, edi = 3218362076, esi = 276708412, ebp = 3218362036, esp = 3218361104, ebx = 3218362068, edx = 0, ecx = 136166048, eax = 13570234, trapno = 14, err = 4, eip = 134786501, cs = 115, __csh = 0, eflags = 66050, esp_at_signal = 3218361104, ss = 123, __ssh = 0, fpstate = 0xbfd4488c, oldmask = 268446208, cr2 = 13570234}) at sigsegv.c:386 No locals. #4 <signal handler called> SIGNAL_head = 26 signal_queue = {{ signal_handler = 0x808c870 <SIGALRM_call>} <repeats 50 times>} have_working_sigaltstack = 1 SillyG_ = {{fd = -1, irq = 3}, {fd = 0, irq = 0} <repeats 16 times>} SillyG = (SillyG_t *) 0x81c6cc0 SIGNAL_tail = 26 #5 pci_bios () at pci_bios.c:88 No locals. #6 0x0808a04d in int1a () at int.c:1143 stb = <value optimized out> h = <value optimized out> m = <value optimized out> s = <value optimized out> #7 0x080c59c5 in do_dpmi_int (scp=0xbfd44eb4, i=<value optimized out>) at dpmi.c:1917 x = <value optimized out> msdos_ret = <value optimized out> #8 0x080c7ace in dpmi_fault (scp=0xbfd44eb4) at dpmi.c:3822 __nflgs = <value optimized out> intr = 0 ssp = <value optimized out> csp = <value optimized out> lina = (unsigned char *) 0x1008ee23 "Í1s\rf£\0049v" esp_fixed = 0 orig_client = 0 #9 0x0808b679 in dosemu_fault1 (signal=11, scp=0xbfd44eb4) at sigsegv.c:259 No locals. #10 0x0808bfcd in dosemu_fault (signal=11, context= {gs = 231, __gsh = 0, fs = 183, __fsh = 0, es = 191, __esh = 49168, ds = 223, __dsh = 0, edi = 8272956, esi = 7736388, ebp = 8272904, esp = 8272888, ebx = 26, edx = 699354, ecx = 0, eax = 8258304, trapno = 13, err = 394, eip = 585253, cs = 215, __csh = 0, eflags = 66118, esp_at_signal = 8272888, ss = 191, __ssh = 0, fpstate = 0xbfd44f0c, oldmask = 0, cr2 = 0}) at sigsegv.c:386 No locals. #11 <signal handler called> SIGNAL_head = 26 signal_queue = {{ signal_handler = 0x808c870 <SIGALRM_call>} <repeats 50 times>} have_working_sigaltstack = 1 SillyG_ = {{fd = -1, irq = 3}, {fd = 0, irq = 0} <repeats 16 times>} SillyG = (SillyG_t *) 0x81c6cc0 SIGNAL_tail = 26 #12 0x0008ee25 in ?? () No symbol table info available. Cannot access memory at address 0x7e3bf8 (gdb) Detaching from program: /usr/bin/dosemu.bin, process 6938 (gdb) Page fault: read instruction to linear address: 0x00cf10ba CPU was in user mode Exception was caused by non-available page VFLAGS(b): 010000001000000010 EAX: 00cf10ba EBX: bfd44ed4 ECX: 081dbaa0 EDX: 00000000 VFLAGS(h): 00010202 ESI: 107e3c3c EDI: bfd44edc EBP: bfd44eb4 CS: 0073 DS: 007b ES: 007b FS: 0000 GS: 0033 FLAGS: IF RF IOPL: 0 OOPS : fe c6 05 19 61 1c 08 00 8b 00 -> 80 38 32 0f 94 c0 fe c0 a2 18 leavedos(4|0x4) called - shutting down leavedos() called from within a signal context!