OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <ajones@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v2 3/3] lib: sbi: Make the console print buffer size configurable
Date: Mon, 1 Jul 2024 08:26:32 +0200	[thread overview]
Message-ID: <20240701-b9d1586ac43b46a51d006c5b@orel> (raw)
In-Reply-To: <20240624141903.2305676-4-wxjstz@126.com>

On Mon, Jun 24, 2024 at 10:18:59PM GMT, Xiang W wrote:
> Before the console is initialized, the contents of the console print
> will be cached. If there is a lot of information that needs to be
> output before the console is initialized, can configure it through
> make menuconfig.
> 
> Signed-off-by: Xiang W <wxjstz@126.com>
> ---
>  lib/sbi/Kconfig       | 4 ++++
>  lib/sbi/sbi_console.c | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/sbi/Kconfig b/lib/sbi/Kconfig
> index 6cf54ce..fb6852e 100644
> --- a/lib/sbi/Kconfig
> +++ b/lib/sbi/Kconfig
> @@ -62,4 +62,8 @@ config SBI_ECALL_SSE
>  	bool "SSE extension"
>  	default y
>  
> +config SBI_CONSOLE_TBUF_MAX
> +	int "console print buffer size (bytes)"
> +	default 256
> +
>  endmenu
> diff --git a/lib/sbi/sbi_console.c b/lib/sbi/sbi_console.c
> index 1a91f88..acf9f6b 100644
> --- a/lib/sbi/sbi_console.c
> +++ b/lib/sbi/sbi_console.c
> @@ -14,7 +14,7 @@
>  #include <sbi/sbi_scratch.h>
>  #include <sbi/sbi_string.h>
>  
> -#define CONSOLE_TBUF_MAX 256
> +#define CONSOLE_TBUF_MAX CONFIG_SBI_CONSOLE_TBUF_MAX
>  
>  static const struct sbi_console_device *console_dev = NULL;
>  static char console_tbuf[CONSOLE_TBUF_MAX];
> -- 
> 2.43.0
>

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>


      reply	other threads:[~2024-07-01  6:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 14:18 [PATCH v2 0/3] print befor sbi_console_init Xiang W
2024-06-24 14:18 ` [PATCH v2 1/3] lib: sbi: print before sbi_console_init Xiang W
2024-07-01  6:25   ` Andrew Jones
2024-07-05  6:54   ` Anup Patel
2024-06-24 14:18 ` [PATCH v2 2/3] lib: sbi: dump logs when crash Xiang W
2024-06-26 13:44   ` Himanshu Chauhan
2024-07-01  6:26   ` Andrew Jones
2024-07-05  6:55   ` Anup Patel
2024-06-24 14:18 ` [PATCH v2 3/3] lib: sbi: Make the console print buffer size configurable Xiang W
2024-07-01  6:26   ` Andrew Jones [this message]

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=20240701-b9d1586ac43b46a51d006c5b@orel \
    --to=ajones@ventanamicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox