soc/intel: sgx: get rid of UEFI-style usage of global variable

Rework SGX enable status in a clean way without using a global variable.

Change-Id: Ida6458eb46708df8fd238122aed41b57ca48c15b
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35882
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Michael Niewöhner
2019-10-08 12:00:24 +02:00
committed by Nico Huber
parent edfe125bf9
commit 6e66d7b8eb
5 changed files with 19 additions and 59 deletions

View File

@@ -205,7 +205,7 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->u2we = config->usb2_wake_enable_bitmap;
gnvs->u3we = config->usb3_wake_enable_bitmap;
if (CONFIG(SOC_INTEL_COMMON_BLOCK_SGX))
if (config->sgx_enable)
sgx_fill_gnvs(gnvs);
}