]> git.pld-linux.org Git - packages/dosemu.git/commitdiff
- fix problem with DPMI running on kernel 2.6
authormigo <migo@pld-linux.org>
Sun, 28 Dec 2003 21:40:12 +0000 (21:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dosemu-kernel-2.6.patch -> 1.1

dosemu-kernel-2.6.patch [new file with mode: 0644]

diff --git a/dosemu-kernel-2.6.patch b/dosemu-kernel-2.6.patch
new file mode 100644 (file)
index 0000000..0b44b02
--- /dev/null
@@ -0,0 +1,50 @@
+--- dosemu-1.1.5/src/dosext/dpmi/dpmi.h      17 Sep 2003 14:40:54 -0000      1.1.2.2
++++ dosemu-1.1.5/src/dosext/dpmi/dpmi.h      30 Sep 2003 00:36:51 -0000      1.1.2.3
+@@ -31,8 +31,8 @@
+ /* Aargh!! Is this the only way we have to know if a signal interrupted
+  * us in DPMI server or client code? */
+ #ifdef __linux__
+-#define UCODESEL 0x23
+-#define UDATASEL 0x2b
++#define UCODESEL ucodesel
++#define UDATASEL udatasel
+ #endif
+
+ /* DANG_BEGIN_REMARK
+--- dosemu-1.1.5/src/emu-i386/cpu.c       23 Jun 2003 00:02:08 -0000      1.1.1.1
++++ dosemu-1.1.5/src/emu-i386/cpu.c       30 Sep 2003 00:36:51 -0000      1.1.1.1.4.1
+@@ -96,6 +96,12 @@
+ };
+ #endif
+
++/* DOSEMU code selector and data selector. Initialized at startup.
++ * These used to be 0x23 and 0x2b, but change to 0x73 and 0x7b
++ * in Linux kernel 2.6
++ */
++unsigned short ucodesel, udatasel;
++
+ /*
+  * DANG_BEGIN_FUNCTION cpu_trap_0f
+  *
+@@ -241,6 +247,12 @@
+ #else
+   REG(eflags) |= (VIF | VIP);
+ #endif
++
++  /* initialize user data & code selector values (used by DPMI code) */
++  __asm__ volatile (
++  " movw %%cs, ucodesel\n"
++  " movw %%ds, udatasel\n"
++  ::);
+
+ #ifdef X86_EMULATOR
+   if (config.cpuemu) {
+--- dosemu-1.1.5/src/include/cpu.h       23 Jun 2003 21:13:15 -0000      1.2
++++ dosemu-1.1.5/src/include/cpu.h       30 Sep 2003 00:36:51 -0000      1.2.4.1
+@@ -301,4 +301,6 @@
+ extern int write_port_w(unsigned int value,unsigned short port);
+ int do_soft_int(int intno);
+
++extern unsigned short ucodesel, udatasel;
++
+ #endif /* CPU_H */
This page took 0.082028 seconds and 4 git commands to generate.