summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-05 12:49:09 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-15 04:39:17 +0000
commit4913d8aed05d838d5be9c144f7716968ce2962c9 (patch)
tree0eff121271a156f9ac74d1be81c9fc814ad29ad1 /src/soc/intel/apollolake
parentb1af16a4242d42feb0150c3a8c6fef41c75961d9 (diff)
downloadcoreboot-4913d8aed05d838d5be9c144f7716968ce2962c9.tar.xz
cpu/x86/smm: Define single smm_subregion()
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 <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34776 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: David Guckian Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r--src/soc/intel/apollolake/memmap.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/soc/intel/apollolake/memmap.c b/src/soc/intel/apollolake/memmap.c
index 17dfb3f545..0eb66dcb40 100644
--- a/src/soc/intel/apollolake/memmap.c
+++ b/src/soc/intel/apollolake/memmap.c
@@ -48,32 +48,3 @@ void smm_region(uintptr_t *start, size_t *size)
*start = sa_get_tseg_base();
*size = sa_get_tseg_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);
-
- 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;
-}