Library call for cpu features; make kernel and vm use this to query cpu

features (specifically: 4MB pages and TLB global bit).  Only enable
these features in CR4 if available. 4MB pages to be used in the near
future.
This commit is contained in:
Ben Gras
2009-05-15 17:07:36 +00:00
parent d0b6e76bfb
commit bdab3c4cfb
10 changed files with 134 additions and 13 deletions

View File

@@ -58,3 +58,7 @@ sys/vm_i386.h
*/
#define I386_VM_PFE_W 0x02 /* Caused by write (otherwise read) */
#define I386_VM_PFE_U 0x04 /* CPU in user mode (otherwise supervisor) */
/* CPUID flags */
#define CPUID1_EDX_PSE (1L << 3) /* Page Size Extension */
#define CPUID1_EDX_PGE (1L << 13) /* Page Global (bit) Enable */