qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/6] Pass cpu speed into SM BIOS.


From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCH 6/6] Pass cpu speed into SM BIOS.
Date: Mon, 25 Aug 2008 12:44:33 +0300

On Sun, Aug 24, 2008 at 09:14:23PM +0300, Blue Swirl wrote:
> On 8/24/08, Gleb Natapov <address@hidden> wrote:
> >  +static uint32_t cpu_speed;
> 
> 32 bits won't be enough when we get >4GHz CPUs.
> 
The value stored there is in MHz. Actually even 32 bits is to
much since SMBIOS specification uses 16 bit for CPU speed.

> +static double get_freq(int divisor, unsigned int cpu)
> 
> I'd use uint64_t and throw away the divisor and double math.
> 
I've copied this function from another project and didn't want
to change it much in case we will want to use newer version someday.

> On Sparc64, the frequency line in /proc/cpuinfo looks like:
> Cpu0ClkTck      : 000000000ee6b280
> 
Can somebody with this HW add support for it. I don't want to do changes
which I can't test.

--
                        Gleb.




reply via email to

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