https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240475

--- Comment #7 from Neel Chauhan <n...@neelc.org> ---
It's true that Linux does this (lines 660-661):

    crystal_khz = eax_base_mhz * 1000 *
        eax_denominator / ebx_numerator;

But in the same function, Linux returns this (line 674):

    return crystal_khz * ebx_numerator / eax_denominator;

So the numerator and denominator in crystal_khz effectively cancels out on
CPUID 0x16.

>From what I understand, Linux expects the value in kilohertz, so a multiplier
of 1000 works on Linux. I believe FreeBSD expects hertz, so a multiplier of
1000000 is needed.

For unit conversion of megahertz to hertz, 1000 Hz = 1 KHz and 1000 KHz = 1
MHz, so 1 MHz = 1000 KHz * 1000 Hz.

Also, using the numerator and denominator wouldn't work (I've tried that, I got
a kernel panic).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to