From: Xiang W <wxjstz@126.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 4/4] lib: sbi: Initialize the console as early as possible
Date: Thu, 6 Jun 2024 17:17:16 +0800 [thread overview]
Message-ID: <20240606091723.896477-5-wxjstz@126.com> (raw)
In-Reply-To: <20240606091723.896477-1-wxjstz@126.com>
Move console initialization to the front of init_coldboot so that
more information can be output
Signed-off-by: Xiang W <wxjstz@126.com>
---
lib/sbi/sbi_init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c
index 389172a..b14cd03 100644
--- a/lib/sbi/sbi_init.c
+++ b/lib/sbi/sbi_init.c
@@ -214,6 +214,10 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
unsigned long *count;
const struct sbi_platform *plat = sbi_platform_ptr(scratch);
+ rc = sbi_console_init(scratch);
+ if (rc)
+ sbi_hart_hang();
+
/* Note: This has to be first thing in coldboot init sequence */
rc = sbi_scratch_init(scratch);
if (rc)
@@ -260,10 +264,6 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
if (rc)
sbi_hart_hang();
- rc = sbi_console_init(scratch);
- if (rc)
- sbi_hart_hang();
-
rc = sbi_sse_init(scratch, true);
if (rc) {
sbi_printf("%s: sse init failed (error %d)\n", __func__, rc);
--
2.43.0
next prev parent reply other threads:[~2024-06-06 9:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 9:17 [PATCH 0/4] Initialize the console as early as possible Xiang W
2024-06-06 9:17 ` [PATCH 1/4] include: sbi_utils: fixup fdt_get_address Xiang W
2024-06-06 9:17 ` [PATCH 2/4] lib: sbi: Add domains_init to sbi_console_device Xiang W
2024-06-06 9:17 ` [PATCH 3/4] lib: utils/serial: add domains_init for 8250 Xiang W
2024-06-06 9:17 ` Xiang W [this message]
2024-06-21 12:07 ` [PATCH 0/4] Initialize the console as early as possible Anup Patel
2024-06-21 14:02 ` Andrew Jones
2024-06-21 14:55 ` Xiang W
2024-06-21 14:52 ` Xiang W
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240606091723.896477-5-wxjstz@126.com \
--to=wxjstz@126.com \
--cc=opensbi@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.