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
+5 -1
View File
@@ -176,7 +176,7 @@ PUBLIC int main(void)
*===========================================================================*/
PRIVATE void vm_init(void)
{
int s;
int s, i;
struct memory mem_chunks[NR_MEMS];
struct boot_image image[NR_BOOT_PROCS];
struct boot_image *ip;
@@ -194,6 +194,10 @@ PRIVATE void vm_init(void)
/* Set table to 0. This invalidates all slots (clear VMF_INUSE). */
memset(vmproc, 0, sizeof(vmproc));
for(i = 0; i < ELEMENTS(vmproc); i++) {
vmproc[i].vm_slot = i;
}
/* Walk through boot-time system processes that are alive
* now and make valid slot entries for them.
*/