qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 2/2] Add optionrom compatible with fw_cfg DMA


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v7 2/2] Add optionrom compatible with fw_cfg DMA version
Date: Wed, 11 May 2016 22:07:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1


On 11/05/2016 19:42, Richard W.M. Jones wrote:
> +
> +#ifdef __clang__
> +#define ADDR32
> +#else
> +#define ADDR32 "addr32 "
> +#endif
> +
> +static inline uint16_t readw_es(uint16_t offset)
> +{
> +    uint16_t val;
> +    asm(ADDR32"movw %%es:(%1), %0" : "=r"(val) : "r"((uint32_t)offset));
> +    barrier();
> +    return val;
> +}

Please check that the output is the same byte-by-byte for this asm.

I guess this is okay if we have a guarantee from clang that the asm
block stays at the beginning.  Perhaps check for the 0x55 0xaa signature
in signrom.py?

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]