qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Fix console_write_ch on 64-bit big-endian hosts


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Fix console_write_ch on 64-bit big-endian hosts
Date: Wed, 02 Jun 2010 15:32:12 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4

On 06/02/2010 02:31 PM, andrzej zaborowski wrote:
Hi,

On 2 June 2010 20:58, Anthony Liguori<address@hidden>  wrote:
Currently, console_ch_t is defined as an unsigned long.  However, immediately
after it's definition, we treat it as a uint32_t *.  This will work on a little
endian system because of the way bits are layed out but will fail miserably
on big endian hosts.
It seems that what this really tries to do is like *dest =
leul_to_cpu(v) from bswap.h? (Or cpu_to_leul.. quite difficult to wrap
my head around it..)

Yeah, I think it possibly should be a leul_to_cpu with the function signature changed to take an unsigned long.

But one thing I'm very confused about is why console_ch_t is an unsigned long vs. a uint32..

Regards,

Anthony Liguori

Cheers




reply via email to

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