pub fn new_kernel() -> Arc<Self> {
        let kernel_vmar_base = KERNEL_ASPACE_BASE as usize; // Sorry i hard code because i'm lazy
        let kernel_vmar_size = KERNEL_ASPACE_SIZE as usize;
        Arc::new(VmAddressRegion {
            flags: VmarFlags::ROOT_FLAGS,
            base: KObjectBase::new(),
            _counter: CountHelper::new(),
            addr: kernel_vmar_base,
            size: kernel_vmar_size,
            parent: None,
            page_table: Arc::new(Mutex::new(PageTable::from_current().clone_kernel())),
            inner: Mutex::new(Some(VmarInner::default())),
        })
    }
/// Create a kernel root VMAR.
Create a kernel root VMAR.
Create a kernel root VMAR .
pub fn new_kernel() -> Arc<Self> {
        let kernel_vmar_base = KERNEL_ASPACE_BASE as usize; // Sorry i hard code because i'm lazy
        let kernel_vmar_size = KERNEL_ASPACE_SIZE as usize;
        Arc::new(VmAddressRegion {
            flags: VmarFlags::ROOT_FLAGS,
            base: KObjectBase::new(),
            _counter: CountHelper::new(),
            addr: kernel_vmar_base,
            size: kernel_vmar_size,
            parent: None,
            page_table: Arc::new(Mutex::new(PageTable::from_current().clone_kernel())),
            inner: Mutex::new(Some(VmarInner::default())),
        })
    }
pub fn new_kernel ( ) -> Arc < Self > { let kernel_vmar_base = KERNEL_ASPACE_BASE as usize ; // Sorry i hard code because i'm lazy let kernel_vmar_size = KERNEL_ASPACE_SIZE as usize ; Arc :: new ( VmAddressRegion { flags : VmarFlags :: ROOT_FLAGS , base : KObjectBase :: new ( ) , _counter : CountHelper :: new ( ) , addr : kernel_vmar_base , size : kernel_vmar_size , parent : None , page_table : Arc :: new ( Mutex :: new ( PageTable :: from_current ( ) . clone_kernel ( ) ) ) , inner : Mutex :: new ( Some ( VmarInner :: default ( ) ) ) , } ) }
Create a kernel root VMAR.
Create a kernel root VMAR .