On Sat, 30 Oct 1999, Andrew Atrens wrote:

> 
> On Fri, 29 Oct 1999, Brian Fundakowski Feldman wrote:
> > 
> > I disabled (or asked Peter to, actually) the K6-2+ MTRR driver a while
> > back because with XFree86 3.9.16 (an alpha which uses MTRR support) it
> > would cause memory corruption.  It's very strange, and something I
> > really haven't figured out... If you want to enable it, go ahead, but
> > be very wary; if you do find out what's wrong, let me know.
> 
> I remember this now, I was one of those that got bit by this problem. What
> I recall is that MTRR support made a dramatic speed improvement, but alas
> was _extremely_ unstable. That was when I had an ATI Expert@Work card.
> Since then I've gotten a 3dfx Voodoo3, perhaps this card might be more
> stable? So Brian, how do I switch this back on ?

If you REALLY want to do this, which I wouldn't recommend since it
caused instability on my TNT too... But if you do, please apply the
included patch and give me the output it has generated.  This is my
last resort in checking if I possibly did something wrong :(
Uncomment this line in src/sys/i386/conf/files.i386:
# i386/i386/k6_mem.c            standard
and reconfig/rebuild your kernel.

> 
> On the other topic - write allocation - should I be seeing an indication
> of its status in the boot up messages ?  Hmm, I guess I could just UTSL on
> this one :) ...

No, write allocation status is only printed on boot -v.  You could also
drop to ddb and type call print_AMD_info() to see if it's really on.

> 
> Andrew.
> 
> -- 
> +--
> | Andrew Atrens                 Nortel Networks, Ottawa, Canada. |
> | All opinions expressed are my own,  not those of any employer. |
>                                                                --+
>   Heller's Law: The first myth of management is that it exists.   
>   Johnson's Corollary: Nobody really knows what is going on
>                        anywhere within the organization.   
> 

-- 
 Brian Fundakowski Feldman           \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]                    `------------------------------'
Index: k6_mem.c
===================================================================
RCS file: /usr2/ncvs/src/sys/i386/i386/k6_mem.c,v
retrieving revision 1.4
diff -u -r1.4 k6_mem.c
--- k6_mem.c    1999/09/05 15:45:57     1.4
+++ k6_mem.c    1999/10/30 18:31:45
@@ -66,7 +66,8 @@
 #define k6_reg_make(addr, mask, wc, uc)                                \
                ((addr) | ((mask) << 2) | ((wc) << 1) | uc)
 
-static void k6_mrinit(struct mem_range_softc *sc);
+static char *bitprint_4(u_int32_t, char [33]);
+static void k6_mrinit(struct mem_range_softc *);
 static int k6_mrset(struct mem_range_softc *, struct mem_range_desc *, int *);
 static __inline int k6_mrmake(struct mem_range_desc *, u_int32_t *);
 static void k6_mem_drvinit(void *);
@@ -77,9 +78,22 @@
        NULL
 };
 
+static char *
+bitprint_4(u_int32_t i, char res[33]) {
+        register int count;
+
+        for (count = 0; count < 32; count++)
+                res[31 - count] = (i & (1 << count)) ? '1' : '0';
+        res[32] = '\0';
+        return res;
+}
+
 static __inline int
 k6_mrmake(struct mem_range_desc *desc, u_int32_t *mtrr) {
        u_int32_t len = 0, wc, uc;
+#ifndef K6_MTRR_SILENT
+       char buf[33];
+#endif
        register int bit;
 
        if (desc->mr_base &~ 0xfffe0000)
@@ -95,6 +109,11 @@
        uc = (desc->mr_flags & MDF_UNCACHEABLE) ? 1 : 0;
 
        *mtrr = k6_reg_make(desc->mr_base, len, wc, uc);
+#ifndef K6_MTRR_SILENT
+       printf("k6_mrmake: base = %p, len = %#x, flags = %#x\nk6_mrmake: %s\n",
+           desc->mr_base, desc->mr_len, desc->mr_flags,
+           bitprint_4(*mtrr, buf));
+#endif
        return 0;
 }
 

Reply via email to