From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 18412 invoked from network); 17 Mar 2000 22:12:12 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 17 Mar 2000 22:12:12 -0000 Received: from piglet.twiddle.net (piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id RAA10664 for ; Fri, 17 Mar 2000 17:12:11 -0500 Received: (from rth@localhost) by piglet.twiddle.net (8.9.3/8.9.3) id OAA04433 for axp-list@redhat.com; Fri, 17 Mar 2000 14:12:10 -0800 Date: Fri, 17 Mar 2000 14:12:10 -0800 From: Richard Henderson To: axp-list@redhat.com Subject: Re: FIX: Permedia 2 driver XFree-4.0 Message-ID: <20000317141210.B4306@twiddle.net> References: <38D2429C.3CA5F950@hw.ac.uk> <38D244CA.DCBE1D26@civ.hw.ac.uk> <20000317114010.A1186@linux04.mro.dec.com> <38D26633.D9FB1F35@civ.hw.ac.uk> <20000317152355.C849@linux04.mro.dec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3us In-Reply-To: <20000317152355.C849@linux04.mro.dec.com> On Fri, Mar 17, 2000 at 03:23:55PM -0500, Jay Estabrook wrote: > > BTW, is the sparse mapping somewhat related to the actual PCI-id on the > > bus ? 'cause if it were we wouldn't need to map the whole 16G but rather > > that portion corresponding to the card. The PCI information is obtained > > anyway, so that won't be a problem. > > Egbert changed that area (lnx_video.c memory mapping), I think for some > reasons associated with multi-head, to map the *entire* PCI DENSE and > (not quite all of) SPARSE, from the earlier, only-what-is-needed method. Please don't do this. Yes, I can understand wanting to not have to associate re-mapped regions with particular cards or whatever, but there is a better way. Alpha userland has a 44-bit virtual address space to play with. Let's use it. Choose some otherwise unused area of the vm space. I suggest beginning at 0x300_0000_0000. Reserve the first 16G beginning there for sparse mappings on hose 0, reserve the next 4G for dense mappings on hose 0. Begin the mappings for hose 1 at offset 32G, and so on. I say "reserve", but that's something that only happens in your mind. There is, unfortunately, no unix syscall to actually do any reservation. However, you can safely know that most memory will be mapped about 0x200_0000_0000, and that someone would have to go out of their way to map something at 0x300_0000_0000. Given that the X server is in control of itself and is not a library, we can easily make the assumption that our "reserved" region will not be fiddled with. That said, it's easy enough to use MAP_FIXED to mmap the portions of the I/O region that are actually needed, and to position the portions _as if_ the entire region were mapped. r~