cpu/intel/common/fsb.c: Drop CAR_GLOBAL_MIGRATION support
Change-Id: I151090c8d7f670f121dc7e4cbebfd720034fde33 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37051 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
462a7daeec
commit
6229cc93ff
|
@ -11,7 +11,6 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/early_variables.h>
|
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include <cpu/x86/tsc.h>
|
#include <cpu/x86/tsc.h>
|
||||||
#include <cpu/intel/speedstep.h>
|
#include <cpu/intel/speedstep.h>
|
||||||
|
@ -20,8 +19,8 @@
|
||||||
#include <commonlib/helpers.h>
|
#include <commonlib/helpers.h>
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
|
|
||||||
static u32 g_timer_fsb CAR_GLOBAL;
|
static u32 g_timer_fsb;
|
||||||
static u32 g_timer_tsc CAR_GLOBAL;
|
static u32 g_timer_tsc;
|
||||||
|
|
||||||
/* This is not an architectural MSR. */
|
/* This is not an architectural MSR. */
|
||||||
#define MSR_PLATFORM_INFO 0xce
|
#define MSR_PLATFORM_INFO 0xce
|
||||||
|
@ -99,8 +98,8 @@ static void resolve_timebase(void)
|
||||||
ret = get_fsb_tsc(&fsb, &ratio);
|
ret = get_fsb_tsc(&fsb, &ratio);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
u32 tsc = 100 * DIV_ROUND_CLOSEST(ratio * fsb, 100);
|
u32 tsc = 100 * DIV_ROUND_CLOSEST(ratio * fsb, 100);
|
||||||
car_set_var(g_timer_fsb, fsb);
|
g_timer_fsb = fsb;
|
||||||
car_set_var(g_timer_tsc, tsc);
|
g_timer_tsc = tsc;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,33 +109,27 @@ static void resolve_timebase(void)
|
||||||
printk(BIOS_ERR, "CPU not supported\n");
|
printk(BIOS_ERR, "CPU not supported\n");
|
||||||
|
|
||||||
/* Set some semi-ridiculous defaults. */
|
/* Set some semi-ridiculous defaults. */
|
||||||
car_set_var(g_timer_fsb, 500);
|
g_timer_fsb = 500;
|
||||||
car_set_var(g_timer_tsc, 5000);
|
g_timer_tsc = 5000;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 get_timer_fsb(void)
|
u32 get_timer_fsb(void)
|
||||||
{
|
{
|
||||||
u32 fsb;
|
if (g_timer_fsb > 0)
|
||||||
|
return g_timer_fsb;
|
||||||
fsb = car_get_var(g_timer_fsb);
|
|
||||||
if (fsb > 0)
|
|
||||||
return fsb;
|
|
||||||
|
|
||||||
resolve_timebase();
|
resolve_timebase();
|
||||||
return car_get_var(g_timer_fsb);
|
return g_timer_fsb;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long tsc_freq_mhz(void)
|
unsigned long tsc_freq_mhz(void)
|
||||||
{
|
{
|
||||||
u32 tsc;
|
if (g_timer_tsc > 0)
|
||||||
|
return g_timer_tsc;
|
||||||
tsc = car_get_var(g_timer_tsc);
|
|
||||||
if (tsc > 0)
|
|
||||||
return tsc;
|
|
||||||
|
|
||||||
resolve_timebase();
|
resolve_timebase();
|
||||||
return car_get_var(g_timer_tsc);
|
return g_timer_tsc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue