On 10/13/07, Robert Reif <[EMAIL PROTECTED]> 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.

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?

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


Reply via email to