pub(super) fn init() {
    let header = HvHeader::get();
    let sys_config = HvSystemConfig::get();
    let used_size =
        header.core_size as usize + header.max_cpus as usize * PER_CPU_SIZE + sys_config.size();

    let mem_pool_start = align_up(sys_config.hypervisor_memory.phys_start as usize + used_size);
    let mem_pool_size = align_down(sys_config.hypervisor_memory.size as usize - used_size);

    *FRAME_ALLOCATOR.lock() = FrameAllocator::new(mem_pool_start, mem_pool_size);

    info!(
        "Frame allocator init end: {:#x?}",
        phys_to_virt(mem_pool_start)..phys_to_virt(mem_pool_start) + mem_pool_size
    );
}
/// Initialize the physical frame allocator.
Initialize the physical frame allocator.
Initialize the physical frame allocator .
pub(super) fn init() {
    let header = HvHeader::get();
    let sys_config = HvSystemConfig::get();
    let used_size =
        header.core_size as usize + header.max_cpus as usize * PER_CPU_SIZE + sys_config.size();
    let mem_pool_start = align_up(sys_config.hypervisor_memory.phys_start as usize + used_size);
    let mem_pool_size = align_down(sys_config.hypervisor_memory.size as usize - used_size);
    *FRAME_ALLOCATOR.lock() = FrameAllocator::new(mem_pool_start, mem_pool_size);
    info!(
        "Frame allocator init end: {:#x?}",
        phys_to_virt(mem_pool_start)..phys_to_virt(mem_pool_start) + mem_pool_size
    );
}
pub ( super ) fn init ( ) { let header = HvHeader :: get ( ) ; let sys_config = HvSystemConfig :: get ( ) ; let used_size = header . core_size as usize + header . max_cpus as usize * PER_CPU_SIZE + sys_config . size ( ) ; let mem_pool_start = align_up ( sys_config . hypervisor_memory . phys_start as usize + used_size ) ; let mem_pool_size = align_down ( sys_config . hypervisor_memory . size as usize - used_size ) ; * FRAME_ALLOCATOR . lock ( ) = FrameAllocator :: new ( mem_pool_start , mem_pool_size ) ; info ! ( " " phys_to_virt ( mem_pool_start ) phys_to_virt ( mem_pool_start ) mem_pool_size ) ; }
Initialize the physical frame allocator.
Initialize the physical frame allocator .