mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 17:26:31 +00:00
将内核定位到高地址(存在bug,中断时会访问低地址)
This commit is contained in:
@ -425,6 +425,19 @@ void apic_init()
|
||||
|
||||
apic_io_apic_init();
|
||||
|
||||
// get RCBA address
|
||||
io_out32(0xcf8, 0x8000f8f0);
|
||||
uint32_t RCBA_phys = io_in32(0xcfc);
|
||||
|
||||
// 获取RCBA寄存器的地址
|
||||
if (RCBA_phys > 0xfec00000 && RCBA_phys < 0xfee00000)
|
||||
RCBA_vaddr = SPECIAL_MEMOEY_MAPPING_VIRT_ADDR_BASE + RCBA_phys;
|
||||
else
|
||||
{
|
||||
RCBA_vaddr = 0;
|
||||
kwarn("Cannot get RCBA address. RCBA_phys=%#010lx", RCBA_phys);
|
||||
|
||||
}
|
||||
sti();
|
||||
}
|
||||
/**
|
||||
|
Reference in New Issue
Block a user