public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <oss@buserror.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/14] nand: sunxi: Fix modulo by zero error
Date: Wed, 04 Jan 2017 16:11:19 -0600	[thread overview]
Message-ID: <1483567879.17813.2.camel@buserror.net> (raw)
In-Reply-To: <5b6deeb5f9c9496d9233248167969021d6060c3f.1479817585.git-series.maxime.ripard@free-electrons.com>

On Tue, 2016-11-22 at 13:38 +0100, Maxime Ripard wrote:
> When trying to autodetect the ECC and randomization configurations, the
> driver starts with a randomization disabled and no seeds.
> 
> In this case, the number of seeds is obviously 0, and the randomize boolean
> is set to false.
> 
> However, the logic that retrieves the seed for a given page offset will
> blindly use the number of seeds, without testing if the randomization is
> enabled, basically doing a modulo by 0.
> 
> As it turns out, the libgcc in the common toolchain returns 0 here, which
> was our expected value in such a case, and why we would not detect it.
> However, U-Boot's libgcc will for some reason return from the function
> instead, resulting in an error to load the U-Boot binary in the SPL.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
> ?drivers/mtd/nand/sunxi_nand_spl.c | 7 ++++---
> ?1 file changed, 4 insertions(+), 3 deletions(-)

Acked-by: Scott Wood <oss@buserror.net>

-Scott

  parent reply	other threads:[~2017-01-04 22:11 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 12:38 [U-Boot] [PATCH v2 0/14] sunxi: Add support for the CHIP Pro Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 1/14] nand: sunxi: Fix modulo by zero error Maxime Ripard
2016-11-22 12:43   ` Boris Brezillon
2017-01-04 22:11   ` Scott Wood [this message]
2016-11-22 12:38 ` [U-Boot] [PATCH v2 2/14] mtd: nand: add support for the TC58NVG2S0H chip Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 3/14] bch: Allow to build for the host Maxime Ripard
2016-11-22 15:12   ` Tom Rini
2016-11-25 17:05   ` Jagan Teki
2016-11-29  8:49     ` Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 4/14] tools: sunxi: Add spl image builder Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 5/14] common: Move environment choice to Kconfig Maxime Ripard
2016-11-22 15:17   ` Tom Rini
2016-11-22 12:38 ` [U-Boot] [PATCH v2 6/14] cmd: Add Kconfig option for CMD_MTDPARTS and related options Maxime Ripard
2016-11-22 15:14   ` Tom Rini
2017-01-04  9:10   ` Boris Brezillon
2017-01-09  8:28     ` Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 7/14] mtd: sunxi: Select the U-Boot location config option Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 8/14] mtd: sunxi: Change U-Boot offset Maxime Ripard
2016-11-22 15:20   ` Tom Rini
2016-11-22 12:38 ` [U-Boot] [PATCH v2 9/14] sunxi: Enable UBI and NAND support Maxime Ripard
2016-11-22 12:58   ` Boris Brezillon
2016-11-22 15:24   ` Tom Rini
2016-11-22 15:47     ` Peter Robinson
2016-11-22 15:54     ` Maxime Ripard
2016-11-22 16:40       ` Tom Rini
2016-11-22 12:38 ` [U-Boot] [PATCH v2 10/14] sunxi: Add the default mtdids and mtdparts to our env Maxime Ripard
2016-11-22 15:18   ` Tom Rini
2016-11-22 12:38 ` [U-Boot] [PATCH v2 11/14] nand: sunxi: Add options for the SPL NAND configuration Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 12/14] scripts: sunxi: Build an raw SPL image Maxime Ripard
2016-11-22 13:06   ` Boris Brezillon
2016-11-22 16:20   ` Heiko Schocher
2016-11-22 12:38 ` [U-Boot] [PATCH v2 13/14] sunxi: Sync GR8 DTS and AXP209 with the kernel Maxime Ripard
2016-12-03 13:49   ` Jagan Teki
2016-12-05 10:41     ` Maxime Ripard
2016-11-22 12:38 ` [U-Boot] [PATCH v2 14/14] sunxi: Add support for the CHIP Pro Maxime Ripard
2016-12-04  7:19 ` [U-Boot] [PATCH v2 0/14] " Jagan Teki
2016-12-05 21:33   ` Jagan Teki
2016-12-07 15:10     ` Jagan Teki
2016-12-09  8:18     ` Maxime Ripard

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=1483567879.17813.2.camel@buserror.net \
    --to=oss@buserror.net \
    --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