aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/fsp2_0/Makefile.inc2
-rw-r--r--src/drivers/intel/fsp2_0/fspt_report.c27
-rw-r--r--src/drivers/intel/fsp2_0/include/fsp/util.h1
3 files changed, 30 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/Makefile.inc b/src/drivers/intel/fsp2_0/Makefile.inc
index 32140f4228..46299ee470 100644
--- a/src/drivers/intel/fsp2_0/Makefile.inc
+++ b/src/drivers/intel/fsp2_0/Makefile.inc
@@ -2,6 +2,8 @@
ifeq ($(CONFIG_PLATFORM_USES_FSP2_0),y)
+bootblock-$(CONFIG_FSP_CAR) += fspt_report.c
+
romstage-y += debug.c
romstage-y += hand_off_block.c
romstage-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c
diff --git a/src/drivers/intel/fsp2_0/fspt_report.c b/src/drivers/intel/fsp2_0/fspt_report.c
new file mode 100644
index 0000000000..7fa3205e3d
--- /dev/null
+++ b/src/drivers/intel/fsp2_0/fspt_report.c
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <arch/symbols.h>
+#include <console/console.h>
+#include <fsp/util.h>
+
+/* filled in assembly after FSP-T ran */
+uintptr_t temp_memory_start;
+uintptr_t temp_memory_end;
+
+void report_fspt_output(void)
+{
+ const struct region fsp_car_region = {
+ .offset = temp_memory_start,
+ .size = temp_memory_end - temp_memory_start,
+ };
+ const struct region coreboot_car_region = {
+ .offset = (uintptr_t)_car_region_start,
+ .size = (uintptr_t)_car_region_size,
+ };
+ printk(BIOS_DEBUG, "FSP-T: reported temp_mem region: [0x%08lx,0x%08lx)\n",
+ temp_memory_start, temp_memory_end);
+ if (!region_is_subregion(&fsp_car_region, &coreboot_car_region)) {
+ printk(BIOS_ERR, "Wrong CAR region used!\n");
+ printk(BIOS_ERR, "Adapt CONFIG_DCACHE_RAM_BASE and CONFIG_DCACHE_RAM_SIZE to match FSP-T\n");
+ }
+}
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h
index f154a34a34..a57b1bb942 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/util.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/util.h
@@ -89,6 +89,7 @@ bool fsp_guid_compare(const uint8_t guid1[16], const uint8_t guid2[16]);
void fsp_find_bootloader_tolum(struct range_entry *re);
void fsp_get_version(char *buf);
void lb_string_platform_blob_version(struct lb_header *header);
+void report_fspt_output(void);
/* Fill in header and validate sanity of component within region device. */
enum cb_err fsp_validate_component(struct fsp_header *hdr,