ARM: Initialize the CPSR so that we're in user mode.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 27 Jul 2009 07:52:48 +0000 (00:52 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 27 Jul 2009 07:52:48 +0000 (00:52 -0700)
src/arch/arm/isa.hh

index 39acc9c08515b03f2a940677b1301fe58371ad40..2315afa9e8789403c269f57629bd408316e3a749 100644 (file)
@@ -48,7 +48,11 @@ namespace ArmISA
       public:
         void clear()
         {
-            // Unknown startup state currently
+            memset(miscRegs, 0, sizeof(miscRegs));
+            CPSR cpsr = 0;
+            cpsr.mode = MODE_USER;
+            miscRegs[MISCREG_CPSR] = cpsr;
+            //XXX We need to initialize the rest of the state.
         }
 
         MiscReg