linker as _start_bss and _end_bss. See kernel.lds. */
extern char _start_bss, _end_bss;
memset (&_start_bss, 0, &_end_bss - &_start_bss);
linker as _start_bss and _end_bss. See kernel.lds. */
extern char _start_bss, _end_bss;
memset (&_start_bss, 0, &_end_bss - &_start_bss);
- (set up by loader.S) only maps the first 4 MB of RAM, so we
- should not try to use extravagant amounts of memory.
+ (set up by start.S) only maps the first 4 MB of RAM, so we
+ should not try to access memory beyond that limit.
pd[pde_idx] = pde_create (pt);
}
pt[pte_idx] = pte_create_kernel (vaddr, true);
}
pd[pde_idx] = pde_create (pt);
}
pt[pte_idx] = pte_create_kernel (vaddr, true);
}
- aka PDBR (page directory base register). This activates our
- new page tables immediately. See [IA32-v2a] "MOV--Move
+ aka PDBR (page directory base register). This flushes the
+ TLB to make sure . See [IA32-v2a] "MOV--Move
to/from Control Registers" and [IA32-v3] 3.7.5. */
asm volatile ("mov %%cr3, %0" :: "r" (vtop (base_page_dir)));
}
to/from Control Registers" and [IA32-v3] 3.7.5. */
asm volatile ("mov %%cr3, %0" :: "r" (vtop (base_page_dir)));
}