soc/intel/{skl,apl}: don't run or even include SGX code if disabled

Do not run or include any code in case the user did not explicitly
enable SGX through `SOC_INTEL_COMMON_BLOCK_SGX_ENABLE`.

Also move the ifdef inside the ASL file.

Change-Id: Iec4d3d3eb2811ec14d29aff9601ba325724bc28c
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58426
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Michael Niewöhner 2021-10-18 19:54:21 +02:00 committed by Felix Singer
commit bc5f51fa56
5 changed files with 4 additions and 6 deletions

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#if CONFIG(SOC_INTEL_COMMON_BLOCK_SGX_ENABLE)
Scope(\_SB)
{
// Secure Enclave memory
@ -54,3 +55,4 @@ Scope(\_SB)
} // end EPC Device
} // End of Scope(\_SB)
#endif

View file

@ -1 +1 @@
ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_SGX) += sgx.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_SGX_ENABLE) += sgx.c