PowerPC merge: real time TB and decrementer - faster and simpler exception handling (Jocelyn Mayer)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@841 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index f64649c..0578399 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -24,6 +24,9 @@
 #include "vl.h"
 #include "m48t59.h"
 
+/* XXX: move all TB related stuff in ppc_prep.c and suppress ppc.c ? */
+ppc_tb_t *cpu_ppc_tb_init (CPUPPCState *env, uint32_t freq);
+
 //#define HARD_DEBUG_PPC_IO
 //#define DEBUG_PPC_IO
 
@@ -663,7 +666,6 @@
 static void VGA_init (void)
 {
     /* Basic VGA init, inspired by plex86 VGAbios */
-    printf("Init VGA...\n");
 #if 1
     /* switch to color mode and enable CPU access 480 lines */
     PPC_io_writeb(PPC_IO_BASE + 0x3C2, 0xC3);
@@ -725,7 +727,6 @@
      * if a decrementer exception is pending when it enables msr_ee,
      * it's not ready to handle it...
      */
-    env->decr = 0xFFFFFFFF;
     p = phys_ram_base + kernel_addr;
 #if !defined (USE_OPEN_FIRMWARE)
     /* Let's register the whole memory available only in supervisor mode */
@@ -948,6 +949,8 @@
 	}
     }
 
+    cpu_ppc_tb_init(cpu_single_env, 100UL * 1000UL * 1000UL);
+
     /* init basic PC hardware */
     vga_initialize(ds, phys_ram_base + ram_size, ram_size, 
                    vga_ram_size, 0);