🆕 转换为grub2引导(尚未更正mm模块,且目前无法将内核链接到线性地址0xffffx处)

This commit is contained in:
fslongjin
2022-02-21 22:59:57 +08:00
parent 0b0cce9326
commit d9d83335af
16 changed files with 672 additions and 698 deletions

View File

@ -12,7 +12,7 @@
#include "process/process.h"
#include "syscall/syscall.h"
unsigned int *FR_address = (unsigned int *)0xffff800000a00000; //帧缓存区的地址
unsigned int *FR_address = (unsigned int *)0xb8000; //帧缓存区的地址
// char fxsave_region[512] __attribute__((aligned(16)));
struct memory_desc memory_management_struct = {{0}, 0};
@ -62,17 +62,17 @@ void test_mm()
// 初始化系统各模块
void system_initialize()
{
// 初始化printk
init_printk(1024, 768, FR_address, 1024 * 768 * 4, 8, 16);
printk("11111\n");
init_printk(8, 16);
load_TR(10); // 加载TR寄存器
while(1);
// 初始化任务状态段表
ul tss_item_addr = 0xffff800000007c00;
ul tss_item_addr = 0x7c00;
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();
@ -84,6 +84,7 @@ void system_initialize()
// 先初始化系统调用模块
syscall_init();
// 再初始化进程模块。顺序不能调转
process_init();
}
@ -93,7 +94,7 @@ void Start_Kernel(void)
{
system_initialize();
// show_welcome();
// test_mm();