🆕 切换为grub2引导,能进入Start_Kernel函数(未能完成初始化)

This commit is contained in:
fslongjin
2022-02-21 14:39:48 +08:00
parent a2aea12510
commit 0b0cce9326
21 changed files with 1128 additions and 1377 deletions

View File

@ -13,10 +13,10 @@
#include "syscall/syscall.h"
unsigned int *FR_address = (unsigned int *)0xffff800000a00000; //帧缓存区的地址
// char fxsave_region[512] __attribute__((aligned(16)));
// char fxsave_region[512] __attribute__((aligned(16)));
struct memory_desc memory_management_struct = {{0}, 0};
//struct Global_Memory_Descriptor memory_management_struct = {{0}, 0};
struct memory_desc memory_management_struct = {{0}, 0};
// struct Global_Memory_Descriptor memory_management_struct = {{0}, 0};
void show_welcome()
{
@ -37,7 +37,6 @@ void show_welcome()
printk_color(0x00e0ebeb, 0x00e0ebeb, " \n\n");
}
// 测试内存管理单元
/*
void test_mm()
@ -63,18 +62,16 @@ void test_mm()
// 初始化系统各模块
void system_initialize()
{
// 初始化printk
init_printk(1440, 900, FR_address, 1440 * 900 * 4, 8, 16);
// 初始化printk
init_printk(1024, 768, FR_address, 1024 * 768 * 4, 8, 16);
printk("11111\n");
load_TR(10); // 加载TR寄存器
while(1);
// 初始化任务状态段表
ul tss_item_addr = 0xffff800000007c00;
set_TSS64(_stack_start, _stack_start, _stack_start, tss_item_addr, tss_item_addr,
tss_item_addr, tss_item_addr, tss_item_addr, tss_item_addr, tss_item_addr);
// 初始化中断描述符表
init_sys_vector();
@ -96,12 +93,10 @@ void Start_Kernel(void)
{
system_initialize();
// show_welcome();
// test_mm();
while (1)
;
}