summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/sgx/sgx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/sgx/sgx.c b/src/soc/intel/common/block/sgx/sgx.c
index da84ea6119..ec1b6386df 100644
--- a/src/soc/intel/common/block/sgx/sgx.c
+++ b/src/soc/intel/common/block/sgx/sgx.c
@@ -41,8 +41,14 @@ void prmrr_core_configure(void)
msr_t prmrr_mask;
msr_t msr;
device_t dev = SA_DEV_ROOT;
+ assert(dev != NULL);
config_t *conf = dev->chip_info;
+ if (!conf) {
+ printk(BIOS_ERR, "SGX: failed to get chip_info\n");
+ return;
+ }
+
if (!conf->sgx_enable || !is_sgx_supported())
return;
@@ -159,6 +165,11 @@ void sgx_configure(void)
config_t *conf = dev->chip_info;
const void *microcode_patch = intel_mp_current_microcode();
+ if (!conf) {
+ printk(BIOS_ERR, "SGX: failed to get chip_info\n");
+ return;
+ }
+
if (!conf->sgx_enable || !is_sgx_supported() || !is_prmrr_set()) {
printk(BIOS_ERR, "SGX: pre-conditions not met\n");
return;