Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2422DC07E95 for ; Sat, 3 Jul 2021 03:06:05 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8037461410 for ; Sat, 3 Jul 2021 03:06:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8037461410 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0FCA5829BC; Sat, 3 Jul 2021 05:06:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1625281562; bh=C5JdoLx1U008olmWUkOYudW1xOWrC5JcbnGeHDdhwpE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QSmgNulsPw55q2nDCtvyUIy6IocMeONLTjFQl7SLWSt/6y+ER7MDUA/KAEvJdpJLq bGvaHzlPVZT81McWErKEc12vTMy5fhyzb/uIE8CXQ+45Kux6oow9U7Xso9Ozy5T6DN 0RAY93SPBEutC5TWn2kFe0UCNhMPzAalxM8Pekczh+TRERTZOiJO0k++EzrkS85eIG B6fOIyzOxHfrE1R4kWj8d1GAa09uAgrjBB9ZNhPe1jn8c8p/EY8BsIutybVJtLol3o rHkeiie46njJ+oLgrNvNq44DriE+uGNIROBDhWdXIrL7Ewg9dJjliWT3A2wfkNDo91 EoFcD3k7O4QKQ== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 2336082903; Sat, 3 Jul 2021 05:05:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1625281559; bh=C5JdoLx1U008olmWUkOYudW1xOWrC5JcbnGeHDdhwpE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=yGQ4tJ6kyOHzC3iTAD5aCgI/wjkgBS+ScOhf/mna1FFzM1oj0p3pWCYkNr8NpyFQj XfYmXM8P6Fzp7SDhs81/khe174m/WMTnI4Oxt3nR66YzULHRRrQ8PwNCbxH+rRGB4E wnCVf4izYkmn9n52So7THE2FuCsD+mJ97Ks69B5wE++v7C/a+9aqXI9krXOEqx7yea ZRnB2wob7IPyNzcsYS1AMdlTWIARc/uFdUbo2iEKt7UmzoZGXIHWuwsjP3sSP26Yi9 RHvL4QImJsgnAp8EmyIOA7/V0LvfQe/SF3HoOq0SHDzI7G+e9S8Wfo0z+bbVsQ+hef RP+ZUUMsUv6Bw== Subject: Re: [PATCH 2/2] ARM: imx: Pick correct eMMC boot partition from ROM log To: Teresa Remmet , "u-boot@lists.denx.de" Cc: "ye.li@nxp.com" , "faiz_abbas@ti.com" , "festevam@gmail.com" , "peng.fan@nxp.com" , "sbabic@denx.de" , "lokeshvutla@ti.com" , "hws@denx.de" , "sjg@chromium.org" References: <20210630230801.290195-1-marex@denx.de> <20210630230801.290195-2-marex@denx.de> From: Marek Vasut Message-ID: <6c44210b-86c7-3a90-e76f-3029eadbbbc3@denx.de> Date: Sat, 3 Jul 2021 05:05:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 7/1/21 12:07 PM, Teresa Remmet wrote: Hi [...] > Am Donnerstag, den 01.07.2021, 01:08 +0200 schrieb Marek Vasut: >> In case the iMX8M boot from eMMC boot partition and the primary image >> is corrupted, the BootROM is capable of starting a secondary image in >> the other eMMC boot partition as a fallback. > > I would like to ask a more general question. As I could not find > information about that. What are the criteria for the BootROM to > consider a image as corrupted? > I remember on other platforms with NAND where it was a erased page or > too many bitflips. What is it here with eMMC? I didn't find much information on the unsigned images, so there I suspect it is just that parsing the IVT header fails, the DCD tag is missing, something along those lines. There is no checksum, so if there is a bitflip in the image itself, I can imagine it would go undetected. At least in the SPL part of flash.bin, the rest is fitImage and that has checksum. For signed images, if there is a bitflip, the signature would no longer be valid, so this could be used to detect image corruption. Maybe Peng (on CC) can clarify this better ? [...]