comparison packages/hal/powerpc/arch/current/src/hal_misc.c @ 82:6736c52df507 ecos-sw-2000-04-14

Merge from eCos master repository on 2000-04-14-13:35:46-BST
author jlarmour
date Tue, 18 Apr 2000 21:51:55 +0000
parents da3908c9cd10
children c37d3a9e1b28
comparison
equal deleted inserted replaced
81:89fef2181d7d 82:6736c52df507
224 } 224 }
225 225
226 //--------------------------------------------------------------------------- 226 //---------------------------------------------------------------------------
227 // Idle thread action 227 // Idle thread action
228 228
229 externC bool hal_variant_idle_thread_action(cyg_uint32);
230
229 void 231 void
230 hal_idle_thread_action( cyg_uint32 count ) 232 hal_idle_thread_action( cyg_uint32 count )
231 { 233 {
234 // Execute variant idle thread action, while allowing it to control
235 // whether to run any of the architecture action code.
236 if (!hal_variant_idle_thread_action(count))
237 return;
238
232 #if 0 239 #if 0
233 #ifdef CYGPKG_HAL_POWERPC_MPC860 240 do {
234 register cyg_uint32 result; 241 register cyg_uint32 dec;
235 242
236 cyg_uint32 *psivec = (cyg_uint32*)CYGARC_REG_IMM_SIVEC ; 243 asm volatile(
237 cyg_uint32 *psimask = (cyg_uint32*)CYGARC_REG_IMM_SIMASK; 244 "mfdec %0;"
238 cyg_uint32 *psipend = (cyg_uint32*)CYGARC_REG_IMM_SIPEND; 245 : "=r"(dec)
239 cyg_uint16 *ptbscr = (cyg_uint16*)CYGARC_REG_IMM_TBSCR; 246 );
240 247 diag_printf( "Decrementer %08x\n", dec);
241 asm volatile( 248 } while (0);
242 "mfdec %0;"
243 : "=r"(result)
244 );
245 diag_printf( "Dec %08x, TBSCR %04x, vec %d: sivec %08x, simask %08x, sipend %08x\n",
246 result, (cyg_uint32)(*ptbscr), (*psivec)>>26, *psivec, *psimask, *psipend );
247 #endif
248 #endif 249 #endif
249 } 250 }
250 251
251 //--------------------------------------------------------------------------- 252 //---------------------------------------------------------------------------
252 // Use MMU resources to map memory regions. 253 // Use MMU resources to map memory regions.
290 #ifdef CYGPRI_ENABLE_CACHES 291 #ifdef CYGPRI_ENABLE_CACHES
291 HAL_ICACHE_ENABLE(); 292 HAL_ICACHE_ENABLE();
292 HAL_DCACHE_ENABLE(); 293 HAL_DCACHE_ENABLE();
293 #endif 294 #endif
294 #endif 295 #endif
295
296 #ifdef CYGPKG_HAL_POWERPC_MPC8xx
297 // Disable serialization
298 {
299 cyg_uint32 ictrl;
300 CYGARC_MFSPR (ICTRL, ictrl);
301 ictrl |= ICTRL_NOSERSHOW;
302 CYGARC_MTSPR (ICTRL, ictrl);
303 }
304 #endif
305 } 296 }
306 297
307 //--------------------------------------------------------------------------- 298 //---------------------------------------------------------------------------
308 //A jump via a null pointer causes the CPU to end up here. 299 //A jump via a null pointer causes the CPU to end up here.
309 externC void 300 externC void