[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH]: add leon target
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH]: add leon target |
Date: |
Wed, 7 Jan 2009 19:03:08 +0200 |
On 1/7/09, Tristan Gingold <address@hidden> wrote:
> Hi,
>
> this patch adds a new target: leon which is an open source sparc v8 variant.
Thanks for the patch. Is there any way to test the system, rom images
etc? Any system level docs?
Do you think it would be useful to port OpenBIOS to the system?
> The cpu itself implements the v8 architecture so there is nothing to change.
> However the devices are different and in particular the interrupt controller.
>
> To handle different interrupt controllers, I added a new field in
> CPUSPARCState like it is done on PowerPC.
I have a feeling that this should be handled some other way but I
don't know how yet. CPU emulation should not know about boards.
> Comments are welcome,
> Tristan.
Maybe the leon.c should be split, each device in a separate file.
Though I guess the devices are so unique that they won't be used
elsewhere.
> +++ target-sparc/op_helper.c (working copy)
> @@ -2995,6 +2995,21 @@
> env->pc = env->tbr;
> env->npc = env->pc + 4;
> env->exception_index = 0;
> +
> + switch (env->intctl) {
> + case intctl_sun4c:
> + case intctl_sun4m:
> +#if !defined(CONFIG_USER_ONLY)
> + cpu_check_irqs(env);
> +#endif
> + break;
> + case intctl_leon2:
> + if ((intno & ~15) == TT_EXTINT)
> + leon2_intctl_ack (env, intno);
This breaks linux-user compilation, the whole switch should be enclosed in
#if !defined(CONFIG_USER_ONLY)
#endif
For extra bonus, you could implement the following:
- register device reset methods
- savevm/loadvm support
- pic_info, irq_info support
- [Qemu-devel] [PATCH]: add leon target, Tristan Gingold, 2009/01/07
- Re: [Qemu-devel] [PATCH]: add leon target, Jean-Christophe PLAGNIOL-VILLARD, 2009/01/07
- Re: [Qemu-devel] [PATCH]: add leon target,
Blue Swirl <=
- Re: [Qemu-devel] [PATCH]: add leon target, Tristan Gingold, 2009/01/08
- Re: [Qemu-devel] [PATCH]: add leon target, Edgar E. Iglesias, 2009/01/08
- Re: [Qemu-devel] [PATCH]: add leon target, Tristan Gingold, 2009/01/08
- Re: [Qemu-devel] [PATCH]: add leon target, Edgar E. Iglesias, 2009/01/08
- Re: [Qemu-devel] [PATCH]: add leon target, Tristan Gingold, 2009/01/08
- Re: [Qemu-devel] [PATCH]: add leon target, Edgar E. Iglesias, 2009/01/08