Changeset 619 for trunk/hal/tsar_mips32/core/hal_special.c
- Timestamp:
- Feb 12, 2019, 1:15:47 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_special.c
r570 r619 25 25 #include <hal_kernel_types.h> 26 26 #include <hal_special.h> 27 #include <hal_exception.h> 27 28 #include <core.h> 28 29 #include <thread.h> … … 145 146 } 146 147 147 /////////////////////////// ///148 uint32_t hal_get_s tack( void )148 /////////////////////////// 149 uint32_t hal_get_sp( void ) 149 150 { 150 151 register uint32_t sp; … … 155 156 } 156 157 157 ///////////////////////////////////// ///158 uint32_t hal_set_s tack( void * new_val )158 ///////////////////////////////////// 159 uint32_t hal_set_sp( void * new_val ) 159 160 { 160 161 register uint32_t sp; … … 168 169 } 169 170 171 /////////////////////////// 172 uint32_t hal_get_ra( void ) 173 { 174 register uint32_t ra; 175 176 asm volatile ("or %0, $0, $31" : "=&r" (ra)); 177 178 return ra; 179 } 180 170 181 ////////////////////////////////// 171 182 uint32_t hal_get_bad_vaddr( void ) … … 216 227 void hal_core_sleep( void ) 217 228 { 229 thread_t * this = CURRENT_THREAD; 230 231 printk("\n*** thread[%x,%x] on core[%x,%d]/n" 232 " sr = %X / sp = %X / ra = %X\n", 233 this->process->pid, this->trdid, local_cxy, this->core->lid, 234 hal_get_sr(), hal_get_sp(), hal_get_ra() ); 235 218 236 while( 1 ) asm volatile ("nop"); 219 237 }
Note: See TracChangeset
for help on using the changeset viewer.