summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-07-27 00:52:48 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-07-27 00:52:48 -0700
commitdc0df3f3966b3d4a5ff313007b44fb4b428a70d9 (patch)
tree2cfea8dc9380aab945338fd6f21ebab32d5b6677 /src/arch/arm/isa.hh
parentb8bf34be05648d73d1ff6cdb9b831145544a38df (diff)
downloadgem5-dc0df3f3966b3d4a5ff313007b44fb4b428a70d9.tar.xz
ARM: Initialize the CPSR so that we're in user mode.
Diffstat (limited to 'src/arch/arm/isa.hh')
-rw-r--r--src/arch/arm/isa.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh
index 39acc9c08..2315afa9e 100644
--- a/src/arch/arm/isa.hh
+++ b/src/arch/arm/isa.hh
@@ -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