From owner-freebsd-hackers Thu Oct 5 0:21:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.osd.bsdi.com (adsl-63-202-176-106.dsl.snfc21.pacbell.net [63.202.176.106]) by hub.freebsd.org (Postfix) with ESMTP id 5C2FA37B503 for ; Thu, 5 Oct 2000 00:21:14 -0700 (PDT) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e957N3h00680; Thu, 5 Oct 2000 00:23:04 -0700 (PDT) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200010050723.e957N3h00680@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: "Alexander N. Kabaev" Cc: freebsd-hackers@freebsd.org Subject: Re: How to allocate kernel memory with PG_NC_PCD set In-reply-to: Your message of "Wed, 04 Oct 2000 12:32:09 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 05 Oct 2000 00:23:03 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The subject says it all :) > > What is the best way to allocate kernel memory with non-cacheable bit set? Or, > better yet, is it possible to change caching bit on an already kmalloc'ed > memory block? Will something like this work? > > pt_entry_t pte; > pte = (pt_entry_t)vtopte(vaddr); > *pte |= PG_NC_PCD; > invtlb(); Only in i386-specific code. Can you be more explicit about what exactly it is that you're trying to do? The x86 already has strong cache coherence, and mapped PCI space is typically not marked cacheable in the default MTRR setup so this sort of thing is typically unnecessary. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message