bugfix: 解决在docker中以O1优化时导致page fault的问题

This commit is contained in:
fslongjin 2022-08-04 23:22:26 +08:00
parent db024b34e0
commit fdd5d3cf66
2 changed files with 9 additions and 5 deletions

View File

@ -16,6 +16,7 @@
extern struct scm_ui_framework_t textui_framework;
extern unsigned char font_ascii[256][16]; //导出ascii字体的bitmap8*16大小 ps:位于font.h中
static void __textui_render_chromatic(uint16_t actual_line, uint16_t index, struct textui_char_chromatic_t *character);
/**

View File

@ -37,12 +37,10 @@
#include <driver/interrupt/apic/apic_timer.h>
unsigned int *FR_address = (unsigned int *)0xb8000; //帧缓存区的地址
ul bsp_idt_size, bsp_gdt_size;
// struct Global_Memory_Descriptor memory_management_struct = {{0}, 0};
void test_slab();
#pragma GCC push_options
#pragma GCC optimize("O0")
struct gdtr gdtp;
struct idtr idtp;
void reload_gdt()
@ -148,6 +146,7 @@ void system_initialize()
// ps2_mouse_init();
// ata_init();
pci_init();
io_mfence();
ahci_init();
// test_slab();
@ -174,6 +173,9 @@ void system_initialize()
apic_timer_init();
io_mfence();
// 这里不能删除否则在O1会报错
// while (1)
// pause();
}
//操作系统内核从这里开始执行
@ -202,7 +204,7 @@ void Start_Kernel(void)
io_mfence();
while (1)
hlt();
pause();
}
void ignore_int()
@ -211,3 +213,4 @@ void ignore_int()
while (1)
;
}
#pragma GCC pop_options