reset TIME_STAMP_COUNTER during boot
This commit is contained in:
@@ -5,12 +5,15 @@
|
|||||||
#include <aal/debug.h>
|
#include <aal/debug.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
|
#include <march.h>
|
||||||
|
|
||||||
int num_processors = 1;
|
int num_processors = 1;
|
||||||
static volatile int ap_stop = 1;
|
static volatile int ap_stop = 1;
|
||||||
|
|
||||||
static void ap_wait(void)
|
static void ap_wait(void)
|
||||||
{
|
{
|
||||||
|
wrmsr(MSR_IA32_TIME_STAMP_COUNTER, 0);
|
||||||
|
|
||||||
while (ap_stop) {
|
while (ap_stop) {
|
||||||
barrier();
|
barrier();
|
||||||
cpu_pause();
|
cpu_pause();
|
||||||
@@ -42,6 +45,8 @@ void ap_init(void)
|
|||||||
int bsp_hw_id;
|
int bsp_hw_id;
|
||||||
|
|
||||||
aal_mc_init_ap();
|
aal_mc_init_ap();
|
||||||
|
|
||||||
|
wrmsr(MSR_IA32_TIME_STAMP_COUNTER, 0);
|
||||||
|
|
||||||
cpu_info = aal_mc_get_cpu_info();
|
cpu_info = aal_mc_get_cpu_info();
|
||||||
bsp_hw_id = aal_mc_get_hardware_processor_id();
|
bsp_hw_id = aal_mc_get_hardware_processor_id();
|
||||||
|
|||||||
Reference in New Issue
Block a user