public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Leo Liang <ycliang@andestech.com>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: <u-boot@lists.denx.de>, Andrew Jones <ajones@ventanamicro.com>
Subject: Re: RISC-V u-boot unable to boot QEMU using '-cpu max'
Date: Tue, 23 Apr 2024 13:34:42 +0800	[thread overview]
Message-ID: <ZidIcgEPSb_vDQw7@swlinux02> (raw)
In-Reply-To: <bed7e137-4613-4153-babc-3b8b7c911151@ventanamicro.com>

On Mon, Apr 22, 2024 at 04:43:59PM -0300, Daniel Henrique Barboza wrote:
> [EXTERNAL MAIL]
> 
> Hi,
> 
> In QEMU we have a 'max' type CPU that implements (almost) all extensions that QEMU
> is able to emulate. Recently, in QEMU commit 249e0905d05, we bumped the extensions
> for this CPU.
> 
> And after this commit this CPU is now unable to boot a guest using upstream
> u-boot. Here's the error being thrown:
> 
> qemu-system-riscv64 \
>         -machine virt -nographic -m 8G -smp 8 \
>         -cpu max -kernel uboot.elf (...)
> (...)
> 
> initcall sequence 000000008027c3e8 failed at call 000000008021259e (err=-28)
> ### ERROR ### Please RESET the board ###
> 
> 
> I can get the guest to boot if I disable the following extensions from the 'max' CPU:
> 
>  -cpu max,zfbfmin=false,zvfbfmin=false,zvfbfwma=false
> 
> Due to QEMU extension dependencies I'm not able to disable these individually. What I can
> say is that u-boot isn't playing ball to at least one of them.
> 
> Is this an u-boot bug? Up to this point I was assuming that u-boot would silently ignore
> hart extensions that it doesn't support.

Hi Daniel,

Which u-boot version are you using?

I think this issue is fixed by the following patch set sent by Conor.

	f39b1b77d8 riscv: support extension probing using riscv, isa-extensions
	b90edde701 riscv: don't read riscv, isa in the riscv cpu's get_desc()

I've tested and can reproduce the issue you mentioned if these two patches are reverted.

Could you try with the lastest u-boot master branch again?


For reference, my testing commands are as follows:
1. cd ${u-boot} && make qemu-riscv64_defconfig && make -j`nproc`
2. ./${qemu}/build/qemu-system-riscv64 -nographic -machine virt -cpu max -bios u-boot.bin -m 8G -smp 8

- u-boot branch (commit): master (38ea74d6d5c0 "Prepare v2024.07-rc1")
- qemu branch (commit): master (62dbe54c24db "Update version for v9.0.0-rc4 release")


Best regards,
Leo

> 
> 
> Thanks,
> 
> 
> Daniel

  reply	other threads:[~2024-04-23  5:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 19:43 RISC-V u-boot unable to boot QEMU using '-cpu max' Daniel Henrique Barboza
2024-04-23  5:34 ` Leo Liang [this message]
2024-04-23 12:41   ` Conor Dooley
2024-04-23 12:52     ` Daniel Henrique Barboza
2024-04-23 14:23       ` Conor Dooley

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=ZidIcgEPSb_vDQw7@swlinux02 \
    --to=ycliang@andestech.com \
    --cc=ajones@ventanamicro.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=u-boot@lists.denx.de \
    /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