All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anup Patel <anup@brainfault.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Atish Patra <atish.patra@wdc.com>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	Anup Patel <Anup.Patel@wdc.com>, Andreas Schwab <schwab@suse.de>
Subject: Re: kernel after 5.0-rc2 may not boot using BBL
Date: Fri, 8 Feb 2019 14:32:51 +0530	[thread overview]
Message-ID: <CAAhSdy3GZHn9k7VvcUkM4s2SpU7SjtW3HmWcHVD342arWHYZLw@mail.gmail.com> (raw)
In-Reply-To: <20190208083206.GA4699@infradead.org>

On Fri, Feb 8, 2019 at 2:02 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Thu, Feb 07, 2019 at 10:08:14PM -0800, Atish Patra wrote:
> > If you are building a larger kernel image, it may not boot using BBL after
> > 5.0-rc2. It works fine with OpenSBI though.
> >
> > Here is the reasoning in case anybody else is facing the same issue.
> >
> > The following patch was added 5.0-rc2 which helps reduce the flat image size
> > for Linux kernel.
> >
> > "22e6a2e1 RISC-V: Make BSS section as the last section in vmlinux.lds.S"
> >
> > As the BSS section is moved to the end of the ELF, flat image will not
> > include it. As BBL copies the DTB at the next 2MB page boundary, BSS
> > section may overlap with DTB address. Kernel clears BSS section during early
> > boot which may clear the DTB as well leading to a boot failure.
>
> Breaking everyones (qemu) setups that we only got working two release
> ago is really annoying.  I'd suggest reverting the commit for now, or
> at least making it an optional config option.

It is a bug in BBL because it is not keeping sufficient gap between
Linux kernel end and DTB. The change pointed by Atish actually
reduced flat kernel binary size by almost 1MB.

Rather than:
1. First revert in Linux
2. Fix in BBL
3. Bring back in Linux

I would suggest just do:
1. Fix in BBL

Here's my BBL pull request:
https://github.com/riscv/riscv-pk/pull/144

Regards,
Anup

>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-02-08  9:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  6:08 kernel after 5.0-rc2 may not boot using BBL Atish Patra
2019-02-08  8:32 ` Christoph Hellwig
2019-02-08  9:02   ` Anup Patel [this message]
2019-02-08  9:13     ` Christoph Hellwig
2019-02-08  9:17       ` Anup Patel
2019-02-08 17:28         ` Palmer Dabbelt
2019-02-09  3:30           ` Anup Patel
2019-02-11  8:25             ` Christoph Hellwig
2019-02-11  8:45               ` Anup Patel
2019-02-12  1:24                 ` Michael Clark
2019-02-13 21:00                   ` Palmer Dabbelt
2019-02-11 19:54               ` Palmer Dabbelt

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=CAAhSdy3GZHn9k7VvcUkM4s2SpU7SjtW3HmWcHVD342arWHYZLw@mail.gmail.com \
    --to=anup@brainfault.org \
    --cc=Anup.Patel@wdc.com \
    --cc=atish.patra@wdc.com \
    --cc=hch@infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=schwab@suse.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.