diff 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
line wrap: on
line diff
--- a/packages/hal/powerpc/arch/current/src/hal_misc.c
+++ b/packages/hal/powerpc/arch/current/src/hal_misc.c
@@ -226,25 +226,26 @@ hal_default_decrementer_isr(CYG_ADDRWORD
 //---------------------------------------------------------------------------
 // Idle thread action
 
+externC bool hal_variant_idle_thread_action(cyg_uint32);
+
 void
 hal_idle_thread_action( cyg_uint32 count )
 {
-#if 0
-#ifdef CYGPKG_HAL_POWERPC_MPC860
-    register cyg_uint32 result;
+    // Execute variant idle thread action, while allowing it to control
+    // whether to run any of the architecture action code.
+    if (!hal_variant_idle_thread_action(count))
+        return;
 
-    cyg_uint32 *psivec  = (cyg_uint32*)CYGARC_REG_IMM_SIVEC ;
-    cyg_uint32 *psimask = (cyg_uint32*)CYGARC_REG_IMM_SIMASK;
-    cyg_uint32 *psipend = (cyg_uint32*)CYGARC_REG_IMM_SIPEND;
-    cyg_uint16 *ptbscr =  (cyg_uint16*)CYGARC_REG_IMM_TBSCR;
+#if 0
+    do {
+        register cyg_uint32 dec;
 
-    asm volatile(
-        "mfdec  %0;"
-        : "=r"(result)
-        );
-    diag_printf( "Dec %08x, TBSCR %04x, vec %d: sivec %08x, simask %08x, sipend %08x\n",
-          result, (cyg_uint32)(*ptbscr), (*psivec)>>26, *psivec,    *psimask,    *psipend   );
-#endif
+        asm volatile(
+            "mfdec  %0;"
+            : "=r"(dec)
+            );
+        diag_printf( "Decrementer %08x\n", dec);
+    } while (0);
 #endif
 }
 
@@ -292,16 +293,6 @@ hal_enable_caches(void)
     HAL_DCACHE_ENABLE();
 #endif
 #endif
-
-#ifdef CYGPKG_HAL_POWERPC_MPC8xx
-    // Disable serialization
-    {
-        cyg_uint32 ictrl;
-        CYGARC_MFSPR (ICTRL, ictrl);
-        ictrl |= ICTRL_NOSERSHOW;
-        CYGARC_MTSPR (ICTRL, ictrl);
-    }
-#endif
 }
 
 //---------------------------------------------------------------------------