Changeset 409 for trunk/hal/tsar_mips32
- Timestamp:
- Dec 20, 2017, 4:51:09 PM (7 years ago)
- Location:
- trunk/hal/tsar_mips32/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_exception.c
r408 r409 99 99 xcode_values_t; 100 100 101 ///////////////////////////////////////////// ///////102 staticchar * hal_mmu_exception_str( uint32_t code )101 ///////////////////////////////////////////// 102 char * hal_mmu_exception_str( uint32_t code ) 103 103 { 104 104 if ( code == MMU_WRITE_PT1_UNMAPPED ) return "WRITE_PT1_UNMAPPED"; … … 201 201 } 202 202 203 // @@@ 204 thread_t * parent = (thread_t *)0xa4000; 205 uint32_t cond = (this == 0xe0000) && (hal_time_stamp() > 5380000); 206 207 if( cond ) hal_gpt_display( this->process ); 208 if( cond ) hal_gpt_display( parent->process ); 209 if( cond ) printk("\n[DBG] %s : core[%x,%d] / is_ins %d / %s / vaddr %x\n", 203 excp_dmsg("\n[DBG] %s : core[%x,%d] / is_ins %d / %s / vaddr %x\n", 210 204 __FUNCTION__ , local_cxy , this->core->lid , is_ins, 211 205 hal_mmu_exception_str(excp_code) , bad_vaddr ); … … 267 261 { 268 262 269 if( cond ) printk("\n[DBG] %s : core[%x,%d] / copy-on-write handled for vaddr = %x\n",263 excp_dmsg("\n[DBG] %s : core[%x,%d] / copy-on-write handled for vaddr = %x\n", 270 264 __FUNCTION__ , local_cxy , this->core->lid , bad_vaddr ); 271 265 … … 275 269 else // non writable user error 276 270 { 277 printk("\n[ERROR] in %s for thread %x : write tonon-writable vaddr = %x\n",271 printk("\n[ERROR] in %s for thread %x : non-writable vaddr = %x\n", 278 272 __FUNCTION__ , this->trdid , bad_vaddr ); 279 273 -
trunk/hal/tsar_mips32/core/hal_gpt.c
r408 r409 131 131 page_t * page; 132 132 xptr_t page_xp; 133 vpn_t vpn;134 error_t error;135 uint32_t attr;136 133 137 134 gpt_dmsg("\n[DBG] %s : core[%x,%d] enter\n", … … 159 156 gpt->ptr = GET_PTR( ppm_page2base( page_xp ) ); 160 157 gpt->ppn = ppm_page2ppn( page_xp ); 161 162 // identity map the kentry_vseg (must exist for all processes)163 attr = GPT_MAPPED | GPT_SMALL | GPT_EXECUTABLE | GPT_CACHABLE | GPT_GLOBAL;164 for( vpn = CONFIG_VMM_KENTRY_BASE;165 vpn < (CONFIG_VMM_KENTRY_BASE + CONFIG_VMM_KENTRY_SIZE); vpn++ )166 {167 168 gpt_dmsg("\n[DBG] %s : identity map vpn %d\n", __FUNCTION__ , vpn );169 170 error = hal_gpt_set_pte( gpt,171 vpn,172 attr,173 (local_cxy<<20) | (vpn & 0xFFFFF) );174 175 if( error )176 {177 printk("\n[ERROR] in %s : cannot identity map kentry vseg\n", __FUNCTION__ );178 return ENOMEM;179 }180 }181 158 182 159 gpt_dmsg("\n[DBG] %s : core[%x,%d] exit\n", … … 933 910 pte2_attr = pt2[2*ix2]; 934 911 935 if( (CURRENT_THREAD == 0xe0000) && (hal_time_stamp() > 5380000) )936 printk("\n@@@ %s : vpn = %X / attr = %X\n", __FUNCTION__ , vpn , tsar2gpt( pte2_attr ) );937 938 912 if( (pte2_attr & TSAR_MMU_MAPPED) == 0 ) return false; 939 913 -
trunk/hal/tsar_mips32/core/hal_ppm.c
r407 r409 35 35 36 36 ////////////////////////////////////////////////////////////////////////////////////////// 37 // This file contains the TSAR specific code for : 38 // - cores registers initialisation, 39 // - memory allocators initialisation. 37 // This file contains the TSAR specific code for the physical memory 38 // allocators initialisation. 40 39 // 41 40 // For The TSAR architecture, the kernel pointers are identity mapped:
Note: See TracChangeset
for help on using the changeset viewer.