All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anup Patel <Anup.Patel@wdc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 00/11] SiFive FU540 Support
Date: Mon, 21 Jan 2019 04:04:23 +0000	[thread overview]
Message-ID: <BYAPR04MB53033E5CADC20AA6C6CB349A8D9F0@BYAPR04MB5303.namprd04.prod.outlook.com> (raw)
In-Reply-To: <105c33d1-41a7-8ea0-5693-f28ea96a0ddc@wdc.com>



> -----Original Message-----
> From: Atish Patra [mailto:atish.patra at wdc.com]
> Sent: Monday, January 21, 2019 7:07 AM
> To: Auer, Lukas <lukas.auer@aisec.fraunhofer.de>; sjg at chromium.org;
> bmeng.cn at gmail.com; rick at andestech.com; Anup Patel
> <Anup.Patel@wdc.com>; joe.hershberger at ni.com;
> yamada.masahiro at socionext.com
> Cc: paul.walmsley at sifive.com; palmer at sifive.com; hch at infradead.org; u-
> boot at lists.denx.de; agraf at suse.de
> Subject: Re: [PATCH v2 00/11] SiFive FU540 Support
> 
> On 1/20/19 12:34 PM, Auer, Lukas wrote:
> > Hi Anup,
> >
> > On Fri, 2019-01-18 at 11:18 +0000, Anup Patel wrote:
> >> This patchset adds SiFive Freedom Unleashed (FU540) support to RISC-V
> >> U-Boot.
> >>
> >> The patches are based upon latest RISC-V U-Boot tree
> >> (git://git.denx.de/u-boot-riscv.git) at commit id
> >> 91882c472d8c0aef4db699d3f2de55bf43d4ae4b
> >>
> >> All drivers namely: SiFive PRCI, SiFive Serial, and Cadance MACB
> >> Ethernet work fine on actual SiFive Unleashed board and QEMU sifive_u
> >> machine.
> >>
> >
> > Thanks for working on this! Are you also planning on adding the
> > features of the FSBL to U-Boot to remove it from the boot flow?
> >
> 
> That would also mean that adding M-mode capability in U-boot. As of now
> the expected boot flow is
> 
> ZSBL->FSBL------->BBL/OpenSBI--------->U-boot------------->Linux
> (M mode from ROM)  (M mode from DRAM)  (S Mode from DRAM)  (S Mode
> from
> DRAM)
> 
> This is not the mandated boot flow but running the last stage boot loader
> from S-mode gives flexibility in virtualization in future.

To elaborate more on what Atish already mentioned, our rationale behind
ZSBL->FSBL->BBL/OpenSBI->U-Boot(or Any other general bootloader) is
as follows:
1. We don't want to replicate FSBL code (DRAM and other system-level init)
in general purpose bootloaders (U-Boot, UEFI/Tianocore, etc)
2. We don't want to replicate SBI runtime implementation in general
purpose bootloaders (U-Boot, UEFI/Tianocore, etc)
3. We want to use general purpose bootloader (U-Boot, UEFI/Tianocore, etc)
inside Guest/VM (S-mode)

Of course, above boot flow is not mandatory. There could be RISC-V systems
where prior booting stages (such as ZSBL and FSBL) don't exist so users have
following options:
1. Run U-Boot in M-mode for such RISC-V systems and link to OpenSBI static
library for SBI runtime services
2. Run U-Boot in S-mode but do most system-level initialization (including
DRAM init) in OpenSBI firmware. In other words, use following booting flow:
OpenSBI (M-mode) -> U-Boot (S-mode)

For point1 above, we will first try it with U-Boot M-mode on QEMU Virt
machine.

> 
> > I was able to run U-Boot and boot Linux successfully on a SiFive
> > HiFive Unleashed board with this patch series. I had to make one more
> > change, because U-Boot was not able to find a serial driver and
> > paniced as a result.
> >
> > I fixed this by making the serial driver available pre-relocation. For
> > this, the soc compatible has to be added to cpu/generic/cpu.c and the
> > serial driver must have the DM_FLAG_PRE_RELOC flag set.
> >
> > Another way would be to add a "stdout-path" property to the chosen
> > node of the device tree.
> >
> 
> Currently, we modified the DT to add stdout-path in prior stage boot loader.
> 
> Regards,
> Atish
> > Thanks,
> > Lukas
> >
Regards,
Anup

  reply	other threads:[~2019-01-21  4:04 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 11:18 [U-Boot] [PATCH v2 00/11] SiFive FU540 Support Anup Patel
2019-01-18 11:18 ` [U-Boot] [PATCH v2 01/11] riscv: Rename cpu/qemu to cpu/generic Anup Patel
2019-01-20 19:57   ` Auer, Lukas
2019-01-22  2:06   ` Bin Meng
2019-01-18 11:18 ` [U-Boot] [PATCH v2 02/11] riscv: Add asm/dma-mapping.h for DMA mappings Anup Patel
2019-01-20 19:57   ` Auer, Lukas
2019-01-18 11:18 ` [U-Boot] [PATCH v2 03/11] riscv: generic: Ensure that U-Boot runs within 4GB for 64bit systems Anup Patel
2019-01-20 20:04   ` Auer, Lukas
2019-01-21  5:49     ` Anup Patel
2019-01-22  2:06   ` Bin Meng
2019-01-22 12:48     ` Anup Patel
2019-01-18 11:19 ` [U-Boot] [PATCH v2 04/11] net: macb: Fix clk API usage for RISC-V systems Anup Patel
2019-01-18 11:19 ` [U-Boot] [PATCH v2 05/11] net: macb: Fix GEM hardware detection Anup Patel
2019-01-18 11:51   ` Alexander Graf
2019-01-18 13:03     ` Anup Patel
2019-01-18 13:11       ` Alexander Graf
2019-01-18 13:25         ` Anup Patel
2019-01-20 20:05   ` Auer, Lukas
2019-01-18 11:19 ` [U-Boot] [PATCH v2 06/11] clk: Add SiFive FU540 PRCI clock driver Anup Patel
2019-01-20 20:12   ` Auer, Lukas
2019-01-21  5:55     ` Anup Patel
2019-01-21 12:09       ` Auer, Lukas
2019-01-18 11:19 ` [U-Boot] [PATCH v2 07/11] clk: Add fixed-factor " Anup Patel
2019-01-31 10:04   ` Simon Glass
2019-02-05 12:53     ` Anup Patel
2019-01-18 11:19 ` [U-Boot] [PATCH v2 08/11] drivers: serial_sifive: Fix baud rate calculation Anup Patel
2019-01-18 11:52   ` Alexander Graf
2019-01-18 13:04     ` Anup Patel
2019-01-20 20:13   ` Auer, Lukas
2019-01-18 11:19 ` [U-Boot] [PATCH v2 09/11] drivers: serial_sifive: Skip baudrate config if no input clock Anup Patel
2019-01-20 20:22   ` Auer, Lukas
2019-01-21  1:07     ` Atish Patra
2019-01-21 12:39       ` Auer, Lukas
2019-02-10 18:02         ` Auer, Lukas
2019-01-18 11:19 ` [U-Boot] [PATCH v2 10/11] cpu: Bind timer driver for boot hart Anup Patel
2019-01-18 11:52   ` Alexander Graf
2019-01-18 13:04     ` Anup Patel
2019-01-20 20:22   ` Auer, Lukas
2019-01-22  2:06   ` Bin Meng
2019-01-18 11:19 ` [U-Boot] [PATCH v2 11/11] riscv: Add SiFive FU540 board support Anup Patel
2019-01-20 20:26   ` Auer, Lukas
2019-01-21  1:22     ` Atish Patra
2019-01-21 12:57       ` Auer, Lukas
2019-01-21  9:48   ` Andreas Schwab
2019-01-21 16:17     ` Anup Patel
2019-01-21 16:36       ` Andreas Schwab
2019-01-21 16:53         ` Anup Patel
2019-01-21 17:10           ` Andreas Schwab
2019-01-21 17:32             ` Anup Patel
2019-01-22  9:30               ` Andreas Schwab
2019-01-23 19:01                 ` Atish Patra
2019-01-24  9:53                   ` Andreas Schwab
2019-01-24 10:43                     ` Anup Patel
2019-01-24 10:46                       ` Alexander Graf
2019-01-24 11:05                         ` Anup Patel
2019-01-24 11:18                           ` Alexander Graf
2019-01-24 12:52                             ` Anup Patel
2019-01-24 13:38                             ` Andreas Schwab
2019-01-24 13:53                               ` Alexander Graf
2019-01-24 13:57                                 ` Andreas Schwab
2019-02-03  7:41                                   ` Anup Patel
2019-02-04 11:17                                     ` Andreas Schwab
2019-02-04 13:03                                       ` Atish Patra
2019-02-04 13:10                                         ` Andreas Schwab
2019-02-05 12:14                                           ` Anup Patel
2019-02-05 12:51                                             ` Andreas Schwab
2019-02-05 12:58                                               ` Anup Patel
2019-02-05 13:40                                                 ` Andreas Schwab
2019-02-05 14:28                                                   ` Anup Patel
2019-02-05 14:39                                                     ` Andreas Schwab
2019-02-05 14:43                                                       ` Anup Patel
2019-02-05 15:00                                                         ` Andreas Schwab
2019-02-05 15:04                                                           ` Anup Patel
2019-01-22  2:06   ` Bin Meng
2019-01-20 20:33 ` [U-Boot] [PATCH v2 00/11] SiFive FU540 Support Auer, Lukas
2019-01-21  1:37   ` Atish Patra
2019-01-21  4:04     ` Anup Patel [this message]
2019-01-21  6:14       ` Bin Meng
2019-01-21  6:41         ` Anup Patel
2019-01-21  7:02           ` Bin Meng
2019-01-22 11:51       ` Auer, Lukas
2019-01-22 12:31         ` Anup Patel
2019-01-22 22:35           ` Auer, Lukas
2019-02-02 17:06         ` Paul Walmsley
2019-02-10 17:54           ` Auer, Lukas

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=BYAPR04MB53033E5CADC20AA6C6CB349A8D9F0@BYAPR04MB5303.namprd04.prod.outlook.com \
    --to=anup.patel@wdc.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 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.