fix: memory: protect kernel code
This commit is contained in:
17
src/kernel.c
17
src/kernel.c
@ -68,13 +68,16 @@ void kernel_main(multiboot_info_t *mbd, uint32_t magic)
|
||||
"Martin 03:50, 22 March 2009 (UTC)\n");
|
||||
|
||||
// PRINT_PTR(alloc_frame());
|
||||
/*void *ptr;
|
||||
while ((ptr = alloc_pages(PAGE_SIZE * 1020))) {
|
||||
if (ptr)
|
||||
memset(ptr, ~0, PAGE_SIZE * 1020);
|
||||
}*/
|
||||
if (false) {
|
||||
void *ptr;
|
||||
while ((ptr = alloc_pages(PAGE_SIZE * 1))) {
|
||||
if (ptr)
|
||||
memset(ptr, ~0, PAGE_SIZE * 1);
|
||||
}
|
||||
} else {
|
||||
while (vmalloc(10))
|
||||
;
|
||||
}
|
||||
/* vmalloc(10); */
|
||||
while (vmalloc(10))
|
||||
;
|
||||
shell_init();
|
||||
}
|
||||
|
Reference in New Issue
Block a user