From owner-freebsd-current Fri Aug 23 8: 7:34 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E082C37B400 for ; Fri, 23 Aug 2002 08:07:30 -0700 (PDT) Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1E7843E6E for ; Fri, 23 Aug 2002 08:07:29 -0700 (PDT) (envelope-from mb@imp.ch) Received: from nbs.imp.ch (nbs.imp.ch [157.161.4.7]) by mail.imp.ch (8.12.3/8.12.3) with ESMTP id g7NF6pKq050460; Fri, 23 Aug 2002 17:06:51 +0200 (CEST) (envelope-from Martin.Blapp@imp.ch) Received: from levais.imp.ch (levais.imp.ch [157.161.4.66]) by nbs.imp.ch (8.12.3/8.12.3) with ESMTP id g7NF6pYW1093516; Fri, 23 Aug 2002 17:06:51 +0200 (MES) Date: Fri, 23 Aug 2002 17:08:23 +0200 (CEST) From: Martin Blapp To: Terry Lambert Cc: Bosko Milekic , Julian Elischer , Don Lewis , , , , Subject: Re: Memory corruption in CURRENT In-Reply-To: <3D6646C8.30E321C5@mindspring.com> Message-ID: <20020823170045.E50084-100000@levais.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hmmmmm, > Just like Microsoft: they disable the PSE, because they have not > spent the ~$16,000 worth of time figuring out the root cause. > > -- Terry But what is this ? +#define X86_CR4_PGE 0x0080 /* enable global pages */ +#define X86_CR4_PCE 0x0100 /* enable performance counters at ipl 3 */ +#define X86_CR4_OSFXSR 0x0200 /* enable fast FPU save and restore */ +#define X86_CR4_OSXMMEXCPT 0x0400 /* enable unmasked SSE exceptions */ + +/* + * Save the cr4 feature set we're using (ie + * Pentium 4MB enable and PPro Global page + * enable), so that any CPU's that boot up + * after us can get the correct flags. + */ +extern unsigned long mmu_cr4_features; + +static inline void set_in_cr4 (unsigned long mask) +{ + mmu_cr4_features |= mask; + __asm__("movl %%cr4,%%eax\n\t" + "orl %0,%%eax\n\t" + "movl %%eax,%%cr4\n" + : : "irg" (mask) + :"ax"); +} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message