Changeset 68 for trunk/kernel/mm/vmm.c
- Timestamp:
- Jun 27, 2017, 10:24:13 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/vmm.c
r50 r68 616 616 617 617 618 ////////////////////////////////////////// 619 error_t vmm_map_ vseg( vseg_t * vseg,620 uint32_t attr )618 ////////////////////////////////////////////// 619 error_t vmm_map_kernel_vseg( vseg_t * vseg, 620 uint32_t attr ) 621 621 { 622 622 vpn_t vpn; // VPN of PTE to be set … … 628 628 error_t error; 629 629 630 // check vseg type 630 // check vseg type : must be a kernel vseg 631 631 uint32_t type = vseg->type; 632 if( (type != VSEG_TYPE_KCODE) && (type != VSEG_TYPE_KDATA) && (type != VSEG_TYPE_KDEV) ) 633 { 634 printk("\n[PANIC] in %s : not a kernel vseg\n", __FUNCTION__ ); 635 hal_core_sleep(); 636 } 632 assert( ((type==VSEG_TYPE_KCODE) || (type==VSEG_TYPE_KDATA) || (type==VSEG_TYPE_KDEV)), 633 __FUNCTION__ , "not a kernel vseg\n" ); 637 634 638 635 // get pointer on page table … … 648 645 for( vpn = vpn_min ; vpn < vpn_max ; vpn++ ) 649 646 { 647 // allocate a physical page from local PPM 650 648 kmem_req_t req; 651 649 req.type = KMEM_PAGE; … … 782 780 783 781 // this function must be called by a thread running in the reference cluster 784 if( GET_CXY( process->ref_xp ) != local_cxy ); 785 { 786 printk("\n[PANIC] in %s : not called in the reference cluster\n", __FUNCTION__ ); 787 hal_core_sleep(); 788 } 782 assert( (GET_CXY( process->ref_xp ) == local_cxy ) , __FUNCTION__ , 783 " not called in the reference cluster\n" ); 789 784 790 785 // get VMM pointer … … 954 949 } // end vmm_v2p_translate() 955 950 956 //////////////////////////////////////////////957 951 958 952
Note: See TracChangeset
for help on using the changeset viewer.