From 4913d8aed05d838d5be9c144f7716968ce2962c9 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Mon, 5 Aug 2019 12:49:09 +0300 Subject: cpu/x86/smm: Define single smm_subregion() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the moment we only have two splitting of TSEG, one with and one without IED. They can all use same implementation. Make configuration problems of TSEG region assertion failures. Rename file from stage_cache.c to tseg_region.c to reflect it's purpose. Change-Id: I9daf0dec8fbaaa1f4e6004ea034869f43412d7d5 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34776 Reviewed-by: Furquan Shaikh Reviewed-by: David Guckian Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/denverton_ns/memmap.c | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'src/soc/intel/denverton_ns/memmap.c') diff --git a/src/soc/intel/denverton_ns/memmap.c b/src/soc/intel/denverton_ns/memmap.c index 9507d7f238..0cca4b90d4 100644 --- a/src/soc/intel/denverton_ns/memmap.c +++ b/src/soc/intel/denverton_ns/memmap.c @@ -75,33 +75,3 @@ void smm_region(uintptr_t *start, size_t *size) *start = smm_region_start(); *size = smm_region_size(); } - -int smm_subregion(int sub, uintptr_t *start, size_t *size) -{ - uintptr_t sub_base; - size_t sub_size; - const size_t cache_size = CONFIG_SMM_RESERVED_SIZE; - - smm_region(&sub_base, &sub_size); - assert(sub_size > CONFIG_SMM_RESERVED_SIZE); - - switch (sub) { - case SMM_SUBREGION_HANDLER: - /* Handler starts at the base of TSEG. */ - sub_size -= cache_size; - break; - case SMM_SUBREGION_CACHE: - /* External cache is in the middle of TSEG. */ - sub_base += sub_size - cache_size; - sub_size = cache_size; - break; - default: - *start = 0; - *size = 0; - return -1; - } - - *start = sub_base; - *size = sub_size; - return 0; -} -- cgit v1.2.3