mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 18:26:32 +00:00
实现了rtc的抽象,并且把x86的cmos rtc接入到设备驱动模型 (#674)
* 实现了rtc的抽象,并且把x86的cmos rtc接入到设备驱动模型。
This commit is contained in:
@ -404,10 +404,13 @@ impl VirtAddr {
|
||||
}
|
||||
|
||||
unsafe fn allocator_init() {
|
||||
let virt_offset = BOOTSTRAP_MM_INFO.unwrap().start_brk;
|
||||
let phy_offset =
|
||||
unsafe { MMArch::virt_2_phys(VirtAddr::new(page_align_up(virt_offset))) }.unwrap();
|
||||
let virt_offset = VirtAddr::new(page_align_up(BOOTSTRAP_MM_INFO.unwrap().start_brk));
|
||||
|
||||
let phy_offset = unsafe { MMArch::virt_2_phys(virt_offset) }.unwrap();
|
||||
|
||||
mem_block_manager()
|
||||
.reserve_block(PhysAddr::new(0), phy_offset.data())
|
||||
.expect("Failed to reserve block");
|
||||
let mut bump_allocator = BumpAllocator::<X86_64MMArch>::new(phy_offset.data());
|
||||
kdebug!(
|
||||
"BumpAllocator created, offset={:?}",
|
||||
|
Reference in New Issue
Block a user