qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] sparc hflags support?
@ 2007-11-04 23:43 Robert Reif
  2007-11-04 23:47 ` Paul Brook
  2007-11-05 15:55 ` Blue Swirl
  0 siblings, 2 replies; 4+ messages in thread
From: Robert Reif @ 2007-11-04 23:43 UTC (permalink / raw)
  To: qemu-devel

I'm looking at adding more complete support for different sparc32
CPUs, MMUs,  cache controllers and systems.

Each CPU/MMU/cache controller combination is slightly different and
requires its own unique state.  For example the two CPUs currently
supported save the boot mode in different bits in the MMU control
register: 0x2000 for the SuperSparc and 0x4000 for the TurboSparc.
Others bits will need to be saved in the MMU and cache controllers
as better hardware emulation is added.

It looks like other architectures handle this by computing hflags
in the target directories but sparc determines the flags value to save
in common code. 

Are there plans to add hflags support to sparc?  I'm willing work
on it but I don't have the experience yet to tackle a job like this
without help.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] sparc hflags support?
  2007-11-04 23:43 [Qemu-devel] sparc hflags support? Robert Reif
@ 2007-11-04 23:47 ` Paul Brook
  2007-11-05 16:02   ` Blue Swirl
  2007-11-05 15:55 ` Blue Swirl
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Brook @ 2007-11-04 23:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Robert Reif

On Sunday 04 November 2007, Robert Reif wrote:
> I'm looking at adding more complete support for different sparc32
> CPUs, MMUs,  cache controllers and systems.
>
> Each CPU/MMU/cache controller combination is slightly different and
> requires its own unique state.  For example the two CPUs currently
> supported save the boot mode in different bits in the MMU control
> register: 0x2000 for the SuperSparc and 0x4000 for the TurboSparc.
> Others bits will need to be saved in the MMU and cache controllers
> as better hardware emulation is added.

If it's something that only changes rarely (e.g. when switching from early 
boot to a real OS environment) you can just do a tb flush.

Does mmu/cache mode actually effect the instruction semantics? 

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] sparc hflags support?
  2007-11-04 23:43 [Qemu-devel] sparc hflags support? Robert Reif
  2007-11-04 23:47 ` Paul Brook
@ 2007-11-05 15:55 ` Blue Swirl
  1 sibling, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2007-11-05 15:55 UTC (permalink / raw)
  To: qemu-devel

On 11/5/07, Robert Reif <reif@earthlink.net> wrote:
> I'm looking at adding more complete support for different sparc32
> CPUs, MMUs,  cache controllers and systems.

Great! The only problems I see are that OpenBIOS support needs to be
added for the new CPUs and supporting all CPUs with one image may
become a bit complex.

> Each CPU/MMU/cache controller combination is slightly different and
> requires its own unique state.  For example the two CPUs currently
> supported save the boot mode in different bits in the MMU control
> register: 0x2000 for the SuperSparc and 0x4000 for the TurboSparc.
> Others bits will need to be saved in the MMU and cache controllers
> as better hardware emulation is added.

I think other targets have better design for supporting different CPU
types, for example MIPS and PPC.

> It looks like other architectures handle this by computing hflags
> in the target directories but sparc determines the flags value to save
> in common code.
>
> Are there plans to add hflags support to sparc?  I'm willing work
> on it but I don't have the experience yet to tackle a job like this
> without help.

It could bring some performance benefit. Just try to move the tb flags
computation to op_helper.c. Every time hflags elements change,
recompute the flags. I'd be happy to try to help you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] sparc hflags support?
  2007-11-04 23:47 ` Paul Brook
@ 2007-11-05 16:02   ` Blue Swirl
  0 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2007-11-05 16:02 UTC (permalink / raw)
  To: qemu-devel

On 11/5/07, Paul Brook <paul@codesourcery.com> wrote:
> On Sunday 04 November 2007, Robert Reif wrote:
> > I'm looking at adding more complete support for different sparc32
> > CPUs, MMUs,  cache controllers and systems.
> >
> > Each CPU/MMU/cache controller combination is slightly different and
> > requires its own unique state.  For example the two CPUs currently
> > supported save the boot mode in different bits in the MMU control
> > register: 0x2000 for the SuperSparc and 0x4000 for the TurboSparc.
> > Others bits will need to be saved in the MMU and cache controllers
> > as better hardware emulation is added.
>
> If it's something that only changes rarely (e.g. when switching from early
> boot to a real OS environment) you can just do a tb flush.

Boot mode is used even earlier. It's enabled on reset and it forces
the boot rom to occupy all of the address space. Boot rom disables it
after relocating itself and enabling the MMU. On Sparc the MMU is
never disabled after that, even during boot.

> Does mmu/cache mode actually effect the instruction semantics?

No, only instruction fetches, though I don't know about the cache controllers.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-05 16:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-04 23:43 [Qemu-devel] sparc hflags support? Robert Reif
2007-11-04 23:47 ` Paul Brook
2007-11-05 16:02   ` Blue Swirl
2007-11-05 15:55 ` Blue Swirl

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).