Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch/i386/i386 Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/4e23583a617a
branches:  netbsd-6
changeset: 774577:4e23583a617a
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Sep 03 19:03:39 2012 +0000

description:
Pull up following revision(s) (requested by rmind in ticket #533):
        sys/arch/i386/i386/i386func.S: revision 1.17
tlbflushg/i386: test for the PGE feature flag first, before checking the %cr4.
Add a comment explaining why need to check both and in such order.

diffstat:

 sys/arch/i386/i386/i386func.S |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 3b9cce480287 -r 4e23583a617a sys/arch/i386/i386/i386func.S
--- a/sys/arch/i386/i386/i386func.S     Mon Sep 03 19:01:25 2012 +0000
+++ b/sys/arch/i386/i386/i386func.S     Mon Sep 03 19:03:39 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i386func.S,v 1.16 2011/06/12 03:35:42 rmind Exp $      */
+/*     $NetBSD: i386func.S,v 1.16.8.1 2012/09/03 19:03:39 riz Exp $    */
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: i386func.S,v 1.16 2011/06/12 03:35:42 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i386func.S,v 1.16.8.1 2012/09/03 19:03:39 riz Exp $");
 
 #include <machine/specialreg.h>
 #include <machine/segments.h>
@@ -99,9 +99,13 @@
  *
  * (the alternatives not quoted above are not an option here.)
  *
- * If PGE is not in use, we reload CR3.
+ * If PGE is not in use, we reload CR3.  Check for the PGE feature
+ * first since i486 does not have CR4.  Note: the feature flag may
+ * be present while the actual PGE functionality not yet enabled.
  */
 ENTRY(tlbflushg)
+       testl   $CPUID_PGE, _C_LABEL(cpu_feature)
+       jz      1f
        movl    %cr4, %eax
        testl   $CR4_PGE, %eax
        jz      1f



Home | Main Index | Thread Index | Old Index