From: Chester Lin <clin@suse.com>
To: Alexander Graf <agraf@csgraf.de>
Cc: Atish Patra <Atish.Patra@wdc.com>,
"grub-devel@gnu.org" <grub-devel@gnu.org>,
"daniel.kiper@oracle.com" <daniel.kiper@oracle.com>,
Alistair Francis <Alistair.Francis@wdc.com>,
Anup Patel <Anup.Patel@wdc.com>,
"leif@nuviainc.com" <leif@nuviainc.com>
Subject: Re: [PATCH 0/2] Implement a grub loader for RISC-V LINUX
Date: Fri, 17 Jan 2020 03:20:53 +0000 [thread overview]
Message-ID: <20200117032041.GA2415@linux-o6r3> (raw)
In-Reply-To: <01bde326-ee53-e5c8-529a-60f17fe61a32@csgraf.de>
Hi Alex, Atish and Anup,
On Thu, Jan 16, 2020 at 02:27:55PM +0100, Alexander Graf wrote:
>
> On 16.01.20 14:14, Atish Patra wrote:
> >
> > Sent from my iPhone
> >
> > > On Jan 16, 2020, at 10:06 PM, Alexander Graf <agraf@csgraf.de> wrote:
> > >
> > > Hi Chester,
> > >
> > > > On 16.01.20 11:21, Chester Lin wrote:
> > > > Implement an initial version of riscv loader and related commands to load
> > > > and run linux kernel and initrd on RISC-V. I tested this series based on
> > > > the following configuration:
> > > >
> > > > - QEMU 4.2.50 (machine: virt)
> > > > - OpenSBI v0.5-51
> > > > - U-Boot 2020.01-rc5
> > > > - grub 2.04
> > > > - linux-kernel v5.4
> > > > - openSUSE-Tumbleweed-20191103
> > >
> > > Thanks a lot for tackling this problem - it's been on the back burner for way too long :). Unfortunately this patch set loads grub via UEFI, but then does not execute Linux using the UEFI protocol. While that's a nice hack for starters, it severely limits the extensibility of the boot flow going forward.
> > >
> > > IIRC either Anup or Atish wanted to work on a UEFI boot stub for Linux. We could then just unify the ARM and RISC-V UEFI boot paths in grub and use that common code to run Linux via the UEFI stub.
> > >
> > >
> > Yes. I am working on it. In fact, I got Linux kernel booting via bootefi command last week. I have tried to use as much as ARM stub code possible which will help in unifying them in future.
> >
> > I am yet to add UEFI run time services. But I was thinking to post a RFC series with EFI stub code first and work on run time services after that. Let me know if you think that’s not a good idea.
>
>
> I think that's a great idea. It will also unblock any work to move this
> patch to boot using the UEFI protocol.
>
>
> Alex
>
It's a huge progress! thank you for letting me know about this great news. BTW,
it seems that u-boot uses a specific approach to unblock non-boot harts which are
looped by the wfi command. I wonder if we have any plan to move this operation
to the OS side? For example, let non-boot harts keep waiting until linux kernel
unblocks them. It seems that HSM (Hart State Managment Extension) is still under
development, would we rely on this extension to implement CPU online/offline
functions for RISC-V?
I raise this question because I think it could be complicated for grub to manage
non-boot harts which are blocked in u-boot stage if no general data structure or
boottime service provided by the previous bootloader [e.g, u-boot or UEFI FW].
Otherwise the efi-call start_image should specifically handle it but that also
means UEFI or other kinds of bootloader must follow it as well.
Thanks for your patience,
Chester
next prev parent reply other threads:[~2020-01-17 3:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 10:21 [PATCH 0/2] Implement a grub loader for RISC-V LINUX Chester Lin
2020-01-16 10:21 ` [PATCH 1/2] RISC-V: Correct linux headers' definitions Chester Lin
2020-01-16 10:21 ` [PATCH 2/2] RISC-V: Implement linux image loader Chester Lin
2020-01-16 12:06 ` [PATCH 0/2] Implement a grub loader for RISC-V LINUX Alexander Graf
2020-01-16 13:14 ` Atish Patra
2020-01-16 13:27 ` Alexander Graf
2020-01-17 3:20 ` Chester Lin [this message]
2020-01-17 9:24 ` Atish Patra
2020-01-17 12:51 ` [EXTERNAL] " Leif Lindholm
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=20200117032041.GA2415@linux-o6r3 \
--to=clin@suse.com \
--cc=Alistair.Francis@wdc.com \
--cc=Anup.Patel@wdc.com \
--cc=Atish.Patra@wdc.com \
--cc=agraf@csgraf.de \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
--cc=leif@nuviainc.com \
/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.