Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86_64/include MTRR includes.



details:   https://anonhg.NetBSD.org/src/rev/ad8902bf31c3
branches:  trunk
changeset: 532959:ad8902bf31c3
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Jun 18 08:31:42 2002 +0000

description:
MTRR includes.

diffstat:

 sys/arch/x86_64/include/Makefile  |   4 ++--
 sys/arch/x86_64/include/mtrr.h    |   7 +++++++
 sys/arch/x86_64/include/proc.h    |   3 ++-
 sys/arch/x86_64/include/sysarch.h |  29 +++++++++++++++++++++++------
 4 files changed, 34 insertions(+), 9 deletions(-)

diffs (102 lines):

diff -r 238f56a70097 -r ad8902bf31c3 sys/arch/x86_64/include/Makefile
--- a/sys/arch/x86_64/include/Makefile  Tue Jun 18 08:30:33 2002 +0000
+++ b/sys/arch/x86_64/include/Makefile  Tue Jun 18 08:31:42 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2002/06/06 03:30:57 simonb Exp $
+#      $NetBSD: Makefile,v 1.5 2002/06/18 08:31:42 fvdl Exp $
 
 KDIR=  /sys/arch/x86_64/include
 INCSDIR= /usr/include/x86_64
@@ -15,7 +15,7 @@
        intr.h isa_machdep.h \
        kcore.h \
        limits.h lock.h \
-       math.h \
+       math.h mtrr.h \
        netbsd32_machdep.h \
        param.h pcb.h pccons.h pci_machdep.h pio.h pmap.h pmc.h proc.h \
        profile.h psl.h pte.h ptrace.h \
diff -r 238f56a70097 -r ad8902bf31c3 sys/arch/x86_64/include/mtrr.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/x86_64/include/mtrr.h    Tue Jun 18 08:31:42 2002 +0000
@@ -0,0 +1,7 @@
+/*      $NetBSD: mtrr.h,v 1.1 2002/06/18 08:31:42 fvdl Exp $   */
+
+#ifdef _KERNEL
+#include <i386/include/mtrr.h>
+#else
+#include <i386/mtrr.h>
+#endif
diff -r 238f56a70097 -r ad8902bf31c3 sys/arch/x86_64/include/proc.h
--- a/sys/arch/x86_64/include/proc.h    Tue Jun 18 08:30:33 2002 +0000
+++ b/sys/arch/x86_64/include/proc.h    Tue Jun 18 08:31:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.h,v 1.2 2002/05/28 23:11:38 fvdl Exp $    */
+/*     $NetBSD: proc.h,v 1.3 2002/06/18 08:31:43 fvdl Exp $    */
 
 /*
  * Copyright (c) 1991 Regents of the University of California.
@@ -52,3 +52,4 @@
 #define        MDP_USEDFPU     0x0001  /* has used the FPU */
 #define MDP_COMPAT     0x0002  /* x86 compatibility process */
 #define MDP_SYSCALL    0x0004  /* entered kernel via syscall ins */
+#define MDP_USEDMTRR   0x0008  /* has set volatile MTRRs */
diff -r 238f56a70097 -r ad8902bf31c3 sys/arch/x86_64/include/sysarch.h
--- a/sys/arch/x86_64/include/sysarch.h Tue Jun 18 08:30:33 2002 +0000
+++ b/sys/arch/x86_64/include/sysarch.h Tue Jun 18 08:31:42 2002 +0000
@@ -1,9 +1,5 @@
-/*     $NetBSD: sysarch.h,v 1.1 2001/06/19 00:20:13 fvdl Exp $ */
+/*     $NetBSD: sysarch.h,v 1.2 2002/06/18 08:31:43 fvdl Exp $ */
 
-#if 0
-/*
- * XXXfvdl todo.
- */
 #ifndef _X86_64_SYSARCH_H_
 #define _X86_64_SYSARCH_H_
 
@@ -19,6 +15,13 @@
 #define        X86_64_PMC_INFO 8
 #define        X86_64_PMC_STARTSTOP 9
 #define        X86_64_PMC_READ 10
+#define X86_64_GET_MTRR   11
+#define X86_64_SET_MTRR   12
+
+/*
+ * XXXfvdl todo.
+ */
+#if 0
 
 struct x86_64_get_ldt_args {
        int start;
@@ -77,6 +80,19 @@
        u_int64_t time;
 };
 
+#endif /* todo */
+
+struct x86_64_get_mtrr_args {
+       struct mtrr *mtrrp;
+       int *n;
+};
+
+struct x86_64_set_mtrr_args {
+       struct mtrr *mtrrp;
+       int *n;
+};
+
+
 #ifndef _KERNEL
 int x86_64_get_ldt __P((int, union descriptor *, int));
 int x86_64_set_ldt __P((int, union descriptor *, int));
@@ -86,8 +102,9 @@
 int x86_64_pmc_info __P((struct x86_64_pmc_info_args *));
 int x86_64_pmc_startstop __P((struct x86_64_pmc_startstop_args *));
 int x86_64_pmc_read __P((struct x86_64_pmc_read_args *));
+int x86_64_set_mtrr __P((struct mtrr *, int *));
+int x86_64_get_mtrr __P((struct mtrr *, int *));
 int sysarch __P((int, void *));
 #endif
 
 #endif /* !_X86_64_SYSARCH_H_ */
-#endif /* 0 */



Home | Main Index | Thread Index | Old Index