From mboxrd@z Thu Jan 1 00:00:00 1970 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=-11.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 84DC9C07E95 for ; Sat, 10 Jul 2021 19:39:16 +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 099C3610EA for ; Sat, 10 Jul 2021 19:39:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 099C3610EA 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 1162C83379; Sat, 10 Jul 2021 21:36:12 +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=1625945772; bh=keXxcQKouoV2F+8hf4HBIdYkrE6r07XjcBIbF27PYvE=; h=From:To:Subject:In-reply-to:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=z6jNoHuKsQ6V9ISflKye8N5psIgLtkfvg0YsoG9uchLIu8Zm7cCWtU/WSLaISae0b R1VlCtBy10nxa4UUmN0XLzICM2O30J1VYKU/Ps9Ua182NbmXsk8ZBNeTg3oQUd5gqk mffXbnfvvvCA6r2tG/RBsvulwcQK1323ur+oD4VvrCUtPZVre8BOyYRyerZjEskNKN JQmLsdLNqKppeau/yYsa7zpj4cnJmbYN+uBYbuhTtk5htq0H0mE53VdPNd/ppbJXYg fvnFPHj4Q8pMlV7xd6M9c4NBekv/639FTDQR40J+KKxpvecBdhKCH2Up+Z0JRZoOIJ lGOmhiAM5t31A== Received: by phobos.denx.de (Postfix, from userid 109) id 40A3C83370; Sat, 10 Jul 2021 21:36:06 +0200 (CEST) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0DD488336E for ; Sat, 10 Jul 2021 21:36:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sbabic@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4GMgHk5Yd2z1qyJj; Sat, 10 Jul 2021 21:36:02 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4GMgHk5Q2pz1qwZV; Sat, 10 Jul 2021 21:36:02 +0200 (CEST) X-Amavis-Alert: BAD HEADER SECTION, Missing required header field: "Date" Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id rBGxD5YbXUl9; Sat, 10 Jul 2021 21:36:01 +0200 (CEST) Received: from papero (host-88-217-136-221.customer.m-online.net [88.217.136.221]) by mail.mnet-online.de (Postfix) with ESMTP; Sat, 10 Jul 2021 21:36:01 +0200 (CEST) From: sbabic@denx.de X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1500324 X-Patchwork-Delegate: sbabic@denx.de To: Marek Vasut ,u-boot@lists.denx.de Subject: [PATCH V2 2/2] ARM: imx: Pick correct eMMC boot partition from ROM log In-reply-to: <20210703025533.298144-2-marex@denx.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Message-Id: <20210710193606.40A3C83370@phobos.denx.de> Date: Sat, 10 Jul 2021 21:36:06 +0200 (CEST) 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 > 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. > However, the BootROM leaves the eMMC BOOT_PARTITION_ENABLE setting as > it was, i.e. pointing to the boot partition containing the corrupted > image, and the BootROM does not provide any indication that this sort > of fallback occured. > According to AN12853 i.MX ROMs Log Events, Rev. 0, May 2020, it is > possible to determine whether fallback event occurred by parsing the > ROM event log. In case ROM event ID 0x51 is present, fallback event > did occur. > This patch implements ROM event log parsing and search for event ID > 0x51 for all iMX8M SoCs, and based on that corrects the eMMC boot > partition selection. This way, the SPL loads the remaining boot > components from the same eMMC boot partition from which it was > started, even in case of the fallback. > Signed-off-by: Marek Vasut > Cc: Faiz Abbas > Cc: Harald Seiler > Cc: Lokesh Vutla > Cc: Simon Glass > Cc: Fabio Estevam > Cc: Peng Fan > Cc: Stefano Babic > Cc: Ye Li Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de =====================================================================