All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiang W <wxjstz@126.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v1] "Reset registers to enhance robustness."
Date: Thu, 30 May 2024 09:07:27 +0800	[thread overview]
Message-ID: <5bd477ae147a02b0cb9f349c8ac7481ed6211f83.camel@126.com> (raw)
In-Reply-To: <20240529073747.505-1-popeblei@gmail.com>

? 2024-05-29???? 15:37 +0800?Pope B.Lei???
> Signed-off-by: Pope B.Lei <popeblei@gmail.com>
> ---
> V1: If the registers are not initialized, they may remain in an x-state in certain DV verification environments due to the lack of written
> values, causing the x-state to propagate during the boot process. Adding register initialization enhances robustness.

In DV system, all registers should be written to prevent the existence of registers
in x-state state. _reset_regs cannot write all registers for parameter passing. If
all registers are written, it will affect the function of opensbi.

So I don't think it's a good way to stop a register from having x-state state.

Regards,
Xiang W

> ?firmware/fw_base.S | 2 ++
> ?1 file changed, 2 insertions(+)
> 
> diff --git a/firmware/fw_base.S b/firmware/fw_base.S
> index b950c0b..10889a9 100644
> --- a/firmware/fw_base.S
> +++ b/firmware/fw_base.S
> @@ -36,6 +36,8 @@
> ?	.globl _start
> ?	.globl _start_warm
> ?_start:
> +	/* Reset registers to enhance robustness. */
> +	call	_reset_regs
> ?	/* Find preferred boot HART id */
> ?	MOV_3R	s0, a0, s1, a1, s2, a2
> ?	call	fw_boot_hart
> -- 
> 2.35.2.windows.1
> 
> 



  parent reply	other threads:[~2024-05-30  1:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29  7:37 [PATCH v1] "Reset registers to enhance robustness." Pope B.Lei
2024-05-29  7:40 ` Jessica Clarke
2024-05-29  8:18   ` Pope B.Lei
2024-05-30  1:07 ` Xiang W [this message]
2024-05-30  2:56   ` Pope B.Lei
  -- strict thread matches above, loose matches on Subject: below --
2024-05-29  7:37 Pope B.Lei

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=5bd477ae147a02b0cb9f349c8ac7481ed6211f83.camel@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.