From: Fabien Chouteau <chouteau@adacore.com>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>,
qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sparc/leon3: Initialize stack pointer
Date: Wed, 05 Feb 2014 10:02:58 +0100 [thread overview]
Message-ID: <52F1FE42.3000000@adacore.com> (raw)
In-Reply-To: <1391419091-3020-1-git-send-email-sebastian.huber@embedded-brains.de>
On 02/03/2014 10:18 AM, Sebastian Huber wrote:
> A lot of real world LEON3 systems are shipped with the GRMON boot
> loader. This boot loader initializes the stack pointer with the end of
> RAM address. The application can use this to detect the RAM size of a
> particular board variant.
>
Looks good, thank you Sebastian.
Reviewed-by: Fabien Chouteau <chouteau@adacore.com>
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
> hw/sparc/leon3.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
> index c583c3d..c16e9e4 100644
> --- a/hw/sparc/leon3.c
> +++ b/hw/sparc/leon3.c
> @@ -45,6 +45,7 @@
> typedef struct ResetData {
> SPARCCPU *cpu;
> uint32_t entry; /* save kernel entry in case of reset */
> + target_ulong sp; /* initial stack pointer */
> } ResetData;
>
> static void main_cpu_reset(void *opaque)
> @@ -58,6 +59,7 @@ static void main_cpu_reset(void *opaque)
> cpu->halted = 0;
> env->pc = s->entry;
> env->npc = s->entry + 4;
> + env->regbase[6] = s->sp;
> }
>
> void leon3_irq_ack(void *irq_manager, int intno)
> @@ -133,6 +135,7 @@ static void leon3_generic_hw_init(QEMUMachineInitArgs *args)
> /* Reset data */
> reset_info = g_malloc0(sizeof(ResetData));
> reset_info->cpu = cpu;
> + reset_info->sp = 0x40000000 + ram_size;
> qemu_register_reset(main_cpu_reset, reset_info);
>
> /* Allocate IRQ manager */
>
next prev parent reply other threads:[~2014-02-05 9:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 9:18 [Qemu-devel] [PATCH] sparc/leon3: Initialize stack pointer Sebastian Huber
2014-02-05 9:02 ` Fabien Chouteau [this message]
2014-02-05 9:26 ` [Qemu-devel] [Qemu-trivial] " Fabien Chouteau
2014-02-06 8:40 ` Michael Tokarev
2014-02-06 8:52 ` Sebastian Huber
2014-02-06 8:57 ` Peter Maydell
2014-02-12 13:54 ` Sebastian Huber
2014-02-12 14:00 ` Peter Maydell
2014-02-12 16:27 ` Michael Tokarev
2014-02-12 16:40 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F1FE42.3000000@adacore.com \
--to=chouteau@adacore.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sebastian.huber@embedded-brains.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).