Date: Fri, 23 Aug 2002 17:08:23 +0200 (CEST) From: Martin Blapp <mb@imp.ch> To: Terry Lambert <tlambert2@mindspring.com> Cc: Bosko Milekic <bmilekic@unixdaemons.com>, Julian Elischer <julian@elischer.org>, Don Lewis <dl-freebsd@catspoiler.org>, <sos@freebsd.dk>, <marks@ripe.net>, <ktsin@acm.org>, <freebsd-current@FreeBSD.ORG> Subject: Re: Memory corruption in CURRENT Message-ID: <20020823170045.E50084-100000@levais.imp.ch> In-Reply-To: <3D6646C8.30E321C5@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020823170045.E50084-100000>