From dc0df3f3966b3d4a5ff313007b44fb4b428a70d9 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 27 Jul 2009 00:52:48 -0700 Subject: [PATCH] ARM: Initialize the CPSR so that we're in user mode. --- src/arch/arm/isa.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.30.2