🆕 引入APIC驱动,完成local apic的初始化

This commit is contained in:
fslongjin
2022-03-04 13:40:22 +08:00
parent eb11be9270
commit 574f323284
10 changed files with 350 additions and 109 deletions

View File

@ -359,7 +359,7 @@ void wrmsr(ul address, ul value)
/**
* @brief 从msr寄存器组的address地址处读取值
*
* rdmsr返回高32bits在edx低32bits在eax
* @param address 地址
* @return ul address处的寄存器的值
*/

View File

@ -34,14 +34,14 @@ int printk_init(const int char_size_x, const int char_size_y)
pos.max_y = calculate_max_charNum(pos.height, char_size_y);
// @todo:将来需要将帧缓冲区物理地址填写到这个地址的页表项中
VBE_FB_phys_addr = (ul *)info.framebuffer_addr;
VBE_FB_phys_addr = (ul)info.framebuffer_addr;
pos.FB_address = (uint *)0x0000000003000000;
pos.FB_length = pos.width * pos.height;
// ======== 临时的将物理地址填写到0x0000000003000000处 之后会在mm内将帧缓存区重新映射=====
global_CR3 = get_CR3();
ul fb_virt_addr = pos.FB_address;
ul fb_virt_addr = (ul)pos.FB_address;
ul fb_phys_addr = VBE_FB_phys_addr;
// 计算帧缓冲区的线性地址对应的pml4页表项的地址