intel/common/cpu: Add function to get microcode patch pointer
Add mp_current_microcode() function to get the microcode patch pointer. Use this function to avoid reading the microcode patch from the boot media. init_cpus() would initialize microcode_patch global variable to point to microcode patch in boot media and this function can be used to access the pointer. Change-Id: Ia71395f4e5b2b4fcd4e4660b66e8beb99eda65b8 Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/21061 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
6278867065
commit
f771de445d
|
@ -92,6 +92,17 @@ int get_cpu_count(void)
|
||||||
return num_virt_cores;
|
return num_virt_cores;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function to get the microcode patch pointer. Use this function to avoid
|
||||||
|
* reading the microcode patch from the boot media. init_cpus() would
|
||||||
|
* initialize microcode_patch global variable to point to microcode patch
|
||||||
|
* in boot media and this function can be used to access the pointer.
|
||||||
|
*/
|
||||||
|
const void *intel_mp_current_microcode(void)
|
||||||
|
{
|
||||||
|
return microcode_patch;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MP Init callback function(get_microcode_info) to find the Microcode at
|
* MP Init callback function(get_microcode_info) to find the Microcode at
|
||||||
* Pre MP Init phase. This function is common among all SOCs and thus its in
|
* Pre MP Init phase. This function is common among all SOCs and thus its in
|
||||||
|
@ -102,7 +113,7 @@ int get_cpu_count(void)
|
||||||
*/
|
*/
|
||||||
void get_microcode_info(const void **microcode, int *parallel)
|
void get_microcode_info(const void **microcode, int *parallel)
|
||||||
{
|
{
|
||||||
*microcode =microcode_patch;
|
*microcode = intel_mp_current_microcode();
|
||||||
*parallel = 1;
|
*parallel = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,14 @@
|
||||||
*/
|
*/
|
||||||
int get_cpu_count(void);
|
int get_cpu_count(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function to get the microcode patch pointer. Use this function to avoid
|
||||||
|
* reading the microcode patch from the boot media. init_cpus() would
|
||||||
|
* initialize microcode_patch global variable to point to microcode patch
|
||||||
|
* in boot media and this function can be used to access the pointer.
|
||||||
|
*/
|
||||||
|
const void *intel_mp_current_microcode(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MP Init callback function(get_microcode_info) to find the Microcode at
|
* MP Init callback function(get_microcode_info) to find the Microcode at
|
||||||
* Pre MP Init phase. This function is common among all SOCs and thus its in
|
* Pre MP Init phase. This function is common among all SOCs and thus its in
|
||||||
|
|
Loading…
Reference in New Issue