summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/common/block/sgx
diff options
context:
space:
mode:
authorPratik Prajapati <pratikkumar.v.prajapati@intel.com>2017-08-14 13:47:03 -0700
committerAaron Durbin <adurbin@chromium.org>2017-08-21 16:32:18 +0000
commit57f8386a2bfa2ca794b687cfc7846dab690fd438 (patch)
tree5bdafd9a02c7f49e85d7b235120d2a24fb0dbb5c /src/soc/intel/common/block/sgx
parent226065834b046bdeba43b71e63ec896c9adfeb0b (diff)
downloadcoreboot-57f8386a2bfa2ca794b687cfc7846dab690fd438.tar.gz
coreboot-57f8386a2bfa2ca794b687cfc7846dab690fd438.tar.bz2
coreboot-57f8386a2bfa2ca794b687cfc7846dab690fd438.zip
intel/common/sgx: Use intel_mp_current_microcode() to get microcode pointer
Get microcode patch pointer from intel_mp_current_microcode() api of mp_init and change sgx_configure function signature to drop microcode_patch param. Change-Id: I9196c30ec7ea52d7184a96b33835def197e2c799 Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/21009 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/sgx')
-rw-r--r--src/soc/intel/common/block/sgx/sgx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/sgx/sgx.c b/src/soc/intel/common/block/sgx/sgx.c
index 5a0b61dda66e..525e6859a962 100644
--- a/src/soc/intel/common/block/sgx/sgx.c
+++ b/src/soc/intel/common/block/sgx/sgx.c
@@ -13,11 +13,13 @@
* GNU General Public License for more details.
*/
+#include <assert.h>
#include <console/console.h>
#include <chip.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
#include <cpu/intel/microcode.h>
+#include <intelblocks/mp_init.h>
#include <intelblocks/sgx.h>
#include <soc/cpu.h>
#include <soc/msr.h>
@@ -125,10 +127,12 @@ static void activate_sgx(void)
}
}
-void sgx_configure(const void *microcode_patch)
+void sgx_configure(void)
{
device_t dev = SA_DEV_ROOT;
+ assert(dev != NULL);
config_t *conf = dev->chip_info;
+ const void *microcode_patch = intel_mp_current_microcode();
if (!conf->sgx_enable || !is_sgx_supported())
return;