From def8075a513b74389fbd965d13041cbabfa77ed2 Mon Sep 17 00:00:00 2001
From: Julien Grall <julien.grall@gmail.com>
Date: Tue, 17 May 2011 17:11:30 +0200
Subject: [PATCH 2/2] Add pmon for leon2


Signed-off-by: Julien Grall <julien.grall@gmail.com>
---
 hw/leon.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/leon.c b/hw/leon.c
index e156089..02d5ebb 100644
--- a/hw/leon.c
+++ b/hw/leon.c
@@ -844,6 +844,8 @@ static void at697_hw_init(ram_addr_t  ram_size,
             /* If there is no bios/monitor, start the application.  */
             env->pc = entry;
             env->npc = entry + 4;
+            /* The sp must be at the top of the ram, it's RTEMS's requirement */
+            env->regbase[6] = 0x40000000 + ram_size;
             reset_info->entry = entry;
         }
     }
-- 
1.7.5.1

