From: Robert Reif <reif@earthlink.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] sparc32 MXCC support
Date: Sun, 14 Oct 2007 09:36:24 -0400 [thread overview]
Message-ID: <47121B58.2060206@earthlink.net> (raw)
In-Reply-To: <f43fc5580710140037w20385f58le158acde8df81884@mail.gmail.com>
Blue Swirl wrote:
>On 10/13/07, Robert Reif <reif@earthlink.net> wrote:
>
>
>>I'm trying to add SuperSparc II MXCC support and need some feedback.
>>
>>Is there a better way to read and write physical memory in 64bit chunks?
>>I'm not sure what I'm doing is portable between 32/64 and big/little endian.
>>
>>
>
>Thank you for your effort. Applying the patch allows NetBSD on SS-10
>to boot as far as on SS-5, previously it crashed.
>
>I think the code is portable, but I think changing the register type
>to uint32_t and using a DPRINTF system like used in for example
>hw/iommu.c should make the code slightly clearer.
>
I don't have access to chip specs but from reading linux and *bsd code it
appears that the registers are 64 bits wide but sometimes accessed as 32
bits to get
only the bottom 32 bits. Do you mean using two uint32_t for a 64 bit
register? How about a union of 2 uint32_t and a uint64_t. Is that
portable?
Never mind. I just found out there is an ldq_phys and stq_phys. I'll
use those.
I looked at DPRINTF but would need a DPRINTF_MMU and DPRINTF_MXCC ...
Would that be acceptable?
>
>For the memory access, ldl/q_phys/stl/q_phys is used in other block
>copy routines. For longer blocks or if the address can be unaligned,
>cpu_physical_memory_read() could be a better choice.
>
>
>
>
>>+int cpu_sparc_register (CPUSPARCState *env, const sparc_def_t *def, int cpu);
>>
>>
>
>unsigned int cpu?
>
>
OK
>>+ printf("ERROR: helper_ld_asi(asi = %d, size = %d, sign = %d) T0 = %08x: unsupported size\n", asi, size, sign, T0);
>>
>>
>
>If it's an error to access the registers with different size, you
>should use do_unassigned_access() to report this.
>
>
>
These are more for me to make sure I catch all the necessary accesses
without adding unnecessary code.
linux 2.4 and netbsd only use the ones I have implemented. openboot
uses more and
also some undocumented ones which are caught by this but I don't know
how to handle
them yet. I will use do_unassigned_access where necessary now.
Thanks for the review.
prev parent reply other threads:[~2007-10-14 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-13 20:43 [Qemu-devel] [RFC] sparc32 MXCC support Robert Reif
2007-10-14 7:37 ` Blue Swirl
2007-10-14 13:36 ` Robert Reif [this message]
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=47121B58.2060206@earthlink.net \
--to=reif@earthlink.net \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.