Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2002 18:17:47 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        "Cameron, Frank" <Cameron@ctc.com>, "'Kenneth Culver'" <culverk@yumyumyum.org>, David Malone <dwmalone@maths.tcd.ie>, "'freebsd-bugs@freebsd.org'" <freebsd-bugs@FreeBSD.ORG>, "'freebsd-current@freebsd.org'" <freebsd-current@FreeBSD.ORG>
Subject:   Re: AMD AGP Bug 
Message-ID:  <20020201021747.A50863809@overcee.wemm.org>
In-Reply-To: <3C59E050.6564C115@mindspring.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> "Cameron, Frank" wrote:
> > From what was posted on the linux-kernel list the problem is the OS
> > doing the wrong thing not the hardware.  I originally asked the
> > question (albeit not worded as clearly as I should have) because if
> > Microsoft and Linux programmers made the same mistake, might
> > FreeBSD have also.
> 
> No.  FreeBSD does not make active use of 4M pages for anything
> other than the initial kernel text and data, which is obvious,
> if you look at /sys/i386/machdep.c.

Actually, it is obvious if you actually do look at the pmap.c that we *do*
use 4MB pages for device mappings.

        /*
         * This code maps large physical mmap regions into the
         * processor address space.  Note that some shortcuts
         * are taken, but the code works.
         */
        if (pseflag && (object->type == OBJT_DEVICE) &&
            ((addr & (NBPDR - 1)) == 0) && ((size & (NBPDR - 1)) == 0)) {
...
                for(i = 0; i < npdes; i++) {
                        pmap->pm_pdir[ptepindex] =
                            ptepa | PG_U | PG_RW | PG_V | PG_PS;
                        ptepa += NBPDR;
                        ptepindex += 1;
                }
...

Even doing a simple grep for the 4MB page flag (PG_PS) and using a
little initiative would have shown this.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020201021747.A50863809>