aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/fsp_baytrail/memmap.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-14 06:48:35 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-28 22:50:17 +0000
commitc48624ce1b49c2840def10cdcf197f3d9795cc19 (patch)
treed5c36fce3755656b99107cc88151997ce56d013b /src/soc/intel/fsp_baytrail/memmap.c
parent3e7727908c3137442742a96079def34bb966faaf (diff)
intel/fsp_baytrail: Use smm_subregion()
Change-Id: I4e9de9c7f5decd784d881e5a733e995522be5226 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34757 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/fsp_baytrail/memmap.c')
-rw-r--r--src/soc/intel/fsp_baytrail/memmap.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/soc/intel/fsp_baytrail/memmap.c b/src/soc/intel/fsp_baytrail/memmap.c
index 77ba406507..7fec7f9764 100644
--- a/src/soc/intel/fsp_baytrail/memmap.c
+++ b/src/soc/intel/fsp_baytrail/memmap.c
@@ -15,13 +15,19 @@
*/
#include <cbmem.h>
+#include <cpu/x86/smm.h>
#include <soc/iosf.h>
-#include <soc/smm.h>
#include <drivers/intel/fsp1_0/fsp_util.h>
+#include <types.h>
-uintptr_t smm_region_start(void)
+static uintptr_t smm_region_start(void)
{
- return (iosf_bunit_read(BUNIT_SMRRL) << 20);
+ return (iosf_bunit_read(BUNIT_SMRRL) & 0xFFFF) << 20;
+}
+
+static size_t smm_region_size(void)
+{
+ return CONFIG_SMM_TSEG_SIZE;
}
/** @brief get the top of usable low memory from the FSP's HOB list
@@ -38,3 +44,9 @@ void *cbmem_top(void)
{
return find_fsp_reserved_mem(*(void **)CBMEM_FSP_HOB_PTR);
}
+
+void smm_region(uintptr_t *start, size_t *size)
+{
+ *start = smm_region_start();
+ *size = smm_region_size();
+}