mirror of
https://github.com/CIS-osdev/kernel
synced 2025-03-12 14:22:54 +03:00
Fix page fault
This commit is contained in:
parent
b9fe67a4c9
commit
78de14d157
@ -19,6 +19,10 @@ typedef struct {
|
||||
sections_t kernel_sections[4];
|
||||
|
||||
sections_t *sectons_init() {
|
||||
// Why this halts cpu?
|
||||
//memset(&kernel_section_bss_start, 0,
|
||||
// (uint64_t)&kernel_section_bss_end -
|
||||
// (uint64_t)&kernel_section_bss_start);
|
||||
serial_printf("\t.text 0x%x-0x%x(%u)\n", &kernel_section_text_start,
|
||||
&kernel_section_text_end,
|
||||
&kernel_section_text_end - &kernel_section_text_start);
|
||||
@ -43,8 +47,5 @@ sections_t *sectons_init() {
|
||||
kernel_sections[3] =
|
||||
(sections_t){ kernel_section_bss_start, kernel_section_bss_end };
|
||||
|
||||
memset(&kernel_section_bss_start, 0,
|
||||
&kernel_section_bss_end - &kernel_section_bss_start);
|
||||
|
||||
return (sections_t *)&kernel_sections;
|
||||
}
|
@ -14,8 +14,6 @@ void kernel_main64(uint64_t *multiboot2, uint32_t magic, void *esp,
|
||||
|
||||
int status = multiboot2_init(multiboot2, magic);
|
||||
|
||||
sectons_init();
|
||||
|
||||
if (status) {
|
||||
serial_printf("[OK]\n");
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user