Attention is currently required from: Hung-Te Lin, Yidi Lin.
Hello Hung-Te Lin, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/79990?usp=email
to look at the new patch set (#3).
Change subject: soc/mediatek: Add EARLY_INIT_MMU kconfig option
......................................................................
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(a)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 https://review.coreboot.org/c/coreboot/+/79990?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7f4c3c6c836f7276119698c6de362794cf4222a6
Gerrit-Change-Number: 79990
Gerrit-PatchSet: 3
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Hung-Te Lin, Yidi Lin.
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79991?usp=email )
Change subject: soc/mediatek/mt8188: Enable EARLY_INIT_MMU
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/79991?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I74191ab8cbefa08b7e296312645ea40b46fabf77
Gerrit-Change-Number: 79991
Gerrit-PatchSet: 2
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Comment-Date: Tue, 16 Jan 2024 09:34:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Hung-Te Lin, Yidi Lin.
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79990?usp=email )
Change subject: soc/mediatek: Add EARLY_INIT_MMU kconfig option
......................................................................
Patch Set 1:
(3 comments)
File src/soc/mediatek/common/Kconfig:
https://review.coreboot.org/c/coreboot/+/79990/comment/e1eb5e9b_1304f9d9 :
PS1, Line 94: EARLY_INIT_MMU
How about `EARLY_MMU_INIT`?
https://review.coreboot.org/c/coreboot/+/79990/comment/13f8b4d8_f96f3950 :
PS1, Line 98: When this opiton is enabled, `mtk_mmu_init()` will be done in
> `'opiton' may be misspelled - perhaps 'option'?`
Please fix.
File src/soc/mediatek/mt8188/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/79990/comment/fd17b292_d1282021 :
PS1, Line 13: bootblock-$(CONFIG_EARLY_INIT_MMU) += ../common/bootblock.c
This reads a bit weird to me, as common/bootblock.c may not be directly related to `mtk_mmu_init`. It may contain more init functions.
Can we always add it here, and then add `if (CONFIG(...))` in `bootblock_soc_early_init()`?
--
To view, visit https://review.coreboot.org/c/coreboot/+/79990?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7f4c3c6c836f7276119698c6de362794cf4222a6
Gerrit-Change-Number: 79990
Gerrit-PatchSet: 1
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Comment-Date: Tue, 16 Jan 2024 09:33:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Hung-Te Lin, Yu-Ping Wu.
Hello Hung-Te Lin, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/79990?usp=email
to look at the new patch set (#2).
Change subject: soc/mediatek: Add EARLY_INIT_MMU kconfig option
......................................................................
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(a)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, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/79990/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/79990?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7f4c3c6c836f7276119698c6de362794cf4222a6
Gerrit-Change-Number: 79990
Gerrit-PatchSet: 2
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newpatchset
Yidi Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/79990?usp=email )
Change subject: soc/mediatek: Add EARLY_INIT_MMU kconfig option
......................................................................
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(a)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, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/79990/1
diff --git a/src/soc/mediatek/common/Kconfig b/src/soc/mediatek/common/Kconfig
index 8092aa7..986a447 100644
--- a/src/soc/mediatek/common/Kconfig
+++ b/src/soc/mediatek/common/Kconfig
@@ -91,4 +91,11 @@
When this option is enabled, the DEVAPC driver prints the settings after
initialization.
+config EARLY_INIT_MMU
+ bool
+ default n
+ help
+ When this opiton is enabled, `mtk_mmu_init()` will be done in
+ `bootblock_soc_early_init()` to reduce the boot time.
+
endif
diff --git a/src/soc/mediatek/common/bootblock.c b/src/soc/mediatek/common/bootblock.c
new file mode 100644
index 0000000..b5cc22e
--- /dev/null
+++ b/src/soc/mediatek/common/bootblock.c
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <bootblock_common.h>
+#include <soc/mmu_operations.h>
+
+void bootblock_soc_early_init(void)
+{
+ mtk_mmu_init();
+}
diff --git a/src/soc/mediatek/common/mmu_operations.c b/src/soc/mediatek/common/mmu_operations.c
index 340f9ec..cbd6c09 100644
--- a/src/soc/mediatek/common/mmu_operations.c
+++ b/src/soc/mediatek/common/mmu_operations.c
@@ -9,6 +9,13 @@
void mtk_mmu_init(void)
{
+ static bool mmu_inited;
+
+ if (mmu_inited)
+ return;
+
+ mmu_inited = true;
+
mmu_init();
/*
diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc
index 4731fab..71113f1 100644
--- a/src/soc/mediatek/mt8188/Makefile.inc
+++ b/src/soc/mediatek/mt8188/Makefile.inc
@@ -10,6 +10,7 @@
all-y += ../common/uart.c
bootblock-y += bootblock.c
+bootblock-$(CONFIG_EARLY_INIT_MMU) += ../common/bootblock.c
bootblock-y += ../common/eint_event.c
bootblock-y += ../common/lastbus_v2.c lastbus.c
bootblock-y += ../common/mmu_operations.c
--
To view, visit https://review.coreboot.org/c/coreboot/+/79990?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7f4c3c6c836f7276119698c6de362794cf4222a6
Gerrit-Change-Number: 79990
Gerrit-PatchSet: 1
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-MessageType: newchange
Patrick Rudolph has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/79877?usp=email )
Change subject: device: Add support for multiple PCI segment groups
......................................................................
Abandoned
Superseeded by CB:79927
--
To view, visit https://review.coreboot.org/c/coreboot/+/79877?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Iab2c97a71a650e1ceadce4f985147ce05d4e8c86
Gerrit-Change-Number: 79877
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: abandon
Attention is currently required from: Felix Singer.
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79961?usp=email )
Change subject: intel ehl mainboards: Move PcieRpEnable option below dt entries
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Not sure if we need this patch at all as CB:79921 already just removes the entries in question. What is left then from this patch other than a merge conflict?
--
To view, visit https://review.coreboot.org/c/coreboot/+/79961?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I3b14704916bb8105837257c271576f30cf62138b
Gerrit-Change-Number: 79961
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Comment-Date: Tue, 16 Jan 2024 08:47:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment