summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/block/systemagent/Kconfig6
-rw-r--r--src/soc/intel/common/block/systemagent/Makefile.inc1
-rw-r--r--src/soc/intel/common/block/systemagent/cbmem.c23
-rw-r--r--src/soc/intel/common/block/systemagent/memmap.c27
4 files changed, 30 insertions, 27 deletions
diff --git a/src/soc/intel/common/block/systemagent/Kconfig b/src/soc/intel/common/block/systemagent/Kconfig
index 1222573201..4c50d50c64 100644
--- a/src/soc/intel/common/block/systemagent/Kconfig
+++ b/src/soc/intel/common/block/systemagent/Kconfig
@@ -3,6 +3,12 @@ config SOC_INTEL_COMMON_BLOCK_SA
help
Intel Processor common System Agent support
+config SOC_INTEL_COMMON_BLOCK_SA_FSP_TOLUM
+ bool
+ help
+ Select this if you want cbmem_top_chipset use the TOLUM returned
+ by the FSP HOB.
+
config MMCONF_BASE_ADDRESS
hex
default 0xe0000000
diff --git a/src/soc/intel/common/block/systemagent/Makefile.inc b/src/soc/intel/common/block/systemagent/Makefile.inc
index 7e49ec7291..1cced4a0d1 100644
--- a/src/soc/intel/common/block/systemagent/Makefile.inc
+++ b/src/soc/intel/common/block/systemagent/Makefile.inc
@@ -6,3 +6,4 @@ ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_SA) += systemagent.c
romstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_SA) += memmap.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_SA) += memmap.c
postcar-$(CONFIG_SOC_INTEL_COMMON_BLOCK_SA) += memmap.c
+romstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_SA_FSP_TOLUM) += cbmem.c
diff --git a/src/soc/intel/common/block/systemagent/cbmem.c b/src/soc/intel/common/block/systemagent/cbmem.c
new file mode 100644
index 0000000000..7e743dfcdd
--- /dev/null
+++ b/src/soc/intel/common/block/systemagent/cbmem.c
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <cbmem.h>
+#include <fsp/util.h>
+
+void *cbmem_top_chipset(void)
+{
+ struct range_entry tolum;
+
+ fsp_find_bootloader_tolum(&tolum);
+ return (void *)(uintptr_t)range_entry_end(&tolum);
+}
diff --git a/src/soc/intel/common/block/systemagent/memmap.c b/src/soc/intel/common/block/systemagent/memmap.c
index 809c13a1ff..2b0fdc4e14 100644
--- a/src/soc/intel/common/block/systemagent/memmap.c
+++ b/src/soc/intel/common/block/systemagent/memmap.c
@@ -19,8 +19,6 @@
#include <console/console.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/smm.h>
-#include <fsp/util.h>
-#include <intelblocks/ebda.h>
#include <intelblocks/systemagent.h>
#include <stdlib.h>
@@ -70,31 +68,6 @@ void smm_region(uintptr_t *start, size_t *size)
*size = sa_get_tseg_size();
}
-#if CONFIG(SOC_INTEL_COMMON_BLOCK_EBDA)
-void fill_memmap_ebda(struct ebda_config *cfg)
-{
- struct range_entry tolum;
-
- fsp_find_bootloader_tolum(&tolum);
- cfg->cbmem_top = range_entry_end(&tolum);
-}
-
-void cbmem_top_init(void)
-{
- /* Initialize EBDA area */
- initialize_ebda_area();
-}
-
-void *cbmem_top_chipset(void)
-{
- struct ebda_config ebda_cfg;
-
- retrieve_ebda_object(&ebda_cfg);
-
- return (void *)(uintptr_t)ebda_cfg.cbmem_top;
-}
-#endif
-
void fill_postcar_frame(struct postcar_frame *pcf)
{
uintptr_t top_of_ram;