changeset 4e9d4c206930 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=4e9d4c206930
description:
ARM: Initialize the CPSR so that we're in user mode.
diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
src/arch/arm/isa.hh | 6 +++++-
diffs (16 lines):
diff -r b7fd31c84c99 -r 4e9d4c206930 src/arch/arm/isa.hh
--- a/src/arch/arm/isa.hh Mon Jul 27 00:52:31 2009 -0700
+++ b/src/arch/arm/isa.hh Mon Jul 27 00:52:48 2009 -0700
@@ -48,7 +48,11 @@
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
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev