Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Oct 2000 00:23:03 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        "Alexander N. Kabaev" <ak03@gte.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: How to allocate kernel memory with PG_NC_PCD set 
Message-ID:  <200010050723.e957N3h00680@mass.osd.bsdi.com>
In-Reply-To: Your message of "Wed, 04 Oct 2000 12:32:09 EDT." <XFMail.001004123209.ak03@gte.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




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