From: Gabe Black Date: Mon, 27 Jul 2009 07:52:48 +0000 (-0700) Subject: ARM: Initialize the CPSR so that we're in user mode. X-Git-Tag: Calvin_Submission~194^2~23 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dc0df3f3966b3d4a5ff313007b44fb4b428a70d9;p=gem5.git ARM: Initialize the CPSR so that we're in user mode. --- 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