comparison cos/kernel/mm.c @ 34:8012221dd740

Fixes for uninitialized data. This causes problems on real machines
author windel
date Mon, 16 Jan 2012 13:46:06 +0100
parents 3a6a9b929db0
children 5c20bd53cccd
comparison
equal deleted inserted replaced
33:d8185ddb6c7b 34:8012221dd740
122 } 122 }
123 123
124 void switch_mapping(memmap_t* mapping) 124 void switch_mapping(memmap_t* mapping)
125 { 125 {
126 current_map = mapping; 126 current_map = mapping;
127 printf("Switching to use of other at %x\n", &mapping->table);
128 127
129 asm volatile("mov %0, %%cr3" :: "r"(&mapping->table)); 128 asm volatile("mov %0, %%cr3" :: "r"(&mapping->table));
130 129
131 // Enable paging (and flush cache): 130 // Enable paging (and flush cache):
132 uint64_t cr0; 131 uint64_t cr0;