FreeBSD Bugzilla – Attachment 207346 Details for
Bug 240475
[PATCH]: Add support for CPUID 0x16 in tsc_freq_cpuid() (TSC clock)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (Revision 1)
cpuid-0x16-tsc.patch (text/plain), 614 bytes, created by
Neel Chauhan
on 2019-09-10 15:01:56 UTC
(
hide
)
Description:
Patch (Revision 1)
Filename:
MIME Type:
Creator:
Neel Chauhan
Created:
2019-09-10 15:01:56 UTC
Size:
614 bytes
patch
obsolete
>Index: sys/x86/x86/tsc.c >=================================================================== >--- sys/x86/x86/tsc.c (revision 352137) >+++ sys/x86/x86/tsc.c (working copy) >@@ -146,8 +146,15 @@ > if (cpu_high < 0x15) > return (false); > do_cpuid(0x15, regs); >- if (regs[0] == 0 || regs[1] == 0 || regs[2] == 0) >+ if (regs[0] == 0 || regs[1] == 0 || regs[2] == 0) { >+ if (cpu_high >= 0x16) { >+ u_int freq_regs[4]; >+ do_cpuid(0x16, freq_regs); >+ tsc_freq = (uint64_t) freq_regs[0] * 1000000; >+ return (true); >+ } > return (false); >+ } > tsc_freq = (uint64_t)regs[2] * regs[1] / regs[0]; > return (true); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240475
: 207346 |
207426
|
207427