Lines Matching +full:processor +full:- +full:b +full:- +full:side
1 // SPDX-License-Identifier: GPL-2.0-only
3 * (C) 2002 - 2003 Dominik Brodowski <[email protected]>
20 #include "speedstep-lib.h"
22 #define PFX "speedstep-lib: "
31 * GET PROCESSOR CORE SPEED IN KHZ *
34 static unsigned int pentium3_get_frequency(enum speedstep_processor processor) in pentium3_get_frequency() argument
59 /* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */ in pentium3_get_frequency()
61 unsigned int value; /* Front Side Bus speed in MHz */ in pentium3_get_frequency()
74 /* read MSR 0x2a - we only need the low 32 bits */ in pentium3_get_frequency()
76 pr_debug("P3 - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); in pentium3_get_frequency()
89 if (processor == SPEEDSTEP_CPU_PIII_C_EARLY) { in pentium3_get_frequency()
113 pr_debug("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); in pentiumM_get_frequency()
115 /* see table B-2 of 24547212.pdf */ in pentiumM_get_frequency()
117 printk(KERN_DEBUG PFX "PM - invalid FSB: 0x%x 0x%x\n", in pentiumM_get_frequency()
123 pr_debug("bits 22-26 are 0x%x, speed is %u\n", in pentiumM_get_frequency()
136 /* see table B-2 of 25366920.pdf */ in pentium_core_get_frequency()
157 pr_err("PCORE - MSR_FSB_FREQ undefined value\n"); in pentium_core_get_frequency()
161 pr_debug("PCORE - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", in pentium_core_get_frequency()
165 pr_debug("bits 22-26 are 0x%x, speed is %u\n", in pentium_core_get_frequency()
182 * to System Bus Frequency Ratio Field in the Processor Frequency in pentium4_get_frequency()
186 if (c->x86_model < 2) in pentium4_get_frequency()
191 pr_debug("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); in pentium4_get_frequency()
193 /* decode the FSB: see IA-32 Intel (C) Architecture Software in pentium4_get_frequency()
195 * revision #12 in Table B-1: MSRs in the Pentium 4 and in pentium4_get_frequency()
196 * Intel Xeon Processors, on page B-4 and B-5. in pentium4_get_frequency()
213 "Please send an e-mail to <[email protected]>\n"); in pentium4_get_frequency()
218 pr_debug("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n", in pentium4_get_frequency()
227 unsigned int speedstep_get_frequency(enum speedstep_processor processor) in speedstep_get_frequency() argument
229 switch (processor) { in speedstep_get_frequency()
240 return pentium3_get_frequency(processor); in speedstep_get_frequency()
250 * DETECT SPEEDSTEP-CAPABLE PROCESSOR *
259 pr_debug("x86: %x, model: %x\n", c->x86, c->x86_model); in speedstep_detect_processor()
261 if ((c->x86_vendor != X86_VENDOR_INTEL) || in speedstep_detect_processor()
262 ((c->x86 != 6) && (c->x86 != 0xF))) in speedstep_detect_processor()
265 if (c->x86 == 0xF) { in speedstep_detect_processor()
266 /* Intel Mobile Pentium 4-M in speedstep_detect_processor()
268 if (c->x86_model != 2) in speedstep_detect_processor()
274 pr_debug("ebx value is %x, x86_stepping is %x\n", ebx, c->x86_stepping); in speedstep_detect_processor()
276 switch (c->x86_stepping) { in speedstep_detect_processor()
279 * B-stepping [M-P4-M] in speedstep_detect_processor()
287 * C-stepping [M-P4-M] in speedstep_detect_processor()
291 * samples are only of B-stepping... in speedstep_detect_processor()
298 * D-stepping [M-P4-M or M-P4/533] in speedstep_detect_processor()
301 * used by M-P4-M, M-P4/533 and(!) Celeron CPUs. in speedstep_detect_processor()
305 * ebx=0x8 or 0xf -- 25130917.pdf doesn't say anything in speedstep_detect_processor()
307 * M-P4-Ms may have either ebx=0xe or 0xf [see above] in speedstep_detect_processor()
308 * M-P4/533 have either ebx=0xe or 0xf. [25317607.pdf] in speedstep_detect_processor()
309 * also, M-P4M HTs have ebx=0x8, too in speedstep_detect_processor()
314 (strstr(c->x86_model_id, in speedstep_detect_processor()
324 switch (c->x86_model) { in speedstep_detect_processor()
327 * 0x06 for mobile PIII-M */ in speedstep_detect_processor()
336 /* So far all PIII-M processors support SpeedStep. See in speedstep_detect_processor()
353 * If the processor is a mobile version, in speedstep_detect_processor()
363 if (c->x86_stepping == 0x01) { in speedstep_detect_processor()
381 unsigned int speedstep_get_freqs(enum speedstep_processor processor, in speedstep_get_freqs() argument
392 if ((!processor) || (!low_speed) || (!high_speed) || (!set_state)) in speedstep_get_freqs()
393 return -EINVAL; in speedstep_get_freqs()
398 prev_speed = speedstep_get_frequency(processor); in speedstep_get_freqs()
400 return -EIO; in speedstep_get_freqs()
409 *low_speed = speedstep_get_frequency(processor); in speedstep_get_freqs()
411 ret = -EIO; in speedstep_get_freqs()
428 *high_speed = speedstep_get_frequency(processor); in speedstep_get_freqs()
430 ret = -EIO; in speedstep_get_freqs()
437 ret = -ENODEV; in speedstep_get_freqs()