Attention is currently required from: Hung-Te Lin, Yidi Lin.

Yidi Lin uploaded patch set #3 to this change.

View Change

soc/mediatek: Add EARLY_INIT_MMU 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_INIT_MMU` 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_INIT_MMU 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>
---
M src/soc/mediatek/common/Kconfig
A src/soc/mediatek/common/bootblock.c
M src/soc/mediatek/common/mmu_operations.c
M src/soc/mediatek/mt8188/Makefile.inc
4 files changed, 25 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/79990/3

To view, visit change 79990. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7f4c3c6c836f7276119698c6de362794cf4222a6
Gerrit-Change-Number: 79990
Gerrit-PatchSet: 3
Gerrit-Owner: Yidi Lin <yidilin@google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte@chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso@google.com>
Gerrit-CC: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte@chromium.org>
Gerrit-Attention: Yidi Lin <yidilin@google.com>
Gerrit-MessageType: newpatchset