u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Randolph <randolph@andestech.com>
To: <u-boot@lists.denx.de>
Cc: <randolph.sklin@gmail.com>, <dylan@andestech.com>,
	<tim609@andestech.com>,  <peterlin@andestech.com>,
	Randolph <randolph@andestech.com>
Subject: [PATCH RESEND 0/7] riscv: spl: OpenSBI OS boot mode
Date: Fri, 6 Oct 2023 19:23:44 +0800	[thread overview]
Message-ID: <20231006112351.2275090-1-randolph@andestech.com> (raw)

Introduce a shortcut boot mode for RISC-V. 

As we know, in ARM architecture has the Falcon mode to do the shortcut
boot to the Linux kernel. (by enabling CONFIG_SPL_OS_BOOT)
ARM Falcon mode boot flow would be as follows:
u-boot SPL -> Linux kernel

But for RISC-V, OpenSBI is required to allows the supervisor to execute
some privileged operations.
The RISC-V Normal boot flow as follows:
u-boot SPL -> OpenSBI -> u-boot proper -> Linux kernel

Quoting the same ideas as ARM's Falcon mode,
OpenSBI OS boot flow as follows:
u-boot SPL -> OpenSBI -> Linux kernel

An important part of OpenSBI OS boot mode is to prepare the device tree. 
A normal U-Boot does FDT fixups when booting Linux. 
For OpenSBI OS boot mode, Linux boots directly from SPL, 
skipping the normal U-Boot. 
The device tree has to be prepared in advance.
The device tree in memory is the one needed for OpenSBI OS boot mode.

The Linux kernel image will also need to be provided for the generation
of the FIT file.

Randolph (7):
  riscv: dts: Introduce SPL_LOAD_FIT_CONFIG symbol
  riscv: dts: add binman_linux.dtsi for opensbi os boot mode
  spl: riscv: opensbi: change the default os_type as varible
  riscv: dts: introduce SPL_LOAD_FIT_OPENSBI_OS_BOOT symbol
  spl: riscv: add os type for next booting stage
  andes: config: add riscv falcon mode for ae350 platform
  riscv: spl: andes: Move the DTB in front of kernel

 arch/riscv/Kconfig                      | 16 +++++
 arch/riscv/dts/ae350-u-boot.dtsi        |  1 +
 arch/riscv/dts/ae350_32.dts             |  1 -
 arch/riscv/dts/ae350_64.dts             |  1 -
 arch/riscv/dts/binman_linux.dtsi        | 79 +++++++++++++++++++++++++
 board/AndesTech/ae350/ae350.c           | 25 ++++++++
 common/spl/spl_fit.c                    |  4 ++
 common/spl/spl_opensbi.c                | 31 ++++++----
 configs/ae350_rv32_falcon_defconfig     | 60 +++++++++++++++++++
 configs/ae350_rv32_falcon_xip_defconfig | 61 +++++++++++++++++++
 configs/ae350_rv64_falcon_defconfig     | 60 +++++++++++++++++++
 configs/ae350_rv64_falcon_xip_defconfig | 61 +++++++++++++++++++
 12 files changed, 388 insertions(+), 12 deletions(-)
 create mode 100644 arch/riscv/dts/binman_linux.dtsi
 create mode 100644 configs/ae350_rv32_falcon_defconfig
 create mode 100644 configs/ae350_rv32_falcon_xip_defconfig
 create mode 100644 configs/ae350_rv64_falcon_defconfig
 create mode 100644 configs/ae350_rv64_falcon_xip_defconfig

-- 
2.34.1


             reply	other threads:[~2023-10-06 11:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 11:23 Randolph [this message]
2023-10-06 11:23 ` [PATCH RESEND 1/7] riscv: dts: Introduce SPL_LOAD_FIT_CONFIG symbol Randolph
2023-10-07 23:09   ` Simon Glass
2023-10-06 11:23 ` [PATCH RESEND 2/7] riscv: dts: add binman_linux.dtsi for opensbi os boot mode Randolph
2023-10-07 23:09   ` Simon Glass
2023-10-06 11:23 ` [PATCH RESEND 3/7] spl: riscv: opensbi: change the default os_type as varible Randolph
2023-10-07 23:09   ` Simon Glass
2023-10-06 11:23 ` [PATCH RESEND 4/7] riscv: dts: introduce SPL_LOAD_FIT_OPENSBI_OS_BOOT symbol Randolph
2023-10-07 23:09   ` Simon Glass
2023-10-06 11:23 ` [PATCH RESEND 5/7] spl: riscv: add os type for next booting stage Randolph
2023-10-07 23:09   ` Simon Glass
2023-10-06 11:23 ` [PATCH RESEND 6/7] andes: config: add riscv falcon mode for ae350 platform Randolph
2023-10-06 11:23 ` [PATCH RESEND 7/7] riscv: spl: andes: Move the DTB in front of kernel Randolph

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=20231006112351.2275090-1-randolph@andestech.com \
    --to=randolph@andestech.com \
    --cc=dylan@andestech.com \
    --cc=peterlin@andestech.com \
    --cc=randolph.sklin@gmail.com \
    --cc=tim609@andestech.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;
as well as URLs for NNTP newsgroup(s).