summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8188
diff options
context:
space:
mode:
authorYidi Lin <yidilin@chromium.org>2024-01-16 15:08:41 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-01-17 14:41:00 +0000
commitc68176c14e5ded7e8b63f4deeaf9ea714e4b9969 (patch)
tree9d788363c37f6ffc10a42ea2b9d11c80767b9d15 /src/soc/mediatek/mt8188
parent3dadbb9c209d90c66edcef75bd5bc7352fed8da7 (diff)
soc/mediatek: Add EARLY_MMU_INIT kconfig option
Accessing RAM before mmu initialized is time consuming. During mmu initialization, `mmu_init()` and `mmu_config_range()` write logs to the console buffer and contribue the extra boot time. This patch adds a kconfig option to move `mtk_mmu_init()` to `bootblock_soc_early_init()`. When `EARLY_MMU_INIT` is enabled, mmu is initialized before `console_init()` ready. So `mmu_init()` and `mmu_config_range()` won't write logs to the console buffer and save the boot time. It saves about 65ms on Geralt with EARLY_MMU_INIT enabled. Before: 0:1st timestamp 239,841 (0) 11:start of bootblock 239,920 (79) 12:end of bootblock 323,191 (83,271) After: 0:1st timestamp 239,804 (0) 11:start of bootblock 239,884 (80) 12:end of bootblock 258,846 (18,962) BUG=b:320381143 TEST=check timestamps in cbmem Change-Id: I7f4c3c6c836f7276119698c6de362794cf4222a6 Signed-off-by: Yidi Lin <yidilin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79990 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/mt8188')
-rw-r--r--src/soc/mediatek/mt8188/Makefile.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc
index 4731fab14c..14f7d38e3b 100644
--- a/src/soc/mediatek/mt8188/Makefile.inc
+++ b/src/soc/mediatek/mt8188/Makefile.inc
@@ -9,7 +9,7 @@ all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c
all-y += timer.c ../common/timer_prepare.c
all-y += ../common/uart.c
-bootblock-y += bootblock.c
+bootblock-y += ../common/bootblock.c bootblock.c
bootblock-y += ../common/eint_event.c
bootblock-y += ../common/lastbus_v2.c lastbus.c
bootblock-y += ../common/mmu_operations.c