diff options
author | Pratik Prajapati <pratikkumar.v.prajapati@intel.com> | 2017-09-13 13:45:31 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-09-15 16:21:11 +0000 |
commit | b45b22f6b217d1b7aebe2583188839e7906c0a52 (patch) | |
tree | 93b42405236dda5645e1a76047dd1829db409f65 /src/soc/intel/common/block/include/intelblocks | |
parent | 1638a85b495fbf32680a3baf141ef959cb201257 (diff) | |
download | coreboot-b45b22f6b217d1b7aebe2583188839e7906c0a52.tar.xz |
soc/intel/common/sgx: Define and use soc_fill_sgx_param()
To remove chip.h dependency from SGX common code
- Create API soc_fill_sgx_param() and use it in sgx.c
- Implement same API for skylake/kabylake
- define sgx_param structure
Also include intelblocks/sgx.h instead of soc/msr.h
Change-Id: I358f0817bec5dd6cd147a645675b5688969a04e0
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/21528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/common/block/include/intelblocks')
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/sgx.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/sgx.h b/src/soc/intel/common/block/include/intelblocks/sgx.h index efcad6164b..f1dd8912fe 100644 --- a/src/soc/intel/common/block/include/intelblocks/sgx.h +++ b/src/soc/intel/common/block/include/intelblocks/sgx.h @@ -16,6 +16,10 @@ #ifndef SOC_INTEL_COMMON_BLOCK_SGX_H #define SOC_INTEL_COMMON_BLOCK_SGX_H +struct sgx_param { + uint8_t enable; +}; + /* * Lock SGX memory. * CPU specific code needs to provide the implementation. @@ -34,4 +38,8 @@ void prmrr_core_configure(void); */ void sgx_configure(void); +/* SOC specific API to get SGX params. + * returns 0, if able to get SGX params; otherwise returns -1 */ +int soc_fill_sgx_param(struct sgx_param *sgx_param); + #endif /* SOC_INTEL_COMMON_BLOCK_SGX_H */ |