[coreboot-gerrit] Change in coreboot[master]: intel/common/cpu: Add function to get microcode patch pointer

Pratikkumar V Prajapati (Code Review) gerrit at coreboot.org
Thu Aug 17 04:48:01 CEST 2017


Pratikkumar V Prajapati has uploaded this change for review. ( https://review.coreboot.org/21061


Change subject: intel/common/cpu: Add function to get microcode patch pointer
......................................................................

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 at intel.com>
---
M src/soc/intel/common/block/cpu/mp_init.c
M src/soc/intel/common/block/include/intelblocks/mp_init.h
2 files changed, 20 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/21061/1

diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c
index fd8b5db..5bbbb2c 100644
--- a/src/soc/intel/common/block/cpu/mp_init.c
+++ b/src/soc/intel/common/block/cpu/mp_init.c
@@ -93,6 +93,17 @@
 }
 
 /*
+ * 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
  * Pre MP Init phase. This function is common among all SOCs and thus its in
  * Common CPU block.
@@ -102,7 +113,7 @@
  */
 void get_microcode_info(const void **microcode, int *parallel)
 {
-	*microcode =microcode_patch;
+	*microcode = intel_mp_current_microcode();
 	*parallel = 1;
 }
 
diff --git a/src/soc/intel/common/block/include/intelblocks/mp_init.h b/src/soc/intel/common/block/include/intelblocks/mp_init.h
index 1e5531c..d123207 100644
--- a/src/soc/intel/common/block/include/intelblocks/mp_init.h
+++ b/src/soc/intel/common/block/include/intelblocks/mp_init.h
@@ -43,6 +43,14 @@
 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
  * Pre MP Init phase. This function is common among all SOCs and thus its in
  * Common CPU block.

-- 
To view, visit https://review.coreboot.org/21061
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia71395f4e5b2b4fcd4e4660b66e8beb99eda65b8
Gerrit-Change-Number: 21061
Gerrit-PatchSet: 1
Gerrit-Owner: Pratikkumar V Prajapati <pratikkumar.v.prajapati at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170817/ab23f95c/attachment.html>


More information about the coreboot-gerrit mailing list