Clear the direction flag (CLD) on entry to the kernel, to support future
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 8 May 2008 01:21:06 +0000 (01:21 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 8 May 2008 01:21:06 +0000 (01:21 +0000)
kernels compiled with GCC-4.3 or later.

sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/i386/exception.s
sys/platform/pc32/i386/support.s
sys/platform/pc32/icu/icu_vector.s

index b6a00d0..783a28a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     from: vector.s, 386BSD 0.1 unknown origin
  * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.47.2.5 2001/09/01 22:33:38 tegge Exp $
- * $DragonFly: src/sys/platform/pc32/apic/apic_vector.s,v 1.37 2008/01/14 15:27:16 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/apic/apic_vector.s,v 1.38 2008/05/08 01:21:06 dillon Exp $
  */
 
 #include "use_npx.h"
@@ -47,6 +47,7 @@
        pushl   %es ;                                                   \
        pushl   %fs ;                                                   \
        pushl   %gs ;                                                   \
+       cld ;                                                           \
        mov     $KDSEL,%ax ;                                            \
        mov     %ax,%ds ;                                               \
        mov     %ax,%es ;                                               \
index 1ea86a8..c65f37d 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/i386/exception.s,v 1.65.2.3 2001/08/15 01:23:49 peter Exp $
- * $DragonFly: src/sys/platform/pc32/i386/exception.s,v 1.31 2007/01/22 19:37:04 corecode Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/exception.s,v 1.32 2008/05/08 01:21:04 dillon Exp $
  */
 
 #include "use_npx.h"
@@ -715,6 +715,7 @@ IDTVEC(fpu)
        pushl   %es
        pushl   %fs
        pushl   %gs
+       cld
        mov     $KDSEL,%ax
        mov     %ax,%ds
        mov     %ax,%es
@@ -766,6 +767,7 @@ alltraps:
        pushl   %es
        pushl   %fs
        pushl   %gs
+       cld
        .globl  alltraps_with_regs_pushed
 alltraps_with_regs_pushed:
        mov     $KDSEL,%ax
@@ -816,6 +818,7 @@ IDTVEC(syscall)
        pushl   %es
        pushl   %fs
        pushl   %gs
+       cld
        mov     $KDSEL,%ax              /* switch to kernel segments */
        mov     %ax,%ds
        mov     %ax,%es
@@ -858,6 +861,7 @@ IDTVEC(int0x80_syscall)
        pushl   %es
        pushl   %fs
        pushl   %gs
+       cld
        mov     $KDSEL,%ax              /* switch to kernel segments */
        mov     %ax,%ds
        mov     %ax,%es
index ee41b1f..b4858fd 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/i386/support.s,v 1.67.2.5 2001/08/15 01:23:50 peter Exp $
- * $DragonFly: src/sys/platform/pc32/i386/support.s,v 1.20 2007/11/07 17:42:50 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/support.s,v 1.21 2008/05/08 01:21:04 dillon Exp $
  */
 
 #include "use_npx.h"
@@ -201,7 +201,7 @@ ENTRY(copyout)
        ja      copyout_fault1
 
        /*
-        * Convert copyout to memcpy_vector(dest:%edi, src:%esi, conut:%ecx)
+        * Convert copyout to memcpy_vector(dest:%edi, src:%esi, count:%ecx)
         */
        movl    %ebx,%ecx
        call    *memcpy_vector
index a490d3a..f5cbbf2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     from: vector.s, 386BSD 0.1 unknown origin
  * $FreeBSD: src/sys/i386/isa/icu_vector.s,v 1.14.2.2 2000/07/18 21:12:42 dfr Exp $
- * $DragonFly: src/sys/platform/pc32/icu/icu_vector.s,v 1.31 2008/01/14 15:27:17 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/icu/icu_vector.s,v 1.32 2008/05/08 01:21:02 dillon Exp $
  */
 /*
  * WARNING!  SMP builds can use the ICU now so this code must be MP safe.
@@ -69,6 +69,7 @@
        pushl   %es ;                                                   \
        pushl   %fs ;                                                   \
        pushl   %gs ;                                                   \
+       cld ;                                                           \
        mov     $KDSEL,%ax ;                                            \
        mov     %ax,%ds ;                                               \
        mov     %ax,%es ;                                               \