diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-07-27 00:52:48 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-07-27 00:52:48 -0700 |
commit | dc0df3f3966b3d4a5ff313007b44fb4b428a70d9 (patch) | |
tree | 2cfea8dc9380aab945338fd6f21ebab32d5b6677 /src/arch/arm/isa.hh | |
parent | b8bf34be05648d73d1ff6cdb9b831145544a38df (diff) | |
download | gem5-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.hh | 6 |
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 |