On 08/23/2013 11:52 AM, Hervé Poussineau wrote:
> +    uint8_t buf[4];
> +    uint64_t val;
> +
> +    if (s->contiguous_map == 0) {
> +        /* 64 KB contiguous space for IOs */
> +        addr &= 0xFFFF;
> +    } else {
> +        /* 8 MB non-contiguous space for IOs */
> +        addr = (addr & 0x1F) | ((addr & 0x007FFF000) >> 7);
> +    }
> +
> +    address_space_read(&s->pci_io_as, addr + 0x80000000, buf, size);
> +    memcpy(&val, buf, size);
> +    return val;

This memcpy can't be right, especially for big-endian host.


r~

Reply via email to